ODI 11g – Scripting Repository Creation

Here’s a quick post on how to create both master and work repositories in one simple dialog, its using the groovy capabilities in ODI 11g and the groovy swing builder components. So if you want more/less take the groovy script and change, its easy stuff. The groovy script odi_create_repos.groovy is here, just open it in ODI before connecting and you will be able to create both master and work repositories with ease – or check the groovy out and script your own automation – you can construct the master, work and runtime repositories, so if you are embedding ODI as your DI engine this may be very useful.

When you click ‘Create Repository’ you will see the following in the log as the master repository starts to be created;

======================================================
Repository Creation Started....
======================================================
Master Repository Creation Started....

Then the completion message followed by the work repository creation and final completion message.

Master Repository Creation Completed.
Work Repository Creation Started.
Work Repository Creation Completed.
======================================================
Repository Creation Completed Successfully
======================================================
Script exited.

If any error is hit, the script just exits and prints any error to the log. For example if I enter no passwords, I will get this error;

======================================================
Repository Creation Started....
======================================================
Master Repository Creation Started....
======================================================
Repository Creation Complete in Error
======================================================
oracle.odi.setup.RepositorySetupException: oracle.odi.core.security.PasswordPolicyNotMatchedException: ODI-10189: Password policy MinPasswordLength is not matched.
======================================================
Script exited.

This is another example of using the ODI 11g SDK showing how to automate the construction of your data integration environment. The main interfaces and classes used here are IMasterRepositorySetup / MasterRepositorySetupImpl and IWorkRepositorySetup / WorkRepositorySetupImpl.

Comments:

There is an OBE describing how to create the master and work repositories using ODI below;

http://st-curriculum.oracle.com/obe/fmw/odi/odi_11g/ODImaster_work_repos/ODImaster_work_repos.htm

Cheers
David

Posted by David on June 20, 2012 at 10:11 AM PDT #

Hi David,

I was trying to develop sdk codes to create master repository in eclipse. But every time i am getting an exception "Scripts were not found".
What could be the reason.

Thanks
Bhabani

Posted by Bhabani on January 18, 2013 at 03:04 AM PST #

Hi Bhabani

You will also need oracledi.common\odi on your classpath when you execute.

I have my ODI installed in the D:\oracle\product\11.1.1\odi11116, so I added this to the classpath;
D:\oracle\product\11.1.1\odi11116\oracledi.common\odi

Then the classloader can find scripts/xml

Cheers
David

Posted by David on January 18, 2013 at 12:01 PM PST #

Absolutely correct. Thanks David.

Posted by Bhabani on January 21, 2013 at 12:31 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Learn the latest trends, use cases, product updates, and customer success examples for Oracle's data integration products-- including Oracle Data Integrator, Oracle GoldenGate and Oracle Enterprise Data Quality

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
2
3
5
6
7
8
9
10
12
13
14
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today