03 Aralık 2009

Getting Quick backup of AD users

ldifde -f exportUsers.ldf -s localhost -d "dc=oracle,dc=com" -p subtree -r "(objectCategory=Person)" -m

weblogic corrupts some folders after disk gets full

weblogic can get dirty and corrupt some of its folders after a disk full error of OS. One thing is Adminserver stalls and does not restart. If this is the case, one possible solution is to delete the "ldap" folder under user_projects/domains/yourdomain/servers/AdminServer/data/

It can also corrupt upload folders of Adminserver. If you see errors like
Unable to access the selected application
Exception in AppMerge flows' progression

in deployment console while installing ears from upload folders, this can be solved by deleting respective upload folder, recreating it and copying ear files back. then install.

02 Aralık 2009

Killing connected user sessions from an Oracle DB

Killing connected user sessions from an Oracle DB
select sid,serial# from v$session;

Use following in a RAC environment:
select sid,serial# from gv$session;
Output is something like this:
----- -----
xxx yyy

then for each row run:
alter system kill session 'xxx,yyy' immediate;

25 Eylül 2009

ORA-01102 Cannot mount database in Exclusive mode

1. Verify that there is not a "sgadef.dbf" file in the directory

% ls $ORACLE_HOME/dbs/sgadef.dbf

If this file does exist, remove it.

% rm $ORACLE_HOME/dbs/sgadef.dbf

2. Verify that there are no background processes owned by "oracle"

% ps -ef | grep ora_ | grep $ORACLE_SID

If background processes exist, remove them by using the Unix
command "kill". For example:

% kill -9

3. Verify that no shared memory segments and semaphores that are owned
by "oracle" still exist

% ipcs -b

If there are shared memory segments and semaphores owned by "oracle",
remove the shared memory segments

% ipcrm -m

and remove the semaphores

% ipcrm -s

NOTE: The example shown above assumes that you only have one
database on this machine. If you have more than one
database, you will need to shutdown all other databases
before proceeding with Step 4.

4. Verify that the "$ORACLE_HOME/dbs/lk" file does not exist

5. Startup the instance

25 Ağustos 2009

LDIF Notes 1: Adding / Deleting a user to/from a group using LDIF

Add user to group:
dn: cn=group,cn=Groups,dc=blah,dc=blah,dc=blaah
changetype: modify
add: uniquemember
uniquemember: cn=memberefendi,cn=Users,dc=blah,dc=blah,dc=blaah

Delete user from group:
dn: cn=group,cn=Groups,dc=blah,dc=blah,dc=blaah
changetype: modify
delete: uniquemember
uniquemember: cn=memberefendi,cn=Users,dc=blah,dc=blah,dc=blaah

13 Haziran 2009

adding an index to an attribute:


dn: cn=catalogs
changetype: modify
add: orclindexedattribute
orclindexedattribute: departmentnumber

ldapmodify -h localhost -p 389 -D "cn=orcladmin" -f addAttribute.txt

ps: there should not be any objects having this attribute. meaning: put the index first, then create/import objects.

Howto change query size in OID

OID defaults to 1000 entries for every search operation. Importing following ldif will change the orclsizelimit resultset size:


changetype: modify
replace: orclsizelimit
orclsizelimit: 50000

ldapmodify -h localhost -p 389 -D "cn=orcladmin" -f changeSize.txt

14 Mayıs 2009

Oracle Fusion Middleware Acronyms

Following is a list of acronyms we use specifically for fusion products:

ADF Oracle Application Development Framework
B2B Oracle B2B
BAM Oracle Business Activity Monitoring
BI Oracle Business Intelligence
BPA Oracle Business Process Analysis
BPEL Oracle BPEL Process Manager
BPM Oracle Business Process Management
CEP Oracle Complex Event Processing
DIP Oracle Directory Integration Platform
EM Oracle Enterprise Manager
EPM Oracle Enterprise Performance Management
ESSO Oracle Enterprise Single Sign-On
HPM Oracle Hyperion Performance Management
IPM Oracle Imaging and Process Management
IRM Oracle Information Rights Management
JDev Oracle JDeveloper
JRF Oracle Java Resource Files
OAAM Oracle Adaptive Access Manager
OAM Oracle Access Manager
OBI EE Oracle Business Intelligence Enterprise Edition
OC4J Oracle Containers for J2EE
ODI Oracle Data Integrator
ODSI Oracle Data Service Integrator
ODSM Oracle Directory Services Manager
OER Oracle Enterprise Repository
OES Oracle Entitlement Server
OIA Oracle Identity Analytics
OID Oracle Internet Directory
OIF Oracle Identity Federation
OIM Oracle Identity Management Services
ORM Oracle Role Manager
OSB Oracle Service Bus
OSR Oracle Service Registry
OVD Oracle Virtual Directory
OWCI Oracle WebCenter Interaction
OWSM Oracle Web Services Manager
PS Oracle Patch Set
SB FS Oracle Service Bus for Financial Services
SSO Oracle Single Sign-On
UCM Oracle Universal Content Management
WLI Oracle WebLogic Integration
WLOC Oracle WebLogic Operations Control
WLP Oracle WebLogic Portal
WLS Oracle WebLogic Server

05 Mayıs 2009

LDAP Admin 101

I am being an ldap guy these days so I need to keep track of what's going on.

Dealing with an ldap server (having ten thousands of objects) for 15 minutes and you'll see that a decent ldap client (i.e. Apache Directory Studio or LdapAdmin etc.) is quite painful to move object masses around. You will eventually need the following console commands, ldapsearch,ldapmodify,ldapadd and ldapdelete. These 4 will basically do almost everything you need ...
What I am dealing with currently is Oracle Internet Directory btw.

1. ldapsearch: Best way to count, sort, search and export massive objects.
To find out number of objects under a node, go with:

ldapsearch -h localhost -p 389 -x -s sub -b "cn=Users,dc=example,dc=com" -D "cn=orcladmin" -w welcome1 "objectclass=*" dn > searchMe.txt
This will put all dns under cn=Users to the txt file. You can tail it and see how many records it returns...

will go on this later...

03 Mayıs 2009

Import/Export Objects between two LDAP servers with ldapsearch, and ldapadd

I am having a lot of trouble with moving data between two ldap servers, with a GUI tool it really is messy, so I had to use good old fashioned console commands.

1. Export data into an ldif with ldapsearch:

ldapsearch -x -h [hostname] -p [port] -D [adminuserdn] -w [adminuserpassword] -b [searchbasedn] -s sub "objectclass=*" dn objectclass cn sn employeenumber > export.ldif

the stuff coming at the very end of the command is the list of attributes that I want to include in ldif. Default is include all.. If object has some attributes that is not allowed to be imported (like encrypted passwords etc.) you have to leave them out.

2. Import data into the target ldap server:
ldapadd -x -c -v -h [hostname] -p [port] -D [adminuserdn] -w [adminuserpassword] -f export.ldif -S export.ldif.log