Enter Your Email

Enter your email address:

Delivered by FeedBurner

Custom Search

Wednesday, December 05, 2007

RMAN :: Clone Database to UAT - FTP to a different location

RMAN: Database Clone/Refresh from Production Server to a UAT/Development Server. Test case: (RMAN BACKUP LOCATION is not the same as of the Production).
1. Production Server
oracledb1-> tail -3 /etc/oratab
dgtest:/u01/app/oracle/product/10.2.0/db_1:Y
dataware:/u01/app/oracle/product/10.2.0/db_1:Y
oracledb1->

2. UAT Server (Target Server to clone the database)
oracledb2-> tail -3 /etc/oratab
# Multiple entries with the same $ORACLE_SID are not allowed.
oracledb2->
You can see the Server is clean.
We are now going to restore & recover a Database with SID “Dataware” to on the UAT server.
3. Make sure that you have exact file system and mount points available on the Target server.
I am going to create the directory structure for BACKGROUND Dump locations and for Database file System exactly as in the Production server. In fact in most case’s the environment will be same.

oracledb1-> pwd
/u01/app/oracle/admin/dataware
oracledb1-> ls -ltr
total 88
drwxr-x--- 2 oracle oinstall 4096 Jul 21 13:39 dpdump
drwxr-x--- 2 oracle oinstall 4096 Jul 21 13:39 cdump
drwxr-x--- 2 oracle oinstall 4096 Jul 21 13:44 pfile
drwxr-x--- 2 oracle oinstall 4096 Nov 24 12:32 udump
drwxr-x--- 2 oracle oinstall 36864 Nov 24 12:33 bdump
drwxr-x--- 2 oracle oinstall 12288 Nov 24 12:34 adump
oracledb1->
********************************************************
oracledb2-> mkdir dataware
oracledb2-> cd dataware
oracledb2-> mkdir dpdump cdump pfile udump bdump adump
oracledb2-> ls -ltr
total 48
drwxr-xr-x 2 oracle oinstall 4096 Dec 5 13:04 udump
drwxr-xr-x 2 oracle oinstall 4096 Dec 5 13:04 pfile
drwxr-xr-x 2 oracle oinstall 4096 Dec 5 13:04 dpdump
drwxr-xr-x 2 oracle oinstall 4096 Dec 5 13:04 cdump
drwxr-xr-x 2 oracle oinstall 4096 Dec 5 13:04 bdump
drwxr-xr-x 2 oracle oinstall 4096 Dec 5 13:04 adump
oracledb2-> pwd
/u01/app/oracle/admin/dataware
**********************************************************
oracledb2-> pwd
/oradata/dataware
oracledb2-> ls -ltr
total 8
drwxr-xr-x 2 oracle oinstall 4096 Dec 5 13:09 arch
oracledb2->
*** If the database as a Flash Recovery area enable make sure that you care the directory for that as well.
*********************************************
4. On the Production Database create pfile from spfile, where we are going to have a copy of that.
SQL> !hostname
oracledb1.mycorpdomain.com
SQL> create pfile='/oradata/backup/initdataware.ora' from spfile;
File created.
SQL> !ls -ltr /oradata/backup/
total 8
-rw-r--r-- 1 oracle oinstall 1143 Dec 5 13:03 initdataware.ora
***********
Connect to the Production database with RMAN,
oracledb1-> rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Fri Dec 5 13:05:47 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DATAWARE (DBID=197345076)
RMAN>
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/backup/dataware/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/backup/dataware/%U';
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oradata/backup/dataware/snapcf_dataware.f';
RMAN> backup database plus archivelog;
Starting backup at 05-DEC-07
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=143 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=56 recid=54 stamp=670070919
piece handle=/oradata/backup/dataware/0sk1ga0l_1_1 tag=TAG20071205T131604 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:35
Finished backup at 05-DEC-07
Starting backup at 05-DEC-07
current log archived
using channel ORA_DISK_1
piece handle=/oradata/backup/dataware/0tk1ga3l_1_1 tag=TAG20071205T131741 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 05-DEC-07

