At times, it is important to import/export policies from Database. I am explaining the scripts to be used to achieve this.

The policies are present in the XML config file policyIX_config.xml in the location BEA_HOME/ales32-admin/bin.

To export policies from Database to an XML file:

Assume you are running from the location  BEA_HOME/ales32-admin/bin.

./policyIX.sh -export ../config/policyIX_config.xml policies_export.xml -passwdPrompt

-passwdPrompt is optional field and is the OES admin password.

The <export_configuration> element present in policyIX_config.xml specifies which policies, roles, identities etc., to be exported to the file policies_export.xml. If you are interested, open the  policyIX_config.xml and check for the various elements available.

The stuff that gets exported are Organizations, Resources, Policies, Roles, Actions etc.,

The same output of this command is as follows:

$ ./policyIX.sh -export ../config/policyIX_config.xml policies_export_mahendra.xml
Uploading file:/opt/oracle/bea/wls10_3/ales32-admin/bin/../config/policyIX_config.xml
Upload complete
Policy Propagation is finished
Downloading exported policy file…
Downloading finished
$

 

To import policies from XML file to the Database:

Assume you are running from the location  BEA_HOME/ales32-admin/bin.

./policyIX.sh -import -disableTransaction ../config/policyIX_config.xml policies_export.xml  -passwdPrompt

disableTransaction is used to prevent loading of policies in single transaction. This is recommended when loading a large policy set. It improves loading performance, but loaded policy data will not be rolled back if the loading fails.

References:

OES Docs