Oracle to Oracle
- Hi everyone
I´m trying to share info between a couple of Oracle tables in different servers. But I can´t make it happen, so I hope some of can give some advice. I already checked some similar questions on the Forum.
Scenario
Oracle servers
Server1
Server2
Windows 2003 EE SP2
Windows 2003 EE SP2
Oracle 10g (Release 2)
Oracle 10g (Release 2)
Kichitan DB
Lolo DB
Staff table
Staff table
EmployeeID
EmployeeID
First Name
First Name
Last Name
Last Name
Department
Department
All of them are the same data type (VCHAR and EmployeeID is primary key)
Servidor de ILM
Server1
Windows 2003 EE SP2
ILM 2007 FP1 EE 3.3.118.0
Oracle Administrator Tools (Management Console, Management tools, networking services, util, basic client sofware). 10.2.1
Oracle SQL Developer 1.5.5
MA´s
Oracle MA 1
person attributes
Metaverse attributes
EmployeeID ->
EmployeeID
First Name ->
Given Name
Last Name ->
Sn
Department ->
Department
All of them are Direct Import
Oracle MA 2
person attributes
Metaverse attributes
First Name
<- Given Name
Last Name
<- Sn
Department
<- Department
All of them are Direct Export
Provisioning code (MVExtension)As you can see I´m using the code tham somebody shared on another post
Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision
Try
If mventry.ObjectType.Equals("person") Then
Dim csentry As CSEntry
Dim OracleMA As ConnectedMA
OracleMA = mventry.ConnectedMAs("OracleKichitan MA")
Select Case OracleMA.Connectors.Count
Case 0
csentry = OracleMA.Connectors.StartNewConnector("person")
csentry("OBJECT_ID").Value = "{" + mventry.ObjectID.ToString.ToUpper() + "}"
csentry.CommitNewConnector()
Case 1
Exit Sub
Case Else
End Select
End If
Catch ex As Exception
Throw ex
End Try
Throw New EntryPointNotImplementedException()
End Sub
cheers and thanks for your help :)
- Edited bykichitan Monday, September 28, 2009 5:01 PMincomplete
Answers
- Hi kichitan,
Let review the configuration,
1- Make sure you can Import Data using First Management Agent, if you have problem with this grant Microsoft Identity Integration Server service account Full Control permissions to the root Oracle folder, for example C:\Oracle, and its subfolders.
2- you have to define a projection rule for the first Management agent.
3- in your code : OracleMA = mventry.ConnectedMAs("OracleKichitan MA") , is OracleKichitan MA your target Management agent. i can see it is your source, if so , replace with target manangement agent "Lolo DB". As the following : OracleMA = mventry.ConnectedMAs("OracleLolo MA")
4- this code may help you
ConnectedMA ma = mventry.ConnectedMAs[""OracleLolo MA];
ReferenceValue DN = ma.EscapeDNComponent(System.Guid.NewGuid().ToString());
if (mventry.ObjectType.Equals("person"))
{
if (ma.Connectors.Count < 1)
{
CSEntry csEntry = ma.Connectors.StartNewConnector("person");
csEntry.DN = DN; csEntry.CommitNewConnector();
}
}
5- Enable Provisioning Rules Extension
- On the Tools menu, click Configure Extensions .
- Click to select the Enable Provisioning Rules Extension check box, and then click OK .
take look at this article may help you : http://technet.microsoft.com/en-us/library/cc720671%28WS.10%29.aspx- Marked As Answer bykichitan Tuesday, September 29, 2009 3:39 PM
- As your target table does not contain this object id, you don't need it in your provisioning flows nor in your export flow rules. Instead, when you create your connector, you need to provide the content of your anchor attribute, which I presume is your EmployeeID. So, you will need to flow the value of EmployeeID into the MV (assuming you add an attribute called employeeID to the MV schema of person objects, or use another suitable attribute), and then use that to create the anchor in your second Oracle Connector Space.
So, that piece of code would become:
if (ma.Connectors.Count < 1)
{
csEntry csEntry = ma.Connectors.StartNewConnector("person");
csEntry("employeeID").Value = mventry("employeeID").Value;
csEntry.CommitNewConnector();
}
}
Paul Loonen (Avanade)- Marked As Answer bykichitan Tuesday, September 29, 2009 3:39 PM
All Replies
- Hi kichitan,
Let review the configuration,
1- Make sure you can Import Data using First Management Agent, if you have problem with this grant Microsoft Identity Integration Server service account Full Control permissions to the root Oracle folder, for example C:\Oracle, and its subfolders.
2- you have to define a projection rule for the first Management agent.
3- in your code : OracleMA = mventry.ConnectedMAs("OracleKichitan MA") , is OracleKichitan MA your target Management agent. i can see it is your source, if so , replace with target manangement agent "Lolo DB". As the following : OracleMA = mventry.ConnectedMAs("OracleLolo MA")
4- this code may help you
ConnectedMA ma = mventry.ConnectedMAs[""OracleLolo MA];
ReferenceValue DN = ma.EscapeDNComponent(System.Guid.NewGuid().ToString());
if (mventry.ObjectType.Equals("person"))
{
if (ma.Connectors.Count < 1)
{
CSEntry csEntry = ma.Connectors.StartNewConnector("person");
csEntry.DN = DN; csEntry.CommitNewConnector();
}
}
5- Enable Provisioning Rules Extension
- On the Tools menu, click Configure Extensions .
- Click to select the Enable Provisioning Rules Extension check box, and then click OK .
take look at this article may help you : http://technet.microsoft.com/en-us/library/cc720671%28WS.10%29.aspx- Marked As Answer bykichitan Tuesday, September 29, 2009 3:39 PM
Hi Ahmed
thanks for your awnser I already did all those points that you said, but now I got this new error when I run my sync profile on the oracle kichitan MA, and the Object_ID field was created on the Oracle staff table.Microsoft.MetadirectoryServices.NoSuchAttributeException: No such attribute "OBJECT_ID".
at Mms_Metaverse.MVExtensionObject.Provision(MVEntry mventry) in C:\Documents and Settings\miisadmin\MV prueba\MVExtensionP\MVExtensionP.vb:line 40
- would you please post code snippet of MVExtensionP.vb
www.rafieblog.com
you mean in the target table ?Hi Ahmed
thanks for your awnser I already did all those points that you said, but now I got this new error when I run my sync profile on the oracle kichitan MA, and the Object_ID field was created on the Oracle staff table.Microsoft.MetadirectoryServices.NoSuchAttributeException: No such attribute "OBJECT_ID".
at Mms_Metaverse.MVExtensionObject.Provision(MVEntry mventry) in C:\Documents and Settings\miisadmin\MV prueba\MVExtensionP\MVExtensionP.vb:line 40
i can't see any fields in the target csentry named " Object_ID " do you mean EmployeeID ?
www.rafieblog.comYes this Object_ID is in my target table.
this is the codePublic Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision
Try
If mventry.ObjectType.Equals("person") Then
Dim csentry As CSEntry
Dim OracleMA As ConnectedMA
OracleMA = mventry.ConnectedMAs("OracleLolo MA")
Dim DN As ReferenceValue = OracleMA.EscapeDNComponent(System.Guid.NewGuid().ToString())
Select Case OracleMA.Connectors.Count
Case 0
csentry = OracleMA.Connectors.StartNewConnector("person")
csentry.DN = DN
csentry.CommitNewConnector()
csentry("OBJECT_ID").Value = "{" + mventry.ObjectID.ToString.ToUpper() + "}"
csentry.CommitNewConnector()
Case 1
Exit Sub
Case Else
End Select
End If
Catch ex As Exception
Throw ex
End Try
Throw New EntryPointNotImplementedException()
End Sub
cheers
- try to add if condition before this line csentry("OBJECT_ID").Value = "{" + mventry.ObjectID.ToString.ToUpper() + "}" as the following:
If ( csentry("OBJECT_ID").IsPresent)
{
csentry("OBJECT_ID").Value = "{" + mventry.ObjectID.ToString.ToUpper() + "}"
}
you can debug to make sure that OBJECT_ID is Present in the csentry
www.rafieblog.com
Can you help me to undernstand the use of the "Object_Id" value in the code,I didnt get it yet ? I just take that from another post.
thnks :)- It depends, but if you just sync between these two management agents as you mentioned in your question, you don't need to use Obejct_Id outside ILM , i mean in the target MA. ILM use Object Id to identify the object. and the links between all obejcts are stored in ILM DB, so why no need to export Object_Id outside ILM.
www.rafieblog.com - As your target table does not contain this object id, you don't need it in your provisioning flows nor in your export flow rules. Instead, when you create your connector, you need to provide the content of your anchor attribute, which I presume is your EmployeeID. So, you will need to flow the value of EmployeeID into the MV (assuming you add an attribute called employeeID to the MV schema of person objects, or use another suitable attribute), and then use that to create the anchor in your second Oracle Connector Space.
So, that piece of code would become:
if (ma.Connectors.Count < 1)
{
csEntry csEntry = ma.Connectors.StartNewConnector("person");
csEntry("employeeID").Value = mventry("employeeID").Value;
csEntry.CommitNewConnector();
}
}
Paul Loonen (Avanade)- Marked As Answer bykichitan Tuesday, September 29, 2009 3:39 PM
Hi Ahmed and Paul
Thanks both for your help, I use my code plus the Ahmed first advice with the csEntry.CommitNewConnector() and then I added the Paul line csEntry("employeeID").Value = mventry("employeeID").Value;.
Thank you so much.