ODIExperts.com

The blog for Oracle Data Integrator ( ODI )

AUTOMIZE ODI REPOSITORY EXPORTS

This Post defines the simple process on how to setup automatic  daily backup of ODI Master and Work Repository. This process is especially important where there is no backup or improper schedule backup is carried out by DBAs.

Steps

Export Master Repository using ODIEXPORTMASTER
Export Work Repository using ODIEXPORTWORK
Refresh the Variable SYSDATE
Delete the Required day files using ODIDELETEFILE
Finally Send Mail for notification ( optional)

ODIEXPORTMASTER

Provide your target directory and give the zip file_name as

MASTER_REP_BACKUP_<%=odiRef.getSysDate(“dd-MM-yyyy”)%>.zip

This way Exported Master Repository is saved with Meaningful Filename and Date of the backup.

ODIEXPORTWORK

Repeat the above process for ODIEXPORTWORK

Provide your target directory and give the zip file_name as

WORK_REP_BACKUP_<%=odiRef.getSysDate(“dd-MM-yyyy”)%>.zip

Sample output of the above files.

Creating daily such Exports of  Repository won’t be an ideal solution,  so its good to delete the old archive and keep just two days of archive .

To do so , Please follow these simple steps.

Create a variable named ‘SYSDATE’ and write a following query

Here iam using -2 as i want to keep just two days of files and delete all the previous day files.Change this value according to your need.

ODIFILEDELETE

Call ‘ ODIFILEDELETE ‘ to delete the required files.

The Filename ‘ *_#SYSDATE.zip ‘ will delete the required day file. so if the sysdate is 23-09-2009 , the above command will delete 21-09-2009 files.

This simple procedure would enable you to have a simple backup of the Master and Work Repository especially in condition where there is no proper backup of Development database or backup is not being carried out at proper interval.

Schedule the Package using ODI Scheduler and schedule it accordingly and add odisendmail for any success or failure notification.

[ Note : No write permission should be given any ODI developer in the Archived Folder so that no one deletes the above file accidentally or corrupt them with improper handling. Only ODI should be have write access to this Folder]

If any error occurred and you are not being able to recover the Database or Repository ,these backup files can come into handy and using the right Import procedure the whole Development box can be brought back to action. Please keep looking into future post  of  ‘ odiexperts.com ‘ for how to do a proper Import without affecting objects Internal Id .

12 Comments

  1. Hi,

    The package is showing completed but there is no file showing up at the target directory.

  2. Hi

    I am not able to get the projects which I had created in ODI studio, can you please say me how you have got the details of the projects of the work repository,
    I have created projects in ODI console of WORKREP1. I am logging into ODI console with repository: WORKREPOSITORY and user: supervisor. then inside it is showing nothing about the work repository.

    please enlighten me or post about this. 🙁

    Thanks,
    Santhosh

  3. hi Kshitiz ,

    we have a problem where the dev box disk failed and no new backup. Is there a way that we can recover from the live environment from the xmls?

  4. Can anyone tell me exactly which classes are exported for each of the Snp class names a recursive export it taken?

    I’m building something to integrate ODI and SVN and need to know which to use recursive and which non recusive exports for.

    I don’t want scenarios only the source objects for check in/out to/from SVN.

    Thanks!

  5. Similaraly can we automize the backup for dataserver also?
    Thanks

    • You can use OdiExportObject and specify the CLASS_NAME=SnpConnect and specify the Internal Id of the data server for OBJECT_ID and give the File name in XML (ex. DATA_SERVER_ORCL.XML)

      At a time only one Dataserver can be exported so repeat the same for required number of Data server to be exported.

      Learn more about OdiExportObject through the Oracle Tools Reference Manual –

  6. Do i no need to take backup of scnarios xml files.As work repository have storage of meta data(information only not code) or any of SNP tables will have xml files stores.o do have backup of work repo. but will it be efficiant in case of server crash.

  7. will the code(xml scenario files)also get stored in work repository metadata.Which SNP table will have the files or i need to store xml files to have backup.if some crash happen will just backup of work repository and master repository enough and no need to take backup of files.As all snp tables of work repository have info not code stored.please clerify

    • Hi Ram

      To Answer your query , well when you take a back up of ODI MASTER and WORK Repository , you will have every objects including scenarios captured in the work_repository.zip . So you dont have to worry about backing up other things separately. ODI accordingly will create required XML files from the SNP tables automatically into respective XML.
      You can do sample testing by doing a backup of Work Repository and look into it and see how its storing data , that will answer all your queries.

      Hope that helps.

  8. Aproximately how long will it take to complete this backup of the master and work repository. For example i have master repositroy and work repository of size around 300 MB.

    Also during this export i am assuming i can not do the development in the work repository. Is it correct?

    • Hi Dhamod,

      Yes certainly , set the time using odi scheduler during the time when there is no development carried out. As there are chances of corruption or improper export when there is development activity being carried out.
      Secondly the export time depends on your Network speed and other hardware .

Leave a Reply

Required fields are marked *.