Starting Control File and SPFILE Autobackup at 05-DEC-07
piece handle=/oradata/backup/dataware/c-197345076-20071205-00 comment=NONE
Finished Control File and SPFILE Autobackup at 05-DEC-07
5. We have a backup of the Production Database; we are now going to FTP this to the UAT / Development Site. In fact when we do the refresh or clone, we use Tapes to restore the previous Images of the backup’s. As this is just a Test scenario I am not worried about the additional load on the Network and of course taking backup at odd times.
oracledb1-> sftp 192.168.2.135
Connecting to 192.168.2.135...
oracle@192.168.2.135's password:
Permission denied, please try again.
oracle@192.168.2.135's password:
sftp> pwd
Remote working directory: /oradata/rman/dataware
6. Login to the UAT server and copy the init parameter file to ORACLE_HOME/dbs location.
oracledb2-> cp -p initdataware.ora $ORACLE_HOME/dbs/
7. Startup the Database in nomount Stage to perform the Control file Restore
oracledb2-> export ORACLE_SID=dataware
oracledb2-> rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Fri Dec 5 14:02:14 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 184549376 bytes
Fixed Size 1260792 bytes
Variable Size 159384328 bytes
Database Buffers 20971520 bytes
Redo Buffers 2932736 bytes
RMAN> restore controlfile from
2> '/oradata/rman/dataware/snapcf_dataware.f';
Starting restore at 05-DEC-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: copied control file copy
output filename=/oradata/dataware/control01.ctl
Finished restore at 05-DEC-07
8. Mount the Database and restore all the archive log files to start the Recovery of the Database at UAT.
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
*** Recovering all the archivelog files....
RMAN> restore archivelog all;
Starting restore at 05-DEC-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/05/2007 14:06:30
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 1 seq 36 lowscn 866178 found to restore
WHY THE ABOVE ERROR? # This is what the problem I faced...
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/backup/dataware/%F'; ## See its poiting to a different mount point
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/backup/dataware/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_dataware.f'; # default
*** So i changed the mount points on the UAT Server...will this work?

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/rman/dataware/%F';
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/backup/dataware/%F';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oradata/rman/dataware/%F';
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/rman/dataware/%U';
old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/backup/dataware/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/rman/dataware/%U';
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
*********
RMAN> restore archivelog all from
2> '/oradata/rman/dataware/0sk1ga0l_1_1';
Starting restore at 05-DEC-07
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/05/2007 14:20:40
RMAN-06509: only SPFILE or control file can be restored from autobackup
No...
Why it’s happening like this?
and...
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
27 Full 782.38M DISK 00:01:26 05-DEC-07
BP Key: 25 Status: AVAILABLE Compressed: NO Tag: TAG20071205T131604
Piece Name: /oradata/backup/dataware/0sk1ga0l_1_1
List of Datafiles in backup set 27
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1486233 05-DEC-07 /oradata/dataware/system01.dbf
3 Full 1486233 05-DEC-07 /oradata/dataware/sysaux01.dbf
8 Full 1486233 05-DEC-07 /oradata/dataware/students.dbf
and what i found is the control file which we restored before as cataloged with different backup tag and sets with different backup locations.
So we need to catalog the newly moved (FTP Location) files.
RMAN> catalog backuppiece '/oradata/rman/dataware/0rk1g9vo_1_1';
cataloged backuppiece
backup piece handle=/oradata/rman/dataware/0rk1g9vo_1_1 recid=27 stamp=672675911
RMAN> catalog backuppiece '/oradata/rman/dataware/0sk1ga0l_1_1';
cataloged backuppiece
backup piece handle=/oradata/rman/dataware/0sk1ga0l_1_1 recid=28 stamp=672675927
RMAN> catalog backuppiece '/oradata/rman/dataware/0tk1ga3l_1_1';
cataloged backuppiece
backup piece handle=/oradata/rman/dataware/0tk1ga3l_1_1 recid=29 stamp=672675936
RMAN> catalog backuppiece '/oradata/rman/dataware/c-197345076-20071205-00';
cataloged backuppiece
backup piece handle=/oradata/rman/dataware/c-197345076-20071205-00 recid=30 stamp=672675947
ALL SET # TO CHECK
RMAN> list backuppiece '/oradata/rman/dataware/0rk1g9vo_1_1';
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
27 26 1 2 AVAILABLE DISK /oradata/rman/dataware/0rk1g9vo_1_1
RMAN> run {
2> set until sequence 88 thread 1;
3> restore database;
4> recover database;
5> sql 'alter database open resetlogs';
6> }
executing command: SET until clause
Starting restore at 05-DEC-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oradata/dataware/system01.dbf
restoring datafile 00007 to /oradata/dataware/tsa01.dbf
restoring datafile 00007 to /oradata/dataware/students.dbf
channel ORA_DISK_1: reading from backup piece /oradata/rman/dataware/10k1gffk_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rman/dataware/10k1gffk_1_1 tag=TAG20071205T144924
channel ORA_DISK_1: restore complete, elapsed time: 00:01:37
Finished restore at 05-DEC-07
Starting recover at 05-DEC-07
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=86
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=87
channel ORA_DISK_1: reading from backup piece /oradata/rman/dataware/13k1gfkd_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rman/dataware/13k1gfkd_1_1 tag=TAG20071205T145156
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archive log filename=/oradata/dataware/arch/1_86_660663669.arc thread=1 sequence=86
archive log filename=/oradata/dataware/arch/1_87_660663669.arc thread=1 sequence=87
media recovery complete, elapsed time: 00:00:02
Finished recover at 05-DEC-07
sql statement: alter database open resetlog

