linux中导入oracle备份

//创建临时表空间 

create temporary tablespace MYDB_TEMP

tempfile '/opt/11g/oracle/oradata/orcl/MYDB_TEMP.dbf'

size 32m

autoextend on

next 32m maxsize 2048m

extent management local; 

 

//创建数据表空间 

create tablespace MYDB

logging

datafile '/opt/11g/oracle/oradata/orcl/MYDB.dbf'

size 32m

autoextend on

next 32m maxsize 2048m

extent management local; 

 

//创建用户并指定表空间

create user MYDB_USER identified by MYDB_PWD

default tablespace MYDB

temporary tablespace MYDB_TEMP;

 

//给用户授予权限

grant connect,dba,resource to MYDB_USER;

  

//数据导入(root和oracle账户都可以,不需要先连接数据库)

imp MYDB_USER/MYDB_PWD@orcl file=/MYDB.dmp full=y;

 

你可能感兴趣的:(oracle,linux)