OID – Sample LDIF

$ cat firstrun.ldif
dn:dc=com
objectclass: top
objectclass: domain
dc:com

dn:dc=oracle,dc=com
objectclass: top
objectclass: domain
dc:oracle

dn:dc=us,dc=oracle,dc=com
objectclass: top
objectclass: domain
dc:us

dn:cn=Users,dc=us,dc=oracle,dc=com
objectclass: top
objectclass: orclContainer
cn:Users

dn: cn=oiduser1,cn=users,dc=us,dc=oracle,dc=com
description: test user
sn: snoiduser1
uid: uidoiduser1
objectclass: top
objectclass: inetorgperson
objectclass: orcluser
objectclass: orcluserv2
cn: oiduser1
userpassword: welcome1

dn: cn=oiduser2,cn=users,dc=us,dc=oracle,dc=com
description: test user
sn: snoiduser2
uid: uidoiduser2
objectclass: top
objectclass: inetorgperson
objectclass: orcluser
objectclass: orcluserv2
cn: oiduser2

Enabling Database 12c in write mode

SQL> select name, open_mode from v$pdbs;

NAME OPEN_MODE
—————————— ———-
PDB$SEED READ ONLY
PDBORCL MOUNTED

SQL> alter pluggable database PDBORCL open;

Pluggable database altered.

SQL> select name, open_mode from v$pdbs;

NAME OPEN_MODE
—————————— ———-
PDB$SEED READ ONLY
PDBORCL READ WRITE

#.

> alter system set session_cached_cursors=100 scope=spfile;
> alter system set processes=500 scope=spfile;
> shutdown immediate;
> startup;
> alter system set aq_tm_processes=1 scope=both;
> alter system set open_cursors=800 scope=both;

RCU OID Silent Creation

# RCU Silent for creating OID Schema

# Pre-requisite:

SQL> GRANT EXECUTE ON sys.dbms_job TO PUBLIC;
SQL> GRANT EXECUTE ON dbms_reputil TO PUBLIC;

$ /scratch/binaries/rcu/rcu_11.1.2.1.0/rcuHome/bin/rcu -silent -createRepository -databaseType ORACLE -connectString localhost:1521:orcl1 -dbUser SYS -dbRole SYSDBA -component OID -f < ~/passwordfile.txt

$ cat passwordfile.txt
Welcome1
Welcome1

$ /scratch/binaries/rcu/rcu_11.1.2.1.0/rcuHome/bin/rcu -silent -dropRepository -databaseType ORACLE -connectString localhost:1521:orcl1 -dbUser SYS -dbRole SYSDBA -component OID -f < ~/passwordfile.txt

OID – Custom Schema

# Add attribute – llcSecretAttr :

cat > ~/add_attr1_to_schema.ldif

dn: cn=subschemasubentry
changetype: modify
add: attributetypes
attributetypes: ( 99.99.99.99.98 NAME ‘llcSecretAttr’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.44’ )

$ ldapmodify -h llcau3.oracle.com -p 3060 -D cn=orcladmin -w mypasswd -v -f ~/add_attr1_to_schema.ldif
# Add attribute to an objectclass

cat > ~/add_obj1_to_schema.ldif

dn: cn=subschemasubentry
changetype: modify
add: objectclasses
objectclasses: ( 99.99.99.99.99 NAME ‘llcTestObj’ SUP top STRUCTURAL MAY llcSecretAttr )
$ ldapmodify -h llcau3.oracle.com -p 3060 -D cn=orcladmin -w mypasswd -v -f ~/add_obj1_to_schema.ldif

OID – Generating Alert Logs

$ cat addPlugin.ldif
dn : cn=BindPlugInTest,cn=plugin,cn=subconfigsubentry
objectclass : top
objectclass : orclPluginConfig
cn : BindPlugInTest
orclpluginclassreloadenabled : 1
orclpluginenable : 1
orclpluginisreplace : 0
orclpluginkind : java
orclpluginldapoperation : ldapbind
orclpluginname : PostBind
orclpluginsubscriberdnlist : cn=users,dc=us,dc=oracle,dc=com
orclplugintiming : post
orclplugintype : operational
orclpluginversion : 1.0

-bash-4.1$ cat ~/plugindisable.ldif
dn: cn=BindPlugInTest,cn=plugin,cn=subconfigsubentry
changetype: modify
replace: orclpluginenable
orclpluginenable: 1

dn: cn=BindPlugInTest,cn=plugin,cn=subconfigsubentry
changetype: modify
replace: orclpluginenable
orclpluginenable: 0

# execute ~/plugindisable.ldif within ldapmodify to generate the logs.