Thursday, September 3, 2009

Clone as new home

Scenario
While initialising Oracle home for oracle instance, not from a freshly installed home. Binaries are copied. I want to create a TEST database.
1.I have copied the 10.2.0 to a different location of freespace.
2.I relinked the binaries using (make -f ins_rdbms.mk ioracle)
3.I changed the tns and listener with a new port with TEST SID and home.
4.I tried to login with sysdba

Error found :
(1) ORA-12154: TNS: could not resolve the connect identifier specified
(OR)
(2) ORA-01034: ORACLE not available
ORA-27101: shared memory SVR4
Error: 2: No such file or directory

Solution:
First prepare oracle home
restore the dbf files to new location
recover this database with new name
run adcfgclone.pl dbconfig to configure new db.

In short:
1. adcfgclone.pl dbTechStack --> this will configre oracle home [will give the home]
under appsutil/clone/bin directory
[P.S#this will relink , prepare pfile, tnsnames.ora file , also listener.ora . you need to provide new values for instance. do not enter old values at all else it may overwrite original if possible use entirely different user fore new instance]
2. recover database manually with new name --> RMAN/sqlplus [will give database]
3. adcfgclone.pl dbconfig -> [update fnd tables]

Saturday, January 10, 2009

RMAN Incremental 0 backup script

The script I follow for rman incremental 0 backup

rman TARGET sys/manager@ORAUAT20
CATALOG rman_admin/rman_admin@ORAUAT1

Recovery Manager: Release 10.2.0.2.0 - Production on Wed Sep 3 02:56:08 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORAUAT20 (DBID=2473137357)
connected to recovery catalog database
RMAN> run {
SET MAXCORRUPT FOR DATAFILE 1 TO 40;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
allocate channel d1 type disk connect sys/manager@ORAUAT20;
allocate channel d2 type disk connect sys/manager@ORAUAT20;
sql 'alter database backup controlfile to trace';
crosscheck archivelog all;resync catalog;
backup incremental level=0 tag 'BCCS_ORAUAT20' format
'/orarstr/oracle/TEST/rman/arch/ORAUAT20/RMAN_BCCS_ORAUAT20_db_f_%T_%s.bak'
(database include current controlfile);
backup archivelog all format '/orarstr/oracle/TEST/rman/arch/ORAUAT20/RMAN_BCCS_ORAUAT20_arc_f_%T_%s.bak';
release channel d1;
release channel d2;
}

Thursday, January 1, 2009

Happy New Year

Today is 1st January 2009. From the last few years I was thinking of making a blogspot. My new year resolution that, I will maintain the blogspot regularly. Happy new year to all.

Thanks
Soumendu.