Import dmp files into Oracle database in linux environment

su --oracle car

sqlplus / as sysdba press Enter to enter

sql>

First, the premise of importing the dmp file into oracle (1): establish a table space

create tablespace zhongxuan (the name of the table space) 
datafile '/oradata/orcl/zhongxuan.dbf' (this can be written as a path in oracle)
size 50m (initial size)
autoextend on; (automatic expansion)

2. Create a new user pointing to the tablespace

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

3. Give the user role permissions, especially dba permissions

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

exit; carriage return

Fourth, import the dmp file into oracle

imp usename/password@SID(表空间) full=y  file= /data/xxxx.dmp full=y ignore=y

 

 

Guess you like

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