欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Oracle 备份 还原 导入 导出 数据库

程序员文章站 2022-04-19 12:43:17
导出数据SQL> conn / as sysdbaConnected.SQL> create directory lxw_dir as '/home/oracle';Directory created.SQL> grant write,read on directory lxw_dir to lxw;Grant succeeded.SQL> exitDisconnected from Oracle Database 11g Enterprise Editi...

导出数据

SQL> conn / as sysdba
Connected.
SQL> create directory lxw_dir as '/home/oracle';

Directory created.

SQL> grant write,read on directory lxw_dir to lxw;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@db ~]$ expdp lxw/lxw123@orcl directory=lxw_dir dumpfile=lxw_20200706.dmp log=lxw_20200706.log schemas=lxw

加 content=metadata_only 只导出架构

导入数据

SQL> conn / as sysdba
Connected.
SQL> create directory lxw_dir as '/home/oracle';

Directory created.

SQL> grant write,read on directory lxw_dir to lxw

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@db ~]$ impdp lxw/lxw123@orcl directory=lxw_dir dumpfile=lxw_20200706.dmp log=lxw_20200706.log schemas=lxw

 

本文地址:https://blog.csdn.net/lw112190/article/details/107154064