马什么梅 什么梗:备份数据库

来源:百度文库 编辑:九乡新闻网 时间:2024/04/27 21:16:13
exp system/oracle@charge TABLE=scott.dept,scott.emp FILE=tab1.dmp
用system用户(密码是oracle)登录charge库,将scott.dept跟scott.emp这2个表导出到tab1.dmp

imp scott/oracle@charge FILE=tab2.dmp TABLES=dept,emp(这边应该是个逗号吧)
用scott用户导入tab2.dmp文件中的dept,emp表

imp system/oracle@charge FILE=tab2.dmp TABLES=dept.emp FROMUSER=scott TOUSER=system
用scott用户登录,将tab2.dmp中的dept,emp表从scott用户导入到system用户