Any options away from this please let me know...which is more easy than this.

Reference: Oracle Document 10G RMAN :-) Always at help.

Saturday, August 18, 2007

ORA-1503: Create Controlfile Failed: DBCA on RAC Database

ORA-01503: create contolfile failed
ORA-01565: error in identifying file:
I dont know why this error rised, i aborted the operation, and tried again
which worked fine...


CRS-0215: Could not start resource

















Few Issues i faced, during setting up Oracle RAC10gR2 on Solaris 64 bit.
I could able to resolve this issues, removing the resource manually using
srvctl. : Notes on this will be updated soon....

Wednesday, August 15, 2007

ASMCMD & kfod command in Linux

rac1-> kfod disks=all-------------------------------------------------------------------------------- Disk Size Path================================================================================ 1: 3067 Mb ORCL:VOL1
2: 3067 Mb ORCL:VOL2
3: 2047 Mb ORCL:VOL3
4: 1019 Mb ORCL:VOL4
----------------------------------------------------------------------------ORACLE_SID ORACLE_HOME
======================================================
+ASM1 /u01/app/oracle/product/10.2.0/db_1 +ASM2 /u01/app/oracle/product/10.2.0/db_1 +ASM3 /u01/app/oracle/product/10.2.0/db_1


I found this command more useful, to list ASM Diks and VOLUME Information

Monday, July 30, 2007

ERROR: ORA-12514: TNS:listener does not currently know of service

To avoid the following Error: ORA-12514, i always follow the below way to configure tnsnames.ora and listener.ora.
oracledb1-> sqlplus scott@dgtest
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Jul 30 12:04:04 2007
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter password:
Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - ProductionWith the Partitioning, OLAP and Data Mining options
SQL> show userUSER is "SCOTT"

SQL>
************************************************
Listener.ora Configuration
oracledb1-> cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = dgtest)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = dgtest)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.134)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
***********************************************************

tnsnames.ora ->

oracledb1-> cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_DATAWARE =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.134)(PORT = 1522))
DGTEST_SD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.135)(PORT = 1522))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dgtest)
)
)
DATAWARE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.134)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dataware)
)
)
DGTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.134)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dgtest)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
LISTENER_DGTEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.134)(PORT = 1522))

*********************************************************
Please let me know any other way to go with...

Sunday, July 22, 2007

Oracle RAC 10gR2: Adding a Node to a Cluster

I will update the notes soon...












































Tuesday, June 26, 2007

OCR - Backups: Oracle Real Application Clusters

1. Recent Copies of OCR Backups?
acmrac2-> ocrconfig -showbackup
rac1 2007/06/26 06:33:12 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs
rac1 2007/06/26 02:33:12 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs
rac1 2007/06/25 22:33:11 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs
rac1 2007/06/25 15:09:34 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs
rac1 2007/06/17 17:56:06 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

2. You can use OCRDUMP to review the contents of the backup.
$ ocrdump -backupfile file_name # file_name is the name of the backup file.
3. What is the frequency of OCR backups automatically done by Oracle Clusteware?
Oracle Clusterware automatically creates OCR backups every 4 hours, each full day and at the end of each week.
More Info on OCR administration:
Refer Administering Oracle Clusterware components.

Sunday, June 17, 2007

Oracle 10g RMAN Cold Backup

oracledb1-> rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Thu May 15 12:47:34 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DGPRD (DBID=223112954)
RMAN> run {
2> #Shutdown Target Database DGPRD For Cold Backup
3> shutdown immediate
4> #Startup Mount, Once the Cold Backup Finishes
5> startup mount
6> #Allocate Channel Now
7> allocate channel c1 TYPE DISK;
8> BACKUP DATABASE FORMAT '/oradata/rman/%d_COLD_%u';
9> #One Backup Completes - Open the database
10> sql 'alter database open';
11> backup current controlfile;
12> sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE';
13> release channel c1;
14> }
using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area 167772160 bytes
Fixed Size 1260696 bytes
Variable Size 88081256 bytes
Database Buffers 75497472 bytes
Redo Buffers 2932736 bytes

