If resource status for user got stuck in 'Provisioning' status (for example becuase of adapter error), that problem can be solved by running the following sql statement:
UPDATE OIU SET OST_key=(Select ost_key from ost where obj_key=(select obj_key from obj where obj_name='RO') and OST_status='Status2') WHERE OST_key=(Select ost_key from ost where obj_key=(select obj_key from obj where obj_name='RO') and OST_status='Status1');
commit;
Where RO - resource name, Status2 = Provisioned/Revoked, Status1 = Provisioning (or any other 'bad' status).
For example, for AD User RO we must run the following query:
UPDATE OIU SET OST_key=(Select ost_key from ost where obj_key=(select obj_key from obj where obj_name='AD User') and OST_status='Revoked') WHERE OST_key=(Select ost_key from ost where obj_key=(select obj_key from obj where obj_name='AD User') and OST_status='Provisioning');
commit;
see also metalink (KB DocID 464074.1)
пятница, 9 октября 2009 г.
Connect2DB with VB
Define connection:
Dim strCon
strCon = "Driver={Microsoft ODBC for Oracle}; " & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST=mysrv)(PORT=7001))" & _
"(CONNECT_DATA=(SERVICE_NAME=MYDB))); uid=read;pwd=read;"
Dim oCon: Set oCon = WScript.CreateObject("ADODB.Connection")
Dim oRs: Set oRs = WScript.CreateObject("ADODB.Recordset")
oCon.Open strCon
As an option, we can use tnsnames file, where connect string oracle_server exists:
Dim connection, connectionString, theCommand, commandString
connectionString = "DRIVER={Microsoft ODBC for Oracle};SERVER=oracle_server;User Id=user;Password=password;"
Set connection = CreateObject("ADODB.Connection")
Set theCommand = CreateObject("ADODB.Command")
connection.Open connectionString
Example:
1. SELECT
Set rows = connection.Execute("select * from people where email = 'john@doe.com'")
While Not rows.EOF
'Get data fields
name = rows.Fields("name").Value
email = rows.Fields("email").Value
rows.MoveNext
Wend
2. INSERT
const cnstCommand = 1 'Query type - 1 (standard)
commandString = "INSERT INTO people (name, email) VALUES ('John Doe', 'john@doe.com');"
thecommand.CommandText = commandString
thecommand.CommandType = cnstCommand
thecommand.ActiveConnection = connection
thecommand.Execute
3. Stored procedure call
const cnstStoredProcedure = 4 'Command type - 4 (Stored procedure)
commandString = "STORED_PROCEDURE_NAME"
thecommand.CommandText = commandString
thecommand.CommandType = cnstStoredProcedure
thecommand.ActiveConnection = connection
thecommand.Execute
Dim strCon
strCon = "Driver={Microsoft ODBC for Oracle}; " & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST=mysrv)(PORT=7001))" & _
"(CONNECT_DATA=(SERVICE_NAME=MYDB))); uid=read;pwd=read;"
Dim oCon: Set oCon = WScript.CreateObject("ADODB.Connection")
Dim oRs: Set oRs = WScript.CreateObject("ADODB.Recordset")
oCon.Open strCon
As an option, we can use tnsnames file, where connect string oracle_server exists:
Dim connection, connectionString, theCommand, commandString
connectionString = "DRIVER={Microsoft ODBC for Oracle};SERVER=oracle_server;User Id=user;Password=password;"
Set connection = CreateObject("ADODB.Connection")
Set theCommand = CreateObject("ADODB.Command")
connection.Open connectionString
Example:
1. SELECT
Set rows = connection.Execute("select * from people where email = 'john@doe.com'")
While Not rows.EOF
'Get data fields
name = rows.Fields("name").Value
email = rows.Fields("email").Value
rows.MoveNext
Wend
2. INSERT
const cnstCommand = 1 'Query type - 1 (standard)
commandString = "INSERT INTO people (name, email) VALUES ('John Doe', 'john@doe.com');"
thecommand.CommandText = commandString
thecommand.CommandType = cnstCommand
thecommand.ActiveConnection = connection
thecommand.Execute
3. Stored procedure call
const cnstStoredProcedure = 4 'Command type - 4 (Stored procedure)
commandString = "STORED_PROCEDURE_NAME"
thecommand.CommandText = commandString
thecommand.CommandType = cnstStoredProcedure
thecommand.ActiveConnection = connection
thecommand.Execute
Connect2DB with BASH
#!/bin/bash
########################
export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=/u01/app/oracle/product/10.2.0;
export ORACLE_SID=orcl;
export PATH=$PATH:$ORACLE_HOME/bin:/bin:/sbin;
TEST=`sqlplus -s $USER/$PASSWORD@$NAMES << EOF
-- connect $USER/$PASSWORD@$NAMES
set heading off
set feedback off
whenever sqlerror exit;
-- session count
select count(*) from v\\$session;
exit;
EOF`
echo $TEST
sort by status
select status,count(*) from v\\$session group by status
and format it!
echo $TEST | sed -e 's/"//g' | sed -e 's/,/:/g'
########################
export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=/u01/app/oracle/product/10.2.0;
export ORACLE_SID=orcl;
export PATH=$PATH:$ORACLE_HOME/bin:/bin:/sbin;
TEST=`sqlplus -s $USER/$PASSWORD@$NAMES << EOF
-- connect $USER/$PASSWORD@$NAMES
set heading off
set feedback off
whenever sqlerror exit;
-- session count
select count(*) from v\\$session;
exit;
EOF`
echo $TEST
sort by status
select status,count(*) from v\\$session group by status
and format it!
echo $TEST | sed -e 's/"//g' | sed -e 's/,/:/g'
Useful OIM links@blogspot
Extremely useful OIM-IDM blog!
OIM 9.1 Metadata
http://rajnishbhatia19.blogspot.com/2008/09/oim-91-metadata.html
Executing VBScripts within OIM
http://rajnishbhatia19.blogspot.com/2008/07/executing-vbscripts-within-oim.html
Calling OIM User Operations from a JSP Web Page
http://rajnishbhatia19.blogspot.com/2007/08/calling-oim-user-operations-from-jsp.html
OIM 9.1 Metadata
http://rajnishbhatia19.blogspot.com/2008/09/oim-91-metadata.html
Executing VBScripts within OIM
http://rajnishbhatia19.blogspot.com/2008/07/executing-vbscripts-within-oim.html
Calling OIM User Operations from a JSP Web Page
http://rajnishbhatia19.blogspot.com/2007/08/calling-oim-user-operations-from-jsp.html
Рassing user defined fields in OIM to ORM
1. First use this command after login into SQL PLUS as appuser of ORM:
update FINALIZATION_LEASE set EXPIRATION = 0;
COMMIT;
2. Add this to OIM_INTEGRATION.xml
<parameter>
<source-name>USR_UDF_MYFIELD</source-name>
<dest-name>ormMyField</dest-name>
<dest-type>java.lang.String</dest-type>
<default>No value provided</default>
</parameter>
3. Modify the ...bizlogic.def/bizlogic.oim_integration.xml with something like:
<argument id="MyFieldName">
<title>MyFieldName</title>
<related-object-type>person</related-object-type>
<related-object-attribute>ormMyField</related-object-attribute>
</argument>
4. Deploy the modified car files
5. Add this entry to IMCONFIG.xml
<exported-fields>
<exported-field-group name="Users">
<fields>
<field name="USR_UDF_MYFILED">
</fields>
</exported-field-group>
</exported-fields>
update FINALIZATION_LEASE set EXPIRATION = 0;
COMMIT;
2. Add this to OIM_INTEGRATION.xml
<parameter>
<source-name>USR_UDF_MYFIELD</source-name>
<dest-name>ormMyField</dest-name>
<dest-type>java.lang.String</dest-type>
<default>No value provided</default>
</parameter>
3. Modify the ...bizlogic.def/bizlogic.oim_integration.xml with something like:
<argument id="MyFieldName">
<title>MyFieldName</title>
<related-object-type>person</related-object-type>
<related-object-attribute>ormMyField</related-object-attribute>
</argument>
4. Deploy the modified car files
5. Add this entry to IMCONFIG.xml
<exported-fields>
<exported-field-group name="Users">
<fields>
<field name="USR_UDF_MYFILED">
</fields>
</exported-field-group>
</exported-fields>
What's this blog about (dummy first post)
Hi!
In this blog I am going to post my notes on Identity and Access Management deployment tips
In this blog I am going to post my notes on Identity and Access Management deployment tips
Подписаться на:
Сообщения (Atom)