运维之 Oracle DB 创建用户 导入dmp文件-Dump文件

运维之 Oracle DB 创建用户 导入dmp文件-Dump文件

drop user lcs cascade;

create user lcs identified by lcs ;

--授权

grant all privileges to lcs;

grant connect to lcs;

grant dba to lcs;

--指定转储文件和日志文件所在的目录

create directory dpdata as '/home/oracle/dpdata';

-- Grant/Revoke object privileges

grant execute, read on directory dpdata to lcs with grant option;

grant connect to lcs with admin option;

grant dba to lcs with admin option;

grant exp_full_database to lcs with admin option;

grant imp_full_database to lcs with admin option;

grant gather_system_statistics to lcs with admin option;

impdp directory=dpdata dumpfile=AIMSDATA20150526.DMP

第一次执行impdp命令遇到的错误:

ORA-39006: internal error

ORA-39213: Metadata processing is not available

解决方法:

以sysdba的身份登录,执行

SQL> exec dbms_metadata_util.load_stylesheets

推荐阅读