使用impdp复制oracle的schema数据迁移
2008-12-16 13:05:45 来源:WEB开发网C、使用该用户来创建数据库链。
SQL> create public database link tolink connect to link identified by "1" using '37ZHS';
数据库链接已创建。
D、使用该链来复制link用户,报 ORA-39149: cannot link privileged user to non-privileged user
错误。
d:oracleproduct10.2.0db_1BIN>impdp network_link=tolink schemas=link remap_schema=link:link2
Import: Release 10.2.0.2.0 - Production on Wednesday, 07 March, 2007 16:51:37
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-31631: privileges are required
ORA-39149: cannot link privileged user to non-privileged user
F、授予 exp_ful_database 权限后,复制成功。
SQL> grant exp_full_database to link;
授权成功。
d:oracleproduct10.2.0db_1BIN>impdp network_link=tolink schemas=link remap_schema=link:link2
Import: Release 10.2.0.2.0 - Production on Wednesday, 07 March, 2007 16:54:30
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYS"."SYS_IMPORT_SCHEMA_01": /******** AS SYSDBA network_link=tolink schemas=link remap
_schema=link:link2
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . imported "LINK2"."DOC_TYPE" 8 rows
Job "SYS"."SYS_IMPORT_SCHEMA_01" successfully completed at 16:54:52
更多精彩
赞助商链接