Wednesday, June 16, 2010

Using Oracle Repository Creation Utility (RCU) to create Metadata Repository


The previous installation of Oracle Database 11g R2 on Ubuntu 10.04 (Lucid) was successful. This article shows you how to use oracle RCU (repository creation utility) to create metadata repository on this database instance.

Step 1 - Get the Sun JDK (if you haven't done so)
Full instructions are available here http://www.ubuntugeek.com/how-install-sun-java-runtime-environment-jre-in-ubuntu-10-04-lucid-lynx.html. Note: If you don't wish to install a jdk right now, it is alright. You can still use the jdk that comes with rcu package. It is located under the jdk folder of rcuHome.

To install sun-jdk, do the following.


kj@oradb-lucid:~$ sudo add-apt-repository 'deb http://archive.canonical.com/ lucid partner'
kj@oradb-lucid:~$ sudo apt-get update
kj@oradb-lucid:~$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts


after the installation, voila...

kj@oradb-lucid:~$ java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)


Step 2 - Get the RCU package from Oracle download site.
Get the package from here.

Unzip the archive to a temp folder in your $HOME. On my machine, it is /home/kj/temp.

Step 3 - Ensure environment variables are properly set
On my machine, they are


ORACLE_SID=orcl
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
JAVA_HOME=/usr/lib/jvm/java-6-sun
PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/usr/local/bin:/usr/bin:/bin


If your default shell is bash, you can add these entries into your .bashrc file located under your $HOME directory.

I have these in mine for both oracle and myself.

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export JAVA_HOME=/usr/lib/jvm/java-6-sun
PATH=$ORACLE_HOME/bin:$PATH


Step 4 - Start your oracle instance (if it hasn't been started)
Login as oracle user

kj@oradb-lucid:~$ su - oracle
Password:
oracle@oradb-lucid:~$


* Check the env variables. You should have all the required vars, else, ensure your have performed step 3.

Start sqlplus

oracle@oradb-lucid:~$ sqlplus / 'as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 15 15:29:38 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.


Startup the database, it will mount and open if successful.

SQL> startup
ORACLE instance started.

Total System Global Area  431038464 bytes
Fixed Size            1337016 bytes
Variable Size          281020744 bytes
Database Buffers      142606336 bytes
Redo Buffers            6074368 bytes
Database mounted.
Database opened.


Quit the sqlplus

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Step 5 - start the listener using lsnrctl command

oracle@oradb-lucid:~$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-JUN-2010 15:35:12

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/oradb-lucid/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                15-JUN-2010 15:35:14
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oradb-lucid/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully


Note that the listener isn't listening to any service immediately after startup. Give your oracle instance sometime to register itself with the listener. Type lsnrctl status again to find out.

oracle@oradb-lucid:~$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-JUN-2010 15:37:20

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                15-JUN-2010 15:35:14
Uptime                    0 days 0 hr. 2 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oradb-lucid/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully


Step 6 - Ensure the system parameters values of the oracle instance meet the requirements.

The typical oracle 11g r2 installation should meet most of the requirements. RCU specifically requires processess to be 300 or more for WEBCENTER component. Other than this one, everything else works for me.

To alter the system parameter, connect to sqlplus as sysdba.

oracle@oradb-lucid:~$ sqlplus / as sysdba
Issue the following sql statement


SQL> ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
restart the db

SQL> shutdown immediate

SQL> startup


Step 5 - Run the rcu
Go to the folder where you have untar'ed. My was $HOME/temp/. Change directory to the bin folder. The installation script is located in $HOME/temp/rcu/bin. You can run the installation script as yourself instead of as oracle because by default oracle won't have sufficient privilege on your $HOME folder.

kj@oradb-lucid:~$ ./rcu 


Follow the instruction, enter the values as depicted in the screenshots of rcu here. You shouldn't face any problem during the installation as you have adjusted your DB system parameters.

The next step is to setup Oracle Weblogic Server that serves as the container for all Oracle SOA Suite components.

Good luck.

3 comments:

  1. rcu say invalid username/password????

    ReplyDelete
  2. Ubuntu, rcu say: Invalid username/password.
    Please enter valid username /password

    samantha_tabata@hotmail.com

    ReplyDelete
  3. Upss the user is system, sorry, thanks!!

    ReplyDelete