FYI a loopback driver can perform a query operation. A null driver returns nothing to a query operation.
Also they are different drivers as they use different Java classes:
com.novell.nds.dirxml.driver.nulldriver.NullDriverShim
vs
com.novell.nds.dirxml.driver.loopback.LoopbackDriverShim
Friday, May 20, 2011
ldapsearch strange results
Always make sure you use the -h option when using ldapsearch on Linux. Else it defaults to what's in the local ldap config (/etc/ldap.conf) which can result in some strange and unexpected results.
Wednesday, May 18, 2011
Clearing a lock in Oracle
I've been using Oracle's SQLDeveloper now for a while and found you can easily lock a table by not committing an update. Coming from a MySQL and MSSQL world I'm pretty used to updates committing by themselves. Here is how I cleared the lock:
Run this SQL to see what's locking what:
SELECT SUBSTR(TO_CHAR(session_id),1,5) "SID",
SUBSTR(lock_type,1,15) "Lock Type",
SUBSTR(mode_held,1,15) "Mode Held",
SUBSTR(blocking_others,1,15) "Blocking?"
FROM dba_locks
Use this command to get the serial number of the session:
SELECT s.inst_id,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND';
Use this command to kill the session that's holding the lock:
ALTER SYSTEM KILL SESSION ',';
e.g.
ALTER SYSTEM KILL SESSION '126,19703';
Some good references:
http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
http://www.broadh2o.net/docs/database/oracle/oracleLocks.html
Run this SQL to see what's locking what:
SELECT SUBSTR(TO_CHAR(session_id),1,5) "SID",
SUBSTR(lock_type,1,15) "Lock Type",
SUBSTR(mode_held,1,15) "Mode Held",
SUBSTR(blocking_others,1,15) "Blocking?"
FROM dba_locks
Use this command to get the serial number of the session:
SELECT s.inst_id,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND';
Use this command to kill the session that's holding the lock:
ALTER SYSTEM KILL SESSION '
e.g.
ALTER SYSTEM KILL SESSION '126,19703';
Some good references:
http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
http://www.broadh2o.net/docs/database/oracle/oracleLocks.html
Monday, May 16, 2011
Novell RBPM - How to fix %nrf-sod-root% error
Picked up the following error:
16/05/2011 12:41:38 ERROR [ObjectsLookup] Error encountered while executing the service com.novell.idm.nrf.ajaxservice.ObjectsLookup : Ldap error querying for results. Error: javax.naming.InvalidNameExcepti
on: %nrf-sod-root%: [LDAP: error code 34 - Invalid DN Syntax]; remaining name '%nrf-sod-root%'.
com.novell.srvprv.spi.vdata.exception.VirtualDataException: Ldap error querying for results. Error: javax.naming.InvalidNameException: %nrf-sod-root%: [LDAP: error code 34 - Invalid DN Syntax]; remaining na
me '%nrf-sod-root%'
16/05/2011 12:42:44 INFO [STDOUT] DEBUG [com.novell.soa.af.impl.core.ProvisioningRequestManager:getValidAttribute] ***** %%%TOP%%% ProvisioningRequestManager.getValidAttribute*****
16/05/2011 12:42:44 INFO [STDOUT] DEBUG [com.novell.soa.af.impl.core.ProvisioningRequestManager:getValidAttribute] going to return a value! values.get(0) = SoD Conflict Approval
Found that someone had deleted the SoDDefs Object.
How to Fix:
1) Recreate the SoDDefs Object.
2) Update the nrfSODContainer attribute on the configuration object under RoleConfig.
3) Flash the cache in the UA.
4) Happy days!
16/05/2011 12:41:38 ERROR [ObjectsLookup] Error encountered while executing the service com.novell.idm.nrf.ajaxservice.ObjectsLookup : Ldap error querying for results. Error: javax.naming.InvalidNameExcepti
on: %nrf-sod-root%: [LDAP: error code 34 - Invalid DN Syntax]; remaining name '%nrf-sod-root%'.
com.novell.srvprv.spi.vdata.exception.VirtualDataException: Ldap error querying for results. Error: javax.naming.InvalidNameException: %nrf-sod-root%: [LDAP: error code 34 - Invalid DN Syntax]; remaining na
me '%nrf-sod-root%'
16/05/2011 12:42:44 INFO [STDOUT] DEBUG [com.novell.soa.af.impl.core.ProvisioningRequestManager:getValidAttribute] ***** %%%TOP%%% ProvisioningRequestManager.getValidAttribute*****
16/05/2011 12:42:44 INFO [STDOUT] DEBUG [com.novell.soa.af.impl.core.ProvisioningRequestManager:getValidAttribute] going to return a value! values.get(0) = SoD Conflict Approval
Found that someone had deleted the SoDDefs Object.
How to Fix:
1) Recreate the SoDDefs Object.
2) Update the nrfSODContainer attribute on the configuration object under RoleConfig.
3) Flash the cache in the UA.
4) Happy days!
Saturday, May 7, 2011
MySQL Select Random Row
Found a good post here: http://www.greggdev.com/web/articles.php?id=6 on this.
Basically you just add this to your query -> "order by rand() limit 1"
e.g. select saying from sayings order by rand() limit 1
Basically you just add this to your query -> "order by rand() limit 1"
e.g. select saying from sayings order by rand() limit 1
Subscribe to:
Posts (Atom)