allocated channel: c1
channel c1: sid=157 devtype=DISK

Starting backup at 15-MAY-07
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oradata/dgprd/system01.dbf
input datafile fno=00003 name=/oradata/dgprd/sysaux01.dbf
input datafile fno=00005 name=/oradata/dgprd/example01.dbf
input datafile fno=00002 name=/oradata/dgprd/undotbs01.dbf
input datafile fno=00004 name=/oradata/dgprd/users01.dbf
channel c1: starting piece 1 at 15-MAY-07
channel c1: finished piece 1 at 15-MAY-07
piece handle=/oradata/rman/DGPRD_COLD_02jgef91 tag=TAG20080515T125704 comment=NONE
channel c1: backup set complete, elapsed time: 00:01:45
Finished backup at 15-MAY-07

Starting Control File and SPFILE Autobackup at 15-MAY-07
piece handle=/oradata/dgprd/flash_recovery_area/DGPRD_PR/autobackup/2008_05_15/o1_mf_s_654785806_42rtyfgg_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 15-MAY-07

sql statement: alter database open
Starting backup at 15-MAY-07
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
channel c1: starting piece 1 at 15-MAY-07
channel c1: finished piece 1 at 15-MAY-07
piece handle=/oradata/dgprd/flash_recovery_area/DGPRD_PR/backupset/2008_05_15/o1_mf_ncnnf_TAG20080515T125924_42rtzh7l_.bkp tag=TAG20080515T125924 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 15-MAY-07
\
Starting Control File and SPFILE Autobackup at 15-MAY-07
piece handle=/oradata/dgprd/flash_recovery_area/DGPRD_PR/autobackup/2008_05_15/o1_mf_s_654785968_42rtzltr_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 15-MAY-07

sql statement: ALTER DATABASE BACKUP CONTROLFILE TO TRACE
released channel: c1

RMAN>

Tuesday, June 12, 2007

RMAN: Database Clone, Refresh for Development

UAT Refresh with RMAN
Production site
oracledb1-> hostname
oracledb1.mycorpdomain.com
UAT
oracledb2-> hostname
oracledb2.mycorpdomain.com
1. Create the File system for Backup Dump on the UAT server
oracledb2-> cd dgprd
oracledb2-> mkdir adump bdump cdump udump pfile dpdump
oracledb2-> pwd
/u01/app/oracle/admin/dgprd
oracledb2-> ls -ltr
total 48
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:59 udump
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:59 pfile
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:59 dpdump
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:59 cdump
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:59 bdump
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:59 adump
2. Create the File system for the Oradata, RMAN, FLASH_RECOVERY_AREA on the UAT
oracledb2-> ls -ltr
total 40
drwx------ 2 root root 16384 Mar 28 13:57 lost+found
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:52 rman
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:52 dgprd
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 10:53 flash_recovery_area
3. List Incarnation - Test
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 DGPRD 224754742 CURRENT 1 02-JUN-07
4. Database Uptime, on Production - 2 Ways
SQL> !ps -efgrep pmon
oracle 3877 1 0 10:34 ? 00:00:00 ora_pmon_dgtest
oracle 5092 1 0 11:03 ? 00:00:00 ora_pmon_dgprd
SQL> select to_char(startup_time, 'DD-MON-YYYY HH24:MI:SS') "DB Startup Time"
2 FROM sys.v_$instance;
DB Startup Time
--------------------
02-JUN-2007 11:03:14
5. Create a pfile from spfile on the Production database(It will be done at the backup time)
SQL> create pfile='/oradata/rman/initdgprd.ora' from spfile;
File created.
SQL> !ls -ltr /oradata/rman/
total 6920
-rw-r----- 1 oracle oinstall 7061504 Jun 2 11:07 snapcontrolfile_dgprd.f
-rw-r--r-- 1 oracle oinstall 1025 Jun 2 11:23 initdgprd.ora
6. Configure the device type and the FTP location
RMAN> configure channel device type disk format '/oradata/rman/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/rman/%U';
new RMAN configuration parameters are successfully stored

