oracle怎么导标准库 oracle数据库导库

怎样导出oracle整个数据库?

1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中

创新互联长期为千余家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为东宝企业提供专业的成都做网站、网站建设,东宝网站改版等技术服务。拥有10年丰富建站经验和众多成功案例,为您定制开发。

exp system/manager@TEST file=d:\daochu.dmp full=y

2 将数据库中system用户与sys用户的表导出

exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)

3 将数据库中的表table1 、table2导出

exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)

4 将数据库中的表table1中的字段filed1以"00"打头的数据导出

exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"

上面是常用的导出,对于压缩我不太在意,用winzip把dmp文件可以很好的压缩。

不过在上面命令后面 加上 compress=y 就可以了

如何导oracle数据库

使用Expdp/Impdp来完成效率比exp/imp绝对的快。因为这个ORACLE10G特性。

1)按用户导

expdp scott/tiger@orcl schemas=scott dumpfile=expdp.dmp DIRECTORY=dpdata1;

2)并行进程parallel

expdp scott/tiger@orcl directory=dpdata1 dumpfile=scott3.dmp parallel=40 job_name=scott3

3)按表名导

expdp scott/tiger@orcl TABLES=emp,dept dumpfile=expdp.dmp DIRECTORY=dpdata1;

4)按查询条件导

expdp scott/tiger@orcl directory=dpdata1 dumpfile=expdp.dmp Tables=emp query='WHERE deptno=20';

5)按表空间导

expdp system/manager DIRECTORY=dpdata1 DUMPFILE=tablespace.dmp TABLESPACES=temp,example;

6)导整个数据库

expdp system/manager DIRECTORY=dpdata1 DUMPFILE=full.dmp FULL=y;

五、还原数据

1)导到指定用户下

impdp scott/tiger DIRECTORY=dpdata1 DUMPFILE=expdp.dmp SCHEMAS=scott;

2)改变表的owner

impdp system/manager DIRECTORY=dpdata1 DUMPFILE=expdp.dmp TABLES=scott.dept REMAP_SCHEMA=scott:system;

3)导入表空间

impdp system/manager DIRECTORY=dpdata1 DUMPFILE=tablespace.dmp TABLESPACES=example;

4)导入数据库

impdb system/manager DIRECTORY=dump_dir DUMPFILE=full.dmp FULL=y;

5)追加数据

impdp system/manager DIRECTORY=dpdata1 DUMPFILE=expdp.dmp SCHEMAS=system TABLE_EXISTS_ACTION=append;

oracle怎样导入数据库

我给你一些数据库常用的导入导出命令吧:\x0d\x0a该命令在“开始菜单运行CMD”中执行\x0d\x0a一、数据导出(exp.exe)\x0d\x0a1、将数据库orcl完全导出,用户名system,密码accp,导出到d:\daochu.dmp文件中\x0d\x0aexp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、将数据库orcl中scott用户的对象导出\x0d\x0aexp scott/accp@orcl file=d:\daochu.dmp owner=(scott)\x0d\x0a\x0d\x0a3、将数据库orcl中的scott用户的表emp、dept导出\x0d\x0aexp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)\x0d\x0a\x0d\x0a4、将数据库orcl中的表空间testSpace导出\x0d\x0aexp system/accp@orcl file=d:\daochu.dmp tablespaces=(testSpace)\x0d\x0a\x0d\x0a二、数据导入(imp.exe)\x0d\x0a1、将d:\daochu.dmp 中的数据导入 orcl数据库中。\x0d\x0aimp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、如果导入时,数据表已经存在,将报错,对该表不会进行导入;加上ignore=y即可,表示忽略现有表,在现有表上追加记录。\x0d\x0aimp scott/accp@orcl file=d:\daochu.dmp full=y ignore=y\x0d\x0a\x0d\x0a3、将d:\daochu.dmp中的表emp导入\x0d\x0aimp scott/accp@orcl file=d:\daochu.dmp tables=(emp)


网页标题:oracle怎么导标准库 oracle数据库导库
URL分享:http://csdahua.cn/article/hhhhpe.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流