ORACLE-dmp file export and import, understand?

ORACLE export dmp file:

1. Fully export the database ORACLE to c:\daochu.dmp
exp user/password@ORACLE file=c:\xxx.dmp full=y or exp user/[email protected]:1521/orcl file=E :\xxx.dmp  

2. Export the tables of RFD users and ,JYZGCX users in the database
exp user/password@ORACLE file=d:\xxx.dmp owner=(RFD,JYZGCX)

3. Export the tables T_USER and T_ROLE in the database to
exp user/password@ORACLE file= d:\data\xxxx.dmp tables=(T_USER,T_ROLE)

 

ORACLE import dmp file:

1. First, we can create a user tablespace of our own. The format of creating a tablespace is as follows:

create tablespace test (the name of the tablespace) 
datafile 'D:\oracle\product\10.2.0\userdata\test.dbf' (this can be written as a path in oracle)
size 50m (initial size)
autoextend on; ( auto-expand)

2. Next, we can create a user of our own in the following format:

CREATE USER utest (user name) 
IDENTIFIED BY upassword (password)
DEFAULT TABLESPACE test (table space created above) 
TEMPORARY TABLESPACE temp; (temp is enough for temporary table space)

3. Then, we need to grant permissions to our own users to manage our own tablespaces

GRANT CONNECT TO utest;  
GRANT RESOURCE TO utest;  
GRANT dba TO utest;--dba is the highest authority, which can create databases, tables, etc.

The execution environment of the above three statements needs to enter the oralce

How to enter oracle under cmd

sqlplus system/password press Enter

4. Next, we can import our dmp file into our own tablespace, the import method

imp usename/password@SID full=y  file= d:\data\xxxx.dmp ignore=y

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325166510&siteId=291194637