******************** BACKUP DATABASE on PRODUCTION NOW *******************
7. RMAN> backup database plus archivelog;
Starting backup at 02-JUN-07
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 02-JUN-07
Starting backup at 02-JUN-07
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
Finished backup at 02-JUN-07
Starting backup at 02-JUN-07
Finished backup at 02-JUN-07
Starting Control File and SPFILE Autobackup at 02-JUN-07
piece handle=/oradata/flash_recovery_area/DGPRD/autobackup/2007_06_02/o1_mf_s_656336693_4485cp8x_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 02-JUN-07
RMAN>
***************************************************************************
8. NOW FTP THE FILEs !!!! Nothing but as Restoring from the TAPE backup.
*********************************************************************************************
oracledb1-> sftp 192.168.2.135
Connecting to 192.168.2.135...
The authenticity of host '192.168.2.135 (192.168.2.135)' can't be established.
RSA key fingerprint is 32:ff:dd:a1:36:1c:0c:71:8a:ef:ad:09:73:ec:e4:1c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.2.135' (RSA) to the list of known hosts.
oracle@192.168.2.135's password:
sftp> pwd
Remote working directory: /export/home/oracle
sftp> cd /oradata
sftp> cd rman
snapcontrolfile_dgprd.f 100% 6896KB 6.7MB/s 00:01
sftp> mput *
Uploading 01jhtpnp_1_1 to /oradata/rman/01jhtpnp_1_1
01jhtpnp_1_1 100% 8811KB 8.6MB/s 00:00
Uploading 02jhtpns_1_1 to /oradata/rman/02jhtpns_1_1
02jhtpns_1_1 100% 553MB 8.1MB/s 01:07
Uploading 03jhtppj_1_1 to /oradata/rman/03jhtppj_1_1
03jhtppj_1_1 100% 2560 2.5KB/s 00:00
Uploading initdgprd.ora to /oradata/rman/initdgprd.ora
initdgprd.ora 100% 1025 1.0KB/s 00:00
Uploading snapcontrolfile_dgprd.f to /oradata/rman/snapcontrolfile_dgprd.f
snapcontrolfile_dgprd.f 100% 6896KB 6.7MB/s 00:01
***********************************************************************************************************
9. Login to the UAT server
1. Copy the Parameter file to the dbs location
/oradata/rman
oracledb2-> cp -p initdgprd.ora /u01/app/oracle/product/10.2.0/db_1/dbs/
oracledb2-> pwd
/oradata/rman
2. Perform Controlfile Restore *************************************************
oracledb2-> rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Mon Jun 2 11:57:50 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/initdgprd.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started

Total System Global Area 159383552 bytes
Fixed Size 1260648 bytes
Variable Size 58721176 bytes
Database Buffers 96468992 bytes
Redo Buffers 2932736 bytes
RMAN> shutdown abort;
Oracle instance shut down
******************** COPY the parameter file ****************
oracledb2-> cp -p initdgprd.ora /u01/app/oracle/product/10.2.0/db_1/dbs/
oracledb2-> pwd
***************************************************************
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 167772160 bytes
Fixed Size 1260696 bytes
Variable Size 67109736 bytes
Database Buffers 96468992 bytes
Redo Buffers 2932736 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 02-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
recovery area destination: /oradata/flash_recovery_area
database name (or database unique name) used for search: DGPRD
channel ORA_DISK_1: no autobackups found in the recovery area
autobackup search outside recovery area not attempted because DBID was not set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/02/2007 12:02:16
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece

RMAN> restore controlfile from '/oradata/rman/snapcontrolfile_dgprd.f';

Starting restore at 02-JUN-07
using channel ORA_DISK_1

channel ORA_DISK_1: copied control file copy
output filename=/oradata/dgprd/control01.ctl
output filename=/oradata/dgprd/control02.ctl
output filename=/oradata/dgprd/control03.ctl
Finished restore at 02-JUN-07

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1
9 ****** Recover the Database Until time ***************************************
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> restore archivelog all;
Starting restore at 02-JUN-07
Starting implicit crosscheck backup at 02-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 8 objects
Finished implicit crosscheck backup at 02-JUN-07

Starting implicit crosscheck copy at 02-JUN-07
using channel ORA_DISK_1
Finished implicit crosscheck copy at 02-JUN-07

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /oradata/flash_recovery_area/DGPRD/autobackup/2007_06_02/o1_mf_n_656339154_4487rn3f_.bkp

using channel ORA_DISK_1

channel ORA_DISK_1: starting archive log restore to default destination
>>>Removed Few

