RAC on VMware

finaly, after one week of struggle i was able to built RAC on VMware. 

Few notes for quick refrence:

Stop the database and instance
srvctl stop database -d
stop the services
srvctl stop nodeapps -n
Stop CRS
as root
$CRS_HOME/bin/crsctl stop crs
or as root:
/sbin/init.d/init.crs stop

this Doc/Post is still in works..

Advertisements

Dropping and rebuilding dbconsole

Steps to drop DB Console:

  • emca -deconfig dbcontrol db

    STARTED EMCA at May 12, 2009 1:44:07 AM
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database SID: ora02

    Do you wish to continue? [yes(Y)/no(N)]: Y
    May 12, 2009 1:44:11 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /opt/local/oracle/product/10.2.0.4/cfgtoollogs/emca/ora02/emca_2009-05-12_01-44-07-AM.log.
    May 12, 2009 1:44:12 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
    INFO: Stopping Database Control (this may take a while) …
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at May 12, 2009 1:44:28 AM
    [oracle@dbrv2 bdump]$ /opt/local/oracle/product/admin/ora02/bdump->:dbrv2::[ora02]

 

Steps to create database dbconsole:

  • emca -config dbcontrol db

 
STARTED EMCA at May 12, 2009 1:46:05 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: Database SID: ora02
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
—————————————————————–

You have specified the following settings

Database ORACLE_HOME ……………. /opt/local/oracle/product/10.2.0.4

Database hostname ……………. dbrv2
Listener port number ……………. 1521
Database SID ……………. ora02
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: Y
May 12, 2009 1:46:26 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/local/oracle/product/10.2.0.4/cfgtoollogs/emca/ora02/emca_2009-05-12_01-46-05-AM.log.
May 12, 2009 1:46:28 AM oracle.sysman.emcp.EMReposConfig updateReposVars
SEVERE: File/directory /opt/local/oracle/product/10.2.0.4/sysman/emdrep/config/repository.variables does not exist
May 12, 2009 1:46:36 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) …
May 12, 2009 1:46:43 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -repos
May 12, 2009 1:46:43 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
WARNING: Configuring EM-Key failed.
May 12, 2009 1:46:43 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
WARNING: Error securing Database control.
May 12, 2009 1:46:43 AM oracle.sysman.emcp.EMDBPostConfig setWarnMsg
INFO: Error securing Database Control, Database Control has been brought up in non-secure mode. To secure the Database Control execute the following command(s):

1) Set the environment variable ORACLE_SID to ora02
2) /opt/local/oracle/product/10.2.0.4/bin/emctl stop dbconsole
3) /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -repos -sysman_pwd <>
4) /opt/local/oracle/product/10.2.0.4/bin/emctl secure dbconsole -sysman_pwd <>
5) /opt/local/oracle/product/10.2.0.4/bin/emctl start dbconsole

To secure Em Key, run /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -remove_from_repos -sysman_pwd <>
May 12, 2009 1:46:43 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) …
May 12, 2009 1:48:28 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
May 12, 2009 1:48:28 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://dbrv2:1158/em <<<<<<<<<<<>
4) /opt/local/oracle/product/10.2.0.4/bin/emctl secure dbconsole -sysman_pwd <>
5) /opt/local/oracle/product/10.2.0.4/bin/emctl start dbconsole

To secure Em Key, run /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -remove_from_repos -sysman_pwd <>
[oracle@dbrv2 bdump]$ /opt/local/oracle/product/admin/ora02/bdump->:dbrv2::[ora02]
> emctl status dbconsole
TZ set to US/Central
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
http://dbrv2:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
——————————————————————
Logs are generated in directory /opt/local/oracle/product/10.2.0.1/dbrv2_ora02/sysman/log
[oracle@dbrv2 bdump]$ /opt/local/oracle/product/admin/ora02/bdump->:dbrv2::[ora02]

On another note, for Linux servers make sure that Listener is not listening on loop back address.

If you have listener is using loop back (lo0) address, then its possible that dbconsole show status of listener as down.

Create RMAN catalog user and db catalog

Hello all,

Today I have been playing with rman on my 2nd’ry linux box and created rman reps for my test db:

Database info:

rma01 = rman catalog database.
ora02 = Database connecting to catalog DB.

Here are steps w/o explaination:

Step 1 connect to rman catalog DB:

SQL> conn / as sysdba;
Connected.
SQL>

SQL> select name from v$database;
NAME———RMA01
SQL>

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
——————————
SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS

Step 2 “Create and grant rman catalog repository user”:

SQL> CREATE USER rman_ora02 identified by xxxxx
TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE tools
QUOTA UNLIMITED ON tools;

User created.

SQL> GRANT RECOVERY_CATALOG_OWNER TO RMAN_ORA02;
Grant succeeded.

SQL>

Step 3 “Connect to catalog database(rma01) create rman catalog.”:

> rman catalog rman_ora02/xxxxx@rma01

Recovery Manager: Release 10.2.0.4.0 – Production on Mon May 11 17:19:19 2009

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

connected to recovery catalog database

RMAN> CREATE CATALOG;

recovery catalog created

RMAN>

Step 4: Now connecting from target database and register db:

> hostname
dbrv2
[oracle@dbrv2 rman]$ /opt/local/oracle/local/bin/rman->:dbrv2::[ora02]
> echo $ORACLE_SID
ora02
[oracle@dbrv2 rman]$ /opt/local/oracle/local/bin/rman->:dbrv2::[ora02]
>

> rman target / catalog rman_ora02/rman_ora02@rma01

Recovery Manager: Release 10.2.0.4.0 – Production on Mon May 11 22:26:00 2009

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

connected to target database: ORA02 (DBID=1191295042)
connected to recovery catalog database

RMAN>

If the database is not started, then start the DB.

RMAN> STARTUP;

–or–

RMAN> STARTUP MOUNT;

Mine is already up:

RMAN> startup

database is already started

RMAN>

————————————

RMAN> REGISTER DATABASE;

database registered in recovery catalog
starting full resync of recovery catalog

————————————

RMAN> list backup
2> ;

List of Backup Sets
===================

BS Key Size Device Type Elapsed Time Completion Time
——- ———- ———– ———— —————
71 114.19M DISK 00:00:14 03-FEB-09
BP Key: 74 Status: AVAILABLE Compressed: NO Tag: TAG20090203T221810
Piece Name: /u09/oradata/ora02_ora_df677888290_s1_s1

List of Archived Logs in backup set 71
Thrd Seq Low SCN Low Time Next SCN Next Time
—- ——- ———- ——— ———- ———
1 1 464631 03-FEB-09 474494 03-FEB-09
1 2 474494 03-FEB-09 505903 03-FEB-09
1 3 505903 03-FEB-09 513988 03-FEB-09

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
72 Full 521.41M DISK 00:01:04 03-FEB-09
BP Key: 75 Status: AVAILABLE Compressed: NO Tag: TAG20090203T221837
Piece Name: /u09/oradata/ora02_ora_df677888317_s2_s1
List of Datafiles in backup set 72
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
1 Full 514012 03-FEB-09 /u01/oradata/ora02/system01.dbf
2 Full 514012 03-FEB-09 /u01/oradata/ora02/undotbs01.dbf
3 Full 514012 03-FEB-09 /u01/oradata/ora02/sysaux01.dbf
4 Full 514012 03-FEB-09 /u01/oradata/ora02/users01.dbf

BS Key Size Device Type Elapsed Time Completion Time
——- ———- ———– ———— —————
73 17.50K DISK 00:00:01 03-FEB-09
BP Key: 76 Status: AVAILABLE Compressed: NO Tag: TAG20090203T221946
Piece Name: /u09/oradata/ora02_ora_df677888386_s3_s1

List of Archived Logs in backup set 73
Thrd Seq Low SCN Low Time Next SCN Next Time
—- ——- ———- ——— ———- ———
1 4 513988 03-FEB-09 514052 03-FEB-09

Step 5: Check if the database is register on catalog database:

RMAN> list backup
2> ;

List of Backup Sets
===================

BS Key Size Device Type Elapsed Time Completion Time
——- ———- ———– ———— —————
71 114.19M DISK 00:00:14 03-FEB-09
BP Key: 74 Status: AVAILABLE Compressed: NO Tag: TAG20090203T221810
Piece Name: /u09/oradata/ora02_ora_df677888290_s1_s1

List of Archived Logs in backup set 71
Thrd Seq Low SCN Low Time Next SCN Next Time
—- ——- ———- ——— ———- ———
1 1 464631 03-FEB-09 474494 03-FEB-09
1 2 474494 03-FEB-09 505903 03-FEB-09
1 3 505903 03-FEB-09 513988 03-FEB-09

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
72 Full 521.41M DISK 00:01:04 03-FEB-09
BP Key: 75 Status: AVAILABLE Compressed: NO Tag: TAG20090203T221837
Piece Name: /u09/oradata/ora02_ora_df677888317_s2_s1
List of Datafiles in backup set 72
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
1 Full 514012 03-FEB-09 /u01/oradata/ora02/system01.dbf
2 Full 514012 03-FEB-09 /u01/oradata/ora02/undotbs01.dbf
3 Full 514012 03-FEB-09 /u01/oradata/ora02/sysaux01.dbf
4 Full 514012 03-FEB-09 /u01/oradata/ora02/users01.dbf

BS Key Size Device Type Elapsed Time Completion Time
——- ———- ———– ———— —————
73 17.50K DISK 00:00:01 03-FEB-09
BP Key: 76 Status: AVAILABLE Compressed: NO Tag: TAG20090203T221946
Piece Name: /u09/oradata/ora02_ora_df677888386_s3_s1

List of Archived Logs in backup set 73
Thrd Seq Low SCN Low Time Next SCN Next Time
—- ——- ———- ——— ———- ———
1 4 513988 03-FEB-09 514052 03-FEB-09

Step 5: List the register database on catalog DB:

> sqlplus rman_ora02/xxxx@rma01

SQL*Plus: Release 10.2.0.4.0 – Production on Mon May 11 17:28:13 2009

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from db;

DB_KEY DB_ID HIGH_CONF_RECID LAST_KCCDIVTS HIGH_IC_RECID CURR_DBINC_KEY
———- ———- ————— ————- ————- ————–
1 1191295042 677846978 2 2

SQL>

Once Catalog user created and database is registered we should be able to take RMAN backup using rman catalog.

I will show in another episode how to take rman backup and list backup sets.