标签:cot rgb page space sel 导出用户 oracl rgba rom
1. 导出:
SQL> exp \‘sys/oracle@erp as sysdba \‘ owner=SCOTT file=/u01/app/oracle/backup/exp_scott.dmp log=/u01/app/oracle/backup/exp_scott.log; --- 导出SCOTT用户
2. 获取相关权限,表空间信息
SQL> spool object1.sql
SQL> set long 200000 pagesize 0 head off verify off feedback off linesize 200
SQL> select dbms_metadata.get_ddl(‘USER‘,‘SCOTT‘) from dual;
SQL> select dbms_metadata.get_granted_ddl(‘OBJECT_GRANT‘,‘SCOTT‘) from dual;
SQL> select dbms_metadata.get_granted_ddl(‘ROLE_GRANT‘,‘SCOTT‘) from dual;
SQL> select dbms_metadata.get_granted_ddl(‘SYSTEM_GRANT‘,‘SCOTT‘) from dual;
SQL> select dbms_metadata.get_ddl(‘TABLESPACE‘,‘TBS_USER‘) from dual;
SQL> spool off;
3. 编辑好格式,在将要导入的数据上运行
4. 导入:
SQL> imp \‘sys/oracle@erp as sysdba \‘ fromuser=SCOTT touser=SCOTT file=/u01/app/oracle/backup/exp_scott.dmp log=/u01/app/oracle/backup/imp_scott.log
标签:cot rgb page space sel 导出用户 oracl rgba rom
原文地址:https://www.cnblogs.com/eniniemand/p/14304824.html