archive log thread=1 sequence=71
channel ORA_DISK_1: reading from backup piece /oradata/rman/05jhtsib_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rman/05jhtsib_1_1 tag=TAG20070602T123211
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=72
channel ORA_DISK_1: reading from backup piece /oradata/rman/07jhtsk5_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rman/07jhtsk5_1_1 tag=TAG20070602T123309
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 02-JUN-07
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 DGPRD 224754742 PARENT 1 02-JUN-07
2 2 DGPRD 224754742 CURRENT 225172 02-JUN-07
RMAN> reset database to incarnation 1;
database reset to incarnation 1
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 DGPRD 224754742 CURRENT 1 02-JUN-07
2 2 DGPRD 224754742 ORPHAN 225172 02-JUN-07

RMAN> run {
2> set until time "to_date('02-JUNE-2007 12:20:00','DD-MON-YYYY HH24:MI:SS')";
3> restore database;
4> recover database;
5> sql 'alter database open resetlogs';
6> }

executing command: SET until clause

Starting restore at 02-JUN-07
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oradata/dgprd/system01.dbf
restoring datafile 00002 to /oradata/dgprd/undotbs01.dbf
restoring datafile 00003 to /oradata/dgprd/sysaux01.dbf
restoring datafile 00004 to /oradata/dgprd/users01.dbf
channel ORA_DISK_1: reading from backup piece /oradata/rman/02jhtpns_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rman/02jhtpns_1_1 tag=TAG20070602T114355
channel ORA_DISK_1: restore complete, elapsed time: 00:00:56
Finished restore at 02-JUN-07

Starting recover at 02-JUN-07
using channel ORA_DISK_1

starting media recovery

archive log thread 1 sequence 58 is already on disk as file /oradata/dgprd/arc/1_58_656333366.arc
archive log thread 1 sequence 59 is already on disk as file /oradata/dgprd/arc/1_59_656333366.arc
archive log filename=/oradata/dgprd/arc/1_58_656333366.arc thread=1 sequence=58
archive log filename=/oradata/dgprd/arc/1_59_656333366.arc thread=1 sequence=59
media recovery complete, elapsed time: 00:00:04
Finished recover at 02-JUN-07
sql statement: alter database open resetlogs
RMAN>

Sunday, June 03, 2007

Automatic Stroage Management (ASM): Adding a disk to a existing Diskgroup

Automatic Storage Management:
Adding a Disk to an existing Disk Group:
Oracle 10G RAC:
In day to day activities DBA needs plan and assign storage to the growing database. It’s a brief idea & procedure about how to add a new disk to an existing disk groups.

