Tuesday, 13 September 2011

code to update a attribute in OIM

public void updateofficecode(String uid,String locat){
System.out.println("Inside officecode method");
HashMap usermap=new HashMap();
HashMap code=new HashMap();
try{
usermap.put("Users.User ID", uid);
System.out.println("UID==>"+uid);
tcResultSet moresult=moUserUtility.findUsers(usermap);
System.out.println("Officecode==>"+officecode);
code.put("Users.User ID", uid);
code.put("Users.locat){",locat){);
moUserUtility.updateUser(moresult, code);
System.out.println("locat updated");

}catch(Exception e){
System.out.println("Exception occured-->"+e);

}
}

Updating failover URL in OIM

1.Without failover URL

In the DirectDB section use the below in the url

jdbc:oracle:thin:@IP:PORT:SERVICENAME

2.With failover URL

In the DirectDB section use the below in the url

jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST = IPaddressnode1)(PORT = portno))(ADDRESS = (PROTOCOL = TCP)(HOST = IPaddressnode1)(PORT = portno)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=Sevicename)))

Starting a oracle database

First step is to set the environmental variable.In my case it is devel.env

Login to sqlplus--->sqlplus /nolog
sql>conn /as sysdba
sql>startup;
sql>quit
#ps -ef | grep tns

To Start the Listener

#lsnrctl start LISTENERNAME

To check if the listener is running

#ps -ef | grep tns