Oracle技术之EXP_FULL_DATABASE

没有EXP_FULL_DATABASE角色,会出现下面错误:

ORA-31631: privileges are required

ORA-39149: cannot link privileged user to non-privileged user



SQL> create database link pdbl connect to rman identified by rman using 'catalog';

数据库链接已创建。

--=============================================

C:>expdp test2/test2@abc directory=mydir dumpfile=rman.dmp network_link=pdbl tables=t

Export: Release 10.2.0.1.0 - Production on Monday, 27 June, 2011 14:17:37

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.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

--=============================================

C:>impdp test2/test2@abc network_link=pdbl tables=t

Import: Release 10.2.0.1.0 - Production on Monday, 27 June, 2011 14:18:22

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.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

--=============================================

C:>sqlplus sys/system@catalog as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 27 15:15:19 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.


连接到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

SQL> grant EXP_FULL_DATABASE to rman;

授权成功。

SQL>

--=======================================

C:>expdp test2/test2@abc directory=mydir dumpfile=rman.dmp network_link=pdbl tables=db

Export: Release 10.2.0.1.0 - Production on Monday, 27 June, 2011 15:15:30

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Starting "TEST2"."SYS_EXPORT_TABLE_01": test2/********@abc directory=mydir dumpfile=rman.dmp network_link=pdbl tables=db

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 64 KB

Processing object type TABLE_EXPORT/TABLE/TABLE

Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

. . exported "RMAN"."DB" 6.476 KB 1 rows

Master table "TEST2"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for TEST2.SYS_EXPORT_TABLE_01 is:

C:TEMPRMAN.DMP

Job "TEST2"."SYS_EXPORT_TABLE_01" successfully completed at 15:15:43

--===================================

C:>impdp test2/test2@abc network_link=pdbl tables=db remap_schema=(rman:test2)

Import: Release 10.2.0.1.0 - Production on Monday, 27 June, 2011 15:20:56

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Starting "TEST2"."SYS_IMPORT_TABLE_01": test2/********@abc network_link=pdbl tables=db remap_schema=(rman:test2)

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 64 KB

Processing object type TABLE_EXPORT/TABLE/TABLE

ORA-39151: Table "TEST2"."DB" exists. All dependent metadata and data will be skipped due to table_exists_action of skip

Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

Job "TEST2"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 15:21:06

--===============================

--创建dblink时connect远程db的rman用户需要被授予EXP_FULL_DATABASE角色,否则出现错误:ORA-39149


oracle视频教程请关注:http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html


你可能感兴趣的:(oracle)