* Please refer my other posts on ASM and Linux VMware for adding Disks (Shortly edited)
1. Login as a root user and check for the new disk which was just added at the VMware.
[root@rac1 ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[…Truncated]
Disk /dev/sdf doesn't contain a valid partition table
2. Use fdisk to create the partition info for the newly added disk.
*************************************

[root@rac1 ~]# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
*************************************

3. You can see the new partition info; you can do this on both the Cluster nodes.
******************************************

[root@rac1 ~]# fdisk -l
Disk /dev/sdf: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 261 2096451 83 Linux
[root@rac1 ~]#
****************************************************
NODE 02
[root@rac2 ~]# fdisk -l
Disk /dev/sdf: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 261 2096451 83 Linux

***********************************************
4. In Linux you can use ASM library driver provided by Oracle to configure the new disks.
************************************
oracleasm-support-2.0.3-2
oracleasm-2.6.9-42.0.0.0.1.EL-2.0.3-2
oracleasmlib-2.0.2-1
oracleasm-2.6.9-42.0.0.0.1.ELsmp-2.0.3-2
NODE 01 # Check for existing ASM disks
[root@rac1 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
NODE 02 # Check for existing ASM disks
[root@rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac2 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
*********************************

5. Create ASM disks. Do this on any one node as a root user.
[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL4 /dev/sdf1
Marking disk "/dev/sdf1" as an ASM disk: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4

Check the ASM Disks from NODE 2
[root@rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac2 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4
********************************

6. Configure X-Windows and run DBCA as a oracle user from the primary node, to add the disk to a existing disk group.
7. DBCA: Welcome screen: Select Oracle Real Application clusters database
8. DBCA: Operations Screen: Select Configure Automatic Storage Management ->NEXT
9. Node Selection: Select both the nodes -> Next
10. ASM Disk Groups: Select the Disk Group Name, to assing a new disk
11. Add Disks Screen: Select VOL4, we added before with ASM library
This ends up adding space to a existing Disk group.
** This is for knowledge purpose of knowing how and was experimented on free version software and Operating systems.
Please refer other posts on Linux VMware & Oracle ASM.

Tuesday, May 29, 2007

Oracle 10gR2 Automatic Storage Management Adding a New Disk Group

Oracle 10gR2 Automatic Storage Management(ASM) :
Adding a New Disk Group in VMware OLE.
Oracle Database Version: 10.2.0.1
Oracle Real Applications Cluster
Oracle ASM
Oracle Enterprise Linux
VMware server 1.0.4

Login in as a root user on both the nodes, as this is a cluster database, configure the ASM disks on both the nodes.
Before going further make sure, that the hardware (New Raw Device) as been added / assigned / available to both the nodes.

1) Check the Existing Raw devices and verifying the availability by scanning the disks as below. It should be done on both the nodes.

****************************
[root@rac1 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
[root@rac1 ~]#
[root@rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac2 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
[root@rac2 ~]#
*****************************

2. Check the newly added disk, by using FDISK
************************************************

[root@rac1 ~]# fdisk -l
[…Truncated]
Device Boot Start End Blocks Id System
/dev/sde1 1 261 2096451 83 Linux
Disk /dev/sdf: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdf doesn't contain a valid partition table
[root@rac1 ~]#
Disk /dev/sdg doesn't contain a valid partition table
[root@rac1 ~]# fdisk /dev/sdg
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab el
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
******************************************************
3. Create disk partition of the newly added disk and we will go ahead preparing raw disk for Oracle ASM (/dev/sdf, /dev/sdg).
********************************************
[root@rac1 ~]# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]#
* Same for /dev/sdg
***********************************************************

4. Check the Partition information using fdisk -l again
Disk /dev/sdf: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdf1 1 1044 8385898+ 83 Linux

5. Create ASM Disk, on any of the Node as the root user.
[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL4 /dev/sdf1
Marking disk "/dev/sdf1" as an ASM disk: [ OK ]
[root@rac1 ~]#
[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL5 /dev/sdg1
Marking disk "/dev/sdg1" as an ASM disk: [ OK ]
6. Make sure the ASM disks are visible from every node.
*********************************************
[root@rac1 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4
VOL5

NODE rac2
[root@rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac2 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4
VOL5

[root@rac2 ~]#
*********************************
7. Login in as Oracle user and set your x-windows, to run DBCA.
8. Operations: Select Configure Automatic Storage Management from Database Configuration Assistant(DBCA) and click next.
9. Node Selection: Select the nodes listed, as its a cluster Oracle Database, the Disk group should be visible for both the nodes .
10. ASM DISK GROUPS: Click on Create New Tab below to create a new disk group.
11. Create Disk Group: Enter the name, Redundany (normal) & select the member disks for the new group : VOL4 & VOL5. Select both as the redundancy type is normal. ASM needs to Member disks atleast to go with.
12. ASM Disk Groups: The new diskgroup added just before is seen in the below screen.
13. Click Finsih, to end the New Disk group. You can add disks, you can create tablespaces in the new disk group.

14. Check from ASMCMD as well,
rac1-> export ORACLE_SID=+ASM1
rac1-> asmcmd
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED NORMAL N N 512 4096 1048576 6134 3352 0 1676 0 DG1/
MOUNTED NORMAL N N 512 4096 1048576 16378 16192 0 8096 0 DG2/
MOUNTED EXTERN N N 512 4096 1048576 2047 1873 0 1873 0 RECOVERYDEST/
ASMCMD> ls
DG1/
DG2/
RECOVERYDEST/
ASMCMD>

Automatic storage management is a new feature in Oracle Database 10g that provides the solution for the DBA storage Management challeneges.
ASM enables the DBA to change the storage configuration without having to take the database offline. ASM automatically rebalances files across the disk group after disks have been added or dropped.

Sunday, April 15, 2007

TAF, Oracle 10gR2 RAC Service: How to Test TAF?

Testing the Fail over in Real Application Clusters Oracle10gR2 using service:
How to test the Fail-over, if the Client is connected to a RAC database and one of the nodes goes down?
1. Client connected to Database from a SQL Plus session from a remote Workstation.

*********************************************

SQL> show user
USER is "SCOTT"
SQL> select INSTANCE_NAME, INSTANCE_NUMBER from v$INSTANCE;
INSTANCE_NAME INSTANCE_NUMBER
---------------- ---------------
devdb1 1

*********************************************
Checking the User /Client status from a DB Server
SQL> select USERNAME, INST_ID, MACHINE, TERMINAL, STATUS
2 from gv$session where USERNAME = 'SCOTT';
USERNAME INST_ID MACHINE TERMINAL STATUS
--------- ---------- ------------------------------ -------------- --------
SCOTT 1 WORKGROUP\PSDBA03-02 PSDBA03-02 INACTIVE

****************************************
3. On the DB Server, force /Kill the Instance devdb1.
4. The status of the DBInstance devdb1 is down.
Name Type Target State Host
------------------------------------------------------------
ora....SDEV.cs application ONLINE ONLINE rac2
ora....db1.srv application ONLINE OFFLINE
ora....db2.srv application ONLINE ONLINE rac2
ora.devdb.db application ONLINE ONLINE rac2
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

****************************
5. You can see difference with Normal Service, the SQL plus connection throws a error, but with Client-Side Load balancing and TAF the user connection still exists. For User the fail-over is transparent and can go ahead with his session without the need to reconnect.
SQL> select INSTANCE_NAME from v$instance;
INSTANCE_NAME
----------------
devdb2
SQL> show user
USER is "SCOTT"
This is a simple test for fail-over, with a SQL Plus connections from a remote server.

More notes on Service Deployments
http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/hafeats.htm#BABHBDJD

Saturday, March 24, 2007

Oracle Applications 11i FAQ's

1. Why does 11i have an 8.0.6 and an 8.1.6 ORACLE_HOME?
Release 11i requires an Oracle8i (v8.1.6) database which is installed in the 8.1.6 ORACLE_HOME. The 8.0.6 ORACLE_HOME is required to host several other components of the Release 11i technology stack (such as Developer 6i and WebDB 2.2). The applications run in server partitioned mode, where the code is compiled and linked with the 8.0.6 ORACLE_HOME.

Saturday, March 17, 2007

Importing Few Users

I was asked by my friends, few times about - the ways to import more than one user in a go...
I would be creating a parfile like this...
userid=expman/expman@amdbu
file=/bkdump/Exp_Bak/exp_amdbu_0311060054.dmp
fromuser=(schema1, schema2, schema3, schema4)
touser=(schema1, schema2, schema3, schema4)
ignore=y
commit=y
buffer=10000000
log=/export/home/oracle/amdbu/imp_schemas.log
feedback=1000000

Tuesday, January 30, 2007

Oracle RAC Interview Questions & some useful Information

1)What is Oracle Clusterware?
i) Oracle clusterware is portable cluster software that allows clustering of single servers so that they cooperate as a single system.
ii) Oracle Clusterware also provides the required infrastructure for Oracle Real Application clusters (RAC).
Oracle clusterware enables the protection of any Oracle application or any other kind of application within a cluster.
iii) Oracle clusterware provides the level of high availability that is commonly known to be achievable for nearly all kind of applications and databases managed in cluster environments, like Oracle single Instance databases, oracle application servers, oracle enterprise manager components, third party databases or any other kind of application.
2. How to check if the database is RAC enabled?
3. Will the CRS services hang if CRS Home is full?
4. How will you convert single instance to RAC?
5. How will you tune interinstance communication?
http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/monitor.htm#CFAGAAGD
6. Explain how will you add nodes to the existing cluster?
http://download.oracle.com/docs/cd/B19306_01/rac.102/b28759/addnodes2.htm#CHDFBGFJ

i) Configure the operating system and hardware for the new node.
ii) Add the node to the cluster
You can do this by running $ORACLE_CRSHOME/oui/bin/ addNode.sh
iii) Add the rac software to the new node $ORACLE_HOME/oui/bin/addNode.sh
iv) Reconfigure listeners for the new node
Run -> $netca
v) Add new Instance,
run -> $dbca

------------------------------------------------------------------------

7. How will you shutdown everything in a Cluster in a single command?

root@prmord1p # /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
root@prmord1p # ps -ef grep crs
root 29640 27940 0 15:14:16 pts/4 0:00 grep crs
root 12595 1 0 Jun 20 ? 0:00 /usr/sbin/vxnotify -g oracrsdg
root 29227 1 0 15:13:41 ? 0:00 /bin/sh /etc/init.d/init.crsd run
*************** And to start ***********************
root@prmord1p # clear
root@prmord1p # /etc/init.d/init.crs start
Startup will be queued to init within 30 seconds.

------------------------------------------------------------------------------------------------
8. Explain what is VIP?
9. Describe the difference in Architecture of 9i and 10g RAC?

 
Copyright © 2005 - 2008 DBA-ONWeb Technical blog. All rights reserved