Thursday, 10 August 2017

OIM 11g: Export and Import metadata files from MDS


Oracle WebLogic Server provides three utilities to enable you to modify Oracle Identity Manager metadata.They are:
·         weblogicExportMetadata.sh - export specific metadata files from the MDS database
·         weblogicImportMetadata.sh - import specific metadata files into the MDS database
·         weblogicDeleteMetadata.sh - delete specific metadata files from the MDS database

MDS Data Purpose: Most of Oracle Identity Manager (OIM) 11g configuration files are stored in database under Metadata Services (MDS)  rather than on a file system on the OIM Server. Troubleshooting configuration issue can sometimes require exporting & importing MDS data.

Note: Weblogic admin and manage servers should be up when you are exporting or importing or deleting MDS files.

# Steps to Export : Here I will use wlst.sh utility to export MDS file which is one of the simplest method, we can also use weblogicExportMetadata.sh

 1.       Create directory where you want to export metadata files.




        
       2. Go to cd $ORACLE_HOME/common/bin and run below script.
./wlst.sh







 3Run connect() command.
Please enter your username :weblogic( User name should be weblogic)
Please enter your password : *******(weblogic password)
Please enter your server URL [t3://localhost:7001] : t3://identity.oracleads.com:7001


4. Run the below command to export  metadata files
exportMetadata(application='OIMMetadata', server='oim_server1', toLocation='/tmp/exportMetadata')


      5.   Data will be exported in given directory i.e /tmp/exportMetadata.


     
    # Steps to Import: Here I am using weblogicImportMetadata.sh utility to User.xml metadata file in my case.

     1. Create the directory where from where you want to import file and copy your modify metadata file. In my case I am importing User.xml after some modification.



    2. Go to cd $ORACLE_HOME/server/bin/ and modify weblogic.properties file according to your requirements.

 Note: metadata_from_loc and metadata_files path should be correct otherwise it will be import other location your file.
      wls_servername=oim_server1(This is name of OIM server, you can get server name from weblogic console)
     application_name= OIMMetadata ( oim if file is OOB file or OIMMetadata if this is custom file)
     metadata_from_loc= /tmp/export/oim/ (Location of directory on file system that contains file which you wish to import; used during import process)
     metadata_to_loc=/tmp/export/oim/  (Location of file on file system which you wish to import, used during import process)
     metadata_files=/file/User.xml (Name of file which you wish to export/import like /file/User.xml or user * which represents all files in that folder)


 
     
     3. Run weblogicImportMetadata.sh utility.

          Please enter your username :weblogic( User name should be weblogic)
        Please enter your password : *******(weblogic password)
        Please enter your server URL [t3://localhost:7001] : t3://identity.oracleads.com:7001


4. After import User.xml, export metadata files and verify that modified User.xml imported in /file directory or not.

5.   Check the oim servers logs for any error.



      Reference:
      https://docs.oracle.com/cd/E17904_01/doc.1111/e14309/utils.htm#OMDEV759

No comments:

Post a Comment

Get Decode Value From Lookup Using API

                                            Get Decode Value Lookup Using API package demo.com; import Thor.API.Exceptions.tcAPIExce...