Oracle 11g, 12C data import and export pump

A first determined (different versions of the database, use the command parameters and form vary slightly) their own version of the database

  It can be directly connected to the client database tools such as pl \ sql developer, nevicat the like, can also be mounted slqplus, enter the following statement see the following results shown in FIG.

  select * from V $ version; - check the database version

  

  

If you are using exp to export, then use the imp import, if it is expdp, then use impbd,

Parameters for each command can check into, provided that you have the oracle database installation, if not installed on your computer, then finding out, can only go online to find,

Next, I tell you, if these orders check of parameters and usage. With exp, for example, the other three commands in this way Jieke check to:

Open a command prompt, press the Windows key + R-- direct "input cmd, Enter a knock -" Enter exp help = Y-- "

The following DBUSER username, PASSWORD for the user's password, orcl , ORCLPDB for the database name

12C and 11g Data Pump import and export:

Export:

exp DBUSER / PASSWORD @ / orcl file = 'E: \ oracleFile \ exporclfile'; // to export the file and location, E: \ exporclfile.PDB have a name for the data file oracleFile directory;

Import:

imp DBUSER/PASSWORD@orcl file='E:\oracleFile\exporclfile' log=file='E:\oracleFile\exporclfilelog';//要导入的文件及位置,E:\oracleFile目录下要有一个名字为exporclfile.PDB的数据文件,才能进行导入;日志文件也是非常重要的一个文件,尽量导入的时候生成一个,日志文件的重要性这里就不在赘述了;

导出(导出问价在DIRDP对应的目录下)

  expdp DBUSER/PASSWORD@ORCLPDB directory=DIRDP dumpfile=YJY20190731.dmp logfile=YJY20190731.log 

导入(要将.DMP文件放到指定的目录下)

  impdb DBUSER/PASSWORD@ORCLPDB directory=DIRDP dumpfile=backYjyptgl20190725.dmp logfile=backYjyptgl20190725.log

PS:(如果12C不行,就用远程的方式,加上IP地址)

下面是远程导入导出:(加上IP地址,其它的同理)

  导出:

  exp DBUSER/[email protected]:1521/orc lfile='E:\oracleFile\exporclfile';

  导入:

  imp DBUSER/[email protected]:1521/orcl file='E:\oracleFile\exporclfile'';

 

Guess you like

Origin www.cnblogs.com/lishuangyun/p/11278432.html
Recommended