Home » RDBMS Server » Security » Export Policies and Import to another database? (RDBMS 10.2.0.4, Redhat Linus)
Export Policies and Import to another database? [message #564521] Fri, 24 August 2012 12:17 Go to next message
Jeremy.Russell
Messages: 14
Registered: September 2011
Location: Charleston, SC
Junior Member
Hi; I have what I sincerely hope is a question which has a simple answer.

How can I export FGA / row level security policies from one database to another? I have created a new version of my schools ERP database, with upgraded application software, and now need to get the policies from our current production system to the new one.

Thanks for any suggestions.

Jeremy
Re: Export Policies and Import to another database? [message #564522 is a reply to message #564521] Fri, 24 August 2012 12:27 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10630
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
To export the policy, just the expdp would do.
Check part of my expdp logs.
Quote:
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/COMMENT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/RLS_POLICY/RLS_POLICY
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE/PACKAGE_SPEC


To export the data, you need EXEMPT ACCESS POLICY
http://docs.oracle.com/cd/B19306_01/network.102/b14266/apdvcntx.htm#i1014354
Re: Export Policies and Import to another database? [message #564523 is a reply to message #564522] Fri, 24 August 2012 12:32 Go to previous messageGo to next message
Jeremy.Russell
Messages: 14
Registered: September 2011
Location: Charleston, SC
Junior Member
Thanks; will try soon and report results
Re: Export Policies and Import to another database? [message #564529 is a reply to message #564522] Fri, 24 August 2012 15:06 Go to previous messageGo to next message
Jeremy.Russell
Messages: 14
Registered: September 2011
Location: Charleston, SC
Junior Member
And just when it was going so well, I got this Sad

$ expdp citadeldba schemas=odsmgr dumpfile=odsmgr_export.dmp include=rls_policy

$ impdp citadeldba@ODSX schemas=odsmgr dumpfile=odsmgr_export.dmp include=rls_policy

Import: Release 10.2.0.4.0 - 64bit Production on Friday, 24 August, 2012 15:52:48

Copyright (c) 2003, 2007, Oracle.  All rights reserved.
Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "CITADELDBA"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "CITADELDBA"."SYS_IMPORT_SCHEMA_01":  citadeldba/********@ODSX schemas=odsmgr dumpfile=odsmgr_export.dmp include=rls_policy
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/TABLE/RLS_POLICY
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 1 with process name "DW01" prematurely terminated
ORA-31671: Worker process DW01 had an unhandled exception.
ORA-00600: internal error code, arguments: [kupfiReadBzLob], [kgcddo error], [19], [1], [212], [0], [], []
ORA-06512: at "SYS.KUPW$WORKER", line 1397
ORA-06512: at line 2

Job "CITADELDBA"."SYS_IMPORT_SCHEMA_01" stopped due to fatal error at 15:54:35


I'm now going to have to research what "internal error code, arguments: [kupfiReadBzLob]" means!
Re: Export Policies and Import to another database? [message #564530 is a reply to message #564529] Fri, 24 August 2012 15:11 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10630
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Metalink note 762857.1 and 457255.1

[Updated on: Fri, 24 August 2012 15:16]

Report message to a moderator

Re: Export Policies and Import to another database? [message #564531 is a reply to message #564529] Fri, 24 August 2012 15:30 Go to previous message
Jeremy.Russell
Messages: 14
Registered: September 2011
Location: Charleston, SC
Junior Member
Again, many thanks - the commands below worked Smile

$ expdp citadeldba@ODSP schemas=odsmgr dumpfile=odsmgr_export.dmp include=rls_policy compression=none

$ impdp citadeldba@ODSX schemas=odsmgr dumpfile=odsmgr_export.dmp include=rls_policy


I appreciate your timely help, Mahesh!
Previous Topic: Ensuring read only access to any table
Next Topic: how to generate user and password manually
Goto Forum:
  


Current Time: Mon Dec 22 22:45:35 CST 2014

Total time taken to generate the page: 0.05673 seconds