Tuesday, July 16, 2013

ORACLE ASM INSTALLATION ON LINUX ,VMVARE,ORACLE10g

[oracle@localhost ~]$ uname -r
2.6.18-92.el5
[oracle@localhost ~]$ 
[oracle@localhost ~]$ 
[oracle@localhost ~]$ su - root
Password: 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# cd /media/RHEL_5.2\ i386\ DV/Server/
[root@localhost Server]# 
[root@localhost Server]# 
[root@localhost Server]# 
[root@localhost Server]# 
[root@localhost Server]# rpm -ivh kernel-debug-2.6.18-92.el5.i686.rpm
warning: kernel-debug-2.6.18-92.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-debug           ########################################### [100%]
[root@localhost Server]# rpm -ivh kernel-PAE-2.6.18-92.el5.i686.rpm
warning: kernel-PAE-2.6.18-92.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-PAE             ########################################### [100%]
[root@localhost Server]# rpm -ivh kernel-xen-2.6.18-92.el5.i686.rpm
warning: kernel-xen-2.6.18-92.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-xen             ########################################### [100%]
[root@localhost Server]# 
[root@localhost Server]# 
[root@localhost Server]# 
[root@localhost Server]# cde
-bash: cde: command not found
[root@localhost Server]# cd
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# cd /home/oracle/asmrpm/
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh oracleasm-support-2.1.7-1.el5.i386.rpm
error: open of oracleasm-support-2.1.7-1.el5.i386.rpm failed: No such file or directory
[root@localhost asmrpm]# ll
total 632
-rwxrw-rw- 1 oracle oinstall 128654 Apr  8 11:54 oracleasm-2.6.18-92.el5-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall 130366 Apr  8 11:54 oracleasm-2.6.18-92.el5debug-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall   2836 Apr  8 11:54 oracleasm-2.6.18-92.el5-debuginfo-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall 129257 Apr  8 11:55 oracleasm-2.6.18-92.el5PAE-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall 126270 Apr  8 11:55 oracleasm-2.6.18-92.el5xen-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall  13929 Apr  8 12:14 oracleasmlib-2.0.4-1.el5.i386.rpm
-rwxrw-rw- 1 oracle oinstall  85303 Apr  8 11:53 oracleasm-support-2.1.8-1.el5.i386.rpm
[root@localhost asmrpm]# chmod 777 /home/oracle/asmrpm/
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh oracleasm-support-2.1.7-1.el5.i386.rpm
error: open of oracleasm-support-2.1.7-1.el5.i386.rpm failed: No such file or directory
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -Uvh oracleasm-support-2.1.7-1.el5.i386.rpm
error: open of oracleasm-support-2.1.7-1.el5.i386.rpm failed: No such file or directory
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# ll
total 632
-rwxrw-rw- 1 oracle oinstall 128654 Apr  8 11:54 oracleasm-2.6.18-92.el5-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall 130366 Apr  8 11:54 oracleasm-2.6.18-92.el5debug-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall   2836 Apr  8 11:54 oracleasm-2.6.18-92.el5-debuginfo-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall 129257 Apr  8 11:55 oracleasm-2.6.18-92.el5PAE-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall 126270 Apr  8 11:55 oracleasm-2.6.18-92.el5xen-2.0.5-1.el5.i686.rpm
-rwxrw-rw- 1 oracle oinstall  13929 Apr  8 12:14 oracleasmlib-2.0.4-1.el5.i386.rpm
-rwxrw-rw- 1 oracle oinstall  85303 Apr  8 11:53 oracleasm-support-2.1.8-1.el5.i386.rpm
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -Uvh oracleasm-support-2.1.8-1.el5.i386.rpm 
warning: oracleasm-support-2.1.8-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-support      ########################################### [100%]
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh oracleasm-2.6.18-92.el5-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-92.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-2.6.18-92.el5########################################### [100%]
[root@localhost asmrpm]# rpm -ivh oracleasm-2.6.18-92.el5debug-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-92.el5debug-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-2.6.18-92.el5########################################### [100%]
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh oracleasm-2.6.18-92.el5-debuginfo-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-92.el5-debuginfo-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-2.6.18-92.el5########################################### [100%]
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh oracleasm-2.6.18-92.el5PAE-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-92.el5PAE-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-2.6.18-92.el5########################################### [100%]
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh oracleasm-2.6.18-92.el5xen-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-92.el5xen-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:oracleasm-2.6.18-92.el5########################################### [100%]
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh oracleasm-2.6.18-92.el5xen-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-92.el5xen-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
        package oracleasm-2.6.18-92.el5xen-2.0.5-1.el5 is already installed
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# rpm -ivh *.rpm
warning: oracleasm-2.6.18-92.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
        package oracleasm-support-2.1.8-1.el5 is already installed
        package oracleasm-2.6.18-92.el5xen-2.0.5-1.el5 is already installed
        package oracleasm-2.6.18-92.el5-2.0.5-1.el5 is already installed
        package oracleasm-2.6.18-92.el5debug-2.0.5-1.el5 is already installed
        package oracleasm-2.6.18-92.el5-debuginfo-2.0.5-1.el5 is already installed
        package oracleasm-2.6.18-92.el5PAE-2.0.5-1.el5 is already installed
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# 
[root@localhost asmrpm]# cd
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# /oracle/product/10.2.0/db_1/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab 
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        localhost
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
[root@localhost ~]# 
 /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@localhost ~]# ll /etc/init.d/
total 912
-rwxr-xr-x 1 root root  1128 Oct 10  2006 acpid
-rwxr-xr-x 1 root root  1441 Dec 18  2006 anacron
-rwxr-xr-x 1 root root  1429 Aug 22  2006 apmd
-rwxr-xr-x 1 root root  1176 Aug 23  2006 atd
-rwxr-xr-x 1 root root  3114 Apr 21  2008 auditd
-rwxr-xr-x 1 root root  2461 Apr  4  2008 autofs
-rwxr-xr-x 1 root root  1848 Jan  8  2007 avahi-daemon
-rwxr-xr-x 1 root root  1789 Jan  8  2007 avahi-dnsconfd
-rwxr-xr-x 1 root root  1477 Oct  3  2006 bluetooth
-rwxr-xr-x 1 root root  1357 Nov 20  2007 capi
-rwxr-xr-x 1 root root  1470 Jun 28  2007 conman
-rwxr-xr-x 1 root root  7654 Mar  6  2008 cpuspeed
-rwxr-xr-x 1 root root  1904 Jun 22  2007 crond
-rwxr-xr-x 1 root root  1942 Mar 20  2008 cups
-rwxr-xr-x 1 root root   299 Apr 21  2008 cups-config-daemon
-rwxr-xr-x 1 root root  1505 Jul 12  2006 dc_client
-rwxr-xr-x 1 root root  1347 Jul 12  2006 dc_server
-rwxr-xr-x 1 root root  2785 Dec  7  2006 dhcdbd
-rwxr-xr-x 1 root root   917 Mar 13  2008 dovecot
-rwxr-xr-x 1 root root   996 Oct  3  2006 dund
-rwxr-xr-x 1 root root  1965 Jun 28  2007 firstboot
-rwxr-xr-x 1 root root 13980 Mar  3  2008 functions
-rwxr-xr-x 1 root root  1778 Jul 12  2006 gpm
-rwxr-xr-x 1 root root  1486 Apr 11  2008 haldaemon
-rwxr-xr-x 1 root root  5766 Mar  3  2008 halt
-rwxr-xr-x 1 root root   966 Oct  3  2006 hidd
-rwxr-xr-x 1 root root  4777 Oct 10  2007 hplip
-rwxr-xr-x 1 root root  3200 Jan 11  2008 httpd
-r-xr-xr-x 1 root root 35394 Jul 11 12:06 init.cssd
-rwxr-xr-x 1 root root  3084 Aug 29  2006 innd
-rwxr-xr-x 1 root root  7543 Jan 14  2008 ip6tables
-rwxr-xr-x 1 root root 13864 Jan 15  2008 ipmi
-rwxr-xr-x 1 root root  7460 Jan 14  2008 iptables
-rwxr-xr-x 1 root root  1624 Aug  1  2006 irda
-rwxr-xr-x 1 root root  2256 Apr 10  2008 irqbalance
-rwxr-xr-x 1 root root  6229 Nov 20  2007 isdn
-rwxr-xr-x 1 root root 10034 Apr 11  2008 kdump
-rwxr-xr-x 1 root root   652 Mar  3  2008 killall
-rwxr-xr-x 1 root root  1331 Nov 10  2007 krb524
-rwxr-xr-x 1 root root  1406 Apr  4  2008 kudzu
-rwxr-xr-x 1 root root  1684 Sep  6  2006 lisa
-rwxr-xr-x 1 root root  3112 Jul 13  2006 lm_sensors
-rwxr-xr-x 1 root root  1932 Apr  4  2008 lvm2-monitor
-rwxr-xr-x 1 root root  1914 Dec  7  2007 mcstrans
-rwxr-xr-x 1 root root  2125 Jan 19  2008 mdmonitor
-rwxr-xr-x 1 root root  1613 Jan 19  2008 mdmpd
-rwxr-xr-x 1 root root  1819 Apr 16  2008 messagebus
-rwxr-xr-x 1 root root  1926 Apr  3  2008 microcode_ctl
-rwxr-xr-x 1 root root  1193 Apr  2  2008 multipathd
-rwxr-xr-- 1 root root  8542 Feb 29  2008 named
-rwxr-xr-x 1 root root  2985 Mar  3  2008 netconsole
-rwxr-xr-x 1 root root  5675 Mar  3  2008 netfs
-rwxr-xr-x 1 root root  1258 Apr 18  2008 netplugd
-rwxr-xr-x 1 root root  8001 Mar  3  2008 network
-rwxr-xr-x 1 root root  1598 Apr  2  2008 NetworkManager
-rwxr-xr-x 1 root root  1480 Apr  2  2008 NetworkManagerDispatcher
-rwxr-xr-x 1 root root  4386 Feb 28  2008 nfs
-rwxr-xr-x 1 root root  3243 Feb 28  2008 nfslock
-rwxr-xr-x 1 root root  2517 Apr 11  2008 nscd
-rwxr-xr-x 1 root root  3361 Jan 17  2008 ntpd
-rwxr-xr-x 1 root root 12865 Apr 11  2008 openibd
-rwxr-xr-x 1 root root  7124 Feb  6 08:37 oracleasm
-rwxr-xr-x 1 root root  1203 Oct  3  2006 pand
-rwxr-xr-x 1 root root  2020 Jan 17  2008 pcscd
-rwxr-xr-x 1 root root  1877 Jul 13  2006 portmap
-rwxr-xr-x 1 root root  1021 Jul 13  2006 psacct
-rwxr-xr-x 1 root root  1387 Dec 21  2006 rdisc
-rwxr-xr-x 1 root root   931 Feb  5  2007 readahead_early
-rwxr-xr-x 1 root root   930 Feb  5  2007 readahead_later
-rwxr-xr-x 1 root root  1793 Feb  1  2008 restorecond
-rwxr-xr-x 1 root root  1782 Dec 15  2006 rhnsd
-rwxr-xr-x 1 root root  2434 Feb 28  2008 rpcgssd
-rwxr-xr-x 1 root root  2021 Feb 28  2008 rpcidmapd
-rwxr-xr-x 1 root root  2480 Feb 28  2008 rpcsvcgssd
-rwxr-xr-x 1 root root  1010 Aug 15  2006 rwhod
-rwxr-xr-x 1 root root  1547 Sep 30  2006 saslauthd
-rwxr-xr-x 1 root root  3349 Nov 28  2006 sendmail
-rwxr-xr-x 1 root root  3814 Apr  2  2008 setroubleshoot
-rwxr-xr-x 1 root root   647 Mar  3  2008 single
-rwxr-xr-x 1 root root  2537 Jan  4  2008 smartd
-rwxr-xr-x 1 root root  2145 Apr  3  2008 smb
-rwxr-xr-x 1 root root  1575 Jan  7  2008 spamassassin
-rwxr-xr-x 1 root root  3283 Apr  1  2008 squid
-rwxr-xr-x 1 root root  3340 Jan 15  2008 sshd
-rwxr-xr-x 1 root root  2043 Mar 25  2008 syslog
-rwxr-xr-x 1 root root  2796 Aug 23  2006 tux
-r-xr-xr-x 1 root root 36773 Jul 10 22:14 vmware-tools
-rwxr-xr-x 1 root root  2051 Jan 15  2007 vncserver
-rwxr-xr-x 1 root root  1778 Dec 13  2007 vsftpd
-rwxr-xr-x 1 root root  1645 Feb  2  2008 wdaemon
-rwxr-xr-x 1 root root  1559 Apr  3  2008 winbind
-rwxr-xr-x 1 root root  1650 Jan 17  2008 wpa_supplicant
-rwxr-xr-x 1 root root  3902 Jun 16  2007 xfs
-rwxr-xr-x 1 root root  2497 Dec  6  2006 xinetd
-rwxr-xr-x 1 root root  3465 Jul 14  2007 ypbind
-rwxr-xr-x 1 root root  1498 Jan 18  2008 yum-updatesd
[root@localhost ~]# 

STEP BY STEP RMAN RECOVERY CATALOG CREATION AND CONFIGURATION

create databse rman  using dbca

SQL> create tablespace catalog datafile '/oracle/product/10.2.0/oradata/rman/catalog01.dbf' size 30m;

Tablespace created.

SQL>
SQL>
SQL> create user rman identified by rman;

User created.

SQL>
SQL>
SQL> alter user rman quota unlimited on catalog;

User altered.

SQL>
SQL>
SQL> grant recovery_catalog_owner to rman;
Grant succeeded.

SQL>
SQL>
SQL>
SQL> alter user rman default tablespace catalog;

User altered.

SQL> conn rman/rman
Connected.
SQL>




connect with rman

[oracle@localhost ~]$ rman catalog rman/rman@rman

create catalog;


[oracle@localhost ~]$ rman target sys/orcl@orcl  catalog rman/rman@rman

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 16 14:58:14 2013

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

connected to target database: ORCL (DBID=1348274388)
connected to recovery catalog database

RMAN>

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN>

RMAN> report schema;

Report of database schema

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    480      SYSTEM               YES     /oracle/product/10.2.0/oradata/orcl/system01.dbf
2    30       UNDOTBS1             YES     /oracle/product/10.2.0/oradata/orcl/undotbs01.dbf
3    240      SYSAUX               NO      /oracle/product/10.2.0/oradata/orcl/sysaux01.dbf
4    5        USERS                NO      /oracle/product/10.2.0/oradata/orcl/users01.dbf
5    100      EXAMPLE              NO      /oracle/product/10.2.0/oradata/orcl/example01.dbf
6    20       RMAN_TEST            NO      /oracle/product/10.2.0/oradata/orcl/rman01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    20       TEMP                 32767       /oracle/product/10.2.0/oradata/orcl/temp01.dbf

RMAN>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

thease all tables are creating by create catalog statement in rman prompt
SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
DB                             TABLE
NODE                           TABLE
CONF                           TABLE
DBINC                          TABLE
CKP                            TABLE
TS                             TABLE
TSATT                          TABLE
DF                             TABLE
DFATT                          TABLE
TF                             TABLE
TFATT                          TABLE

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
OFFR                           TABLE
RR                             TABLE
RT                             TABLE
ORL                            TABLE
RLH                            TABLE
AL                             TABLE
BS                             TABLE
BP                             TABLE
BCF                            TABLE
CCF                            TABLE
XCF                            TABLE

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BSF                            TABLE
BDF                            TABLE
CDF                            TABLE
XDF                            TABLE
BRL                            TABLE
BCB                            TABLE
CCB                            TABLE
SCR                            TABLE
SCRL                           TABLE
CONFIG                         TABLE
XAL                            TABLE

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RSR                            TABLE
FB                             TABLE
RC_DATABASE                    VIEW
RC_DATABASE_INCARNATION        VIEW
RC_RESYNC                      VIEW
RC_CHECKPOINT                  VIEW
RC_TABLESPACE                  VIEW
RC_DATAFILE                    VIEW
RC_TEMPFILE                    VIEW
RC_REDO_THREAD                 VIEW
RC_REDO_LOG                    VIEW

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_LOG_HISTORY                 VIEW
RC_ARCHIVED_LOG                VIEW
RC_BACKUP_SET                  VIEW
RC_BACKUP_PIECE                VIEW
RC_BACKUP_DATAFILE             VIEW
RC_BACKUP_CONTROLFILE          VIEW
RC_BACKUP_SPFILE               VIEW
RC_DATAFILE_COPY               VIEW
RC_CONTROLFILE_COPY            VIEW
RC_BACKUP_REDOLOG              VIEW
RC_BACKUP_CORRUPTION           VIEW

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_COPY_CORRUPTION             VIEW
RC_OFFLINE_RANGE               VIEW
RC_STORED_SCRIPT               VIEW
RC_STORED_SCRIPT_LINE          VIEW
RC_PROXY_DATAFILE              VIEW
RC_PROXY_CONTROLFILE           VIEW
RC_RMAN_CONFIGURATION          VIEW
RC_DATABASE_BLOCK_CORRUPTION   VIEW
RC_PROXY_ARCHIVEDLOG           VIEW
RC_RMAN_STATUS                 VIEW
ROUT                           TABLE

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_RMAN_OUTPUT                 VIEW
RCVER                          TABLE
RC_BACKUP_FILES                VIEW
RC_RMAN_BACKUP_SUBJOB_DETAILS  VIEW
RC_RMAN_BACKUP_JOB_DETAILS     VIEW
RC_BACKUP_SET_DETAILS          VIEW
RC_BACKUP_PIECE_DETAILS        VIEW
RC_BACKUP_COPY_DETAILS         VIEW
RC_PROXY_COPY_DETAILS          VIEW
RC_PROXY_ARCHIVELOG_DETAILS    VIEW
RC_BACKUP_DATAFILE_DETAILS     VIEW

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_BACKUP_CONTROLFILE_DETAILS  VIEW
RC_BACKUP_ARCHIVELOG_DETAILS   VIEW
RC_BACKUP_SPFILE_DETAILS       VIEW
RC_BACKUP_SET_SUMMARY          VIEW
RC_BACKUP_DATAFILE_SUMMARY     VIEW
RC_BACKUP_CONTROLFILE_SUMMARY  VIEW
RC_BACKUP_ARCHIVELOG_SUMMARY   VIEW
RC_BACKUP_SPFILE_SUMMARY       VIEW
RC_BACKUP_COPY_SUMMARY         VIEW
RC_PROXY_COPY_SUMMARY          VIEW
RC_PROXY_ARCHIVELOG_SUMMARY    VIEW

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_UNUSABLE_BACKUPFILE_DETAILS VIEW
RC_RMAN_BACKUP_TYPE            VIEW

90 rows selected.

SQL>
RESYNC CATALOGUpdates the recovery catalog with RMAN metadata in the current control file of the target database (default).
RMAN creates a snapshot control file in order to obtain a read-consistent view of the control file, then updates the recovery catalog with any new information from the snapshot. The RESYNC CATALOG command updates the following classes or records:
  • Log history records, which are created when a log switch occurs. Note that log history records describe an online log switch, not a log archival.
  • Archived redo log records, which are associated with archived logs created by archiving an online redo log, copying an existing archived log, or restoring backups of archived logs.
  • Backup records, which are records of backup sets, backup pieces, proxy copies, and image copies.
  • Physical schema records, which are associated with datafiles and tablespaces. If the target database is open, then rollback segment information is also updated.

Tuesday, June 25, 2013

ORACLE 10g INSTALLATION ON LINUX


RECOVERY USING RMAN IF ALL DATAFILE,CONTROLFILE,REDOLOGFILES

FIRST HAVE FULL BACKUP OF DATABASE

IF DATABASE OPEN THEN FIRST



[oracle@localhost ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jun 25 15:58:42 2013

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

connected to target database: ORCL (DBID=1334973392, not open)

RMAN> shutdown immediate;

database closed
database dismounted
Oracle instance shut down

RMAN> STARTUP MOUNT;

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

Total System Global Area     608174080 bytes

Fixed Size                     1220844 bytes
Variable Size                192941844 bytes
Database Buffers             411041792 bytes
Redo Buffers                   2969600 bytes

RMAN> SHOW ALL;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/product/10.2.0/db_1/dbs/snapcf_orcl.f'; # default

RMAN> BACKUP DATABASE;

Starting backup at 25-JUN-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/product/10.2.0/oradata/orcl/system01.dbf
input datafile fno=00003 name=/oracle/product/10.2.0/oradata/orcl/sysaux01.dbf
input datafile fno=00005 name=/oracle/product/10.2.0/oradata/orcl/example01.dbf
input datafile fno=00002 name=/oracle/product/10.2.0/oradata/orcl/undotbs01.dbf
input datafile fno=00004 name=/oracle/product/10.2.0/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 25-JUN-13
channel ORA_DISK_1: finished piece 1 at 25-JUN-13
piece handle=/oracle/product/10.2.0/flash_recovery_area/ORCL/backupset/2013_06_25/o1_mf_nnndf_TAG20130625T161443_8wlx4vy9_.bkp tag=TAG20130625T161443 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:06
Finished backup at 25-JUN-13

Starting Control File and SPFILE Autobackup at 25-JUN-13
piece handle=/oracle/product/10.2.0/flash_recovery_area/ORCL/autobackup/2013_06_25/o1_mf_s_819044006_8wlx8t3h_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 25-JUN-13

DELETE ALL DATAFILES,CONTROLFILE AND REDO LOGFILES





RMAN> SHUTDOWN IMMEDIATE;

database dismounted
Oracle instance shut down

RMAN>

RMAN>

RMAN> STARTUP NOMOUNT;

connected to target database (not started)
Oracle instance started

Total System Global Area     608174080 bytes

Fixed Size                     1220844 bytes
Variable Size                192941844 bytes
Database Buffers             411041792 bytes
Redo Buffers                   2969600 bytes

RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;

Starting restore at 25-JUN-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

recovery area destination: /oracle/product/10.2.0/flash_recovery_area
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /oracle/product/10.2.0/flash_recovery_area/ORCL/autobackup/2013_06_25/o1_mf_s_819044006_8wlx8t3h_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
output filename=/oracle/product/10.2.0/oradata/orcl/control01.ctl
output filename=/oracle/product/10.2.0/oradata/orcl/control02.ctl
output filename=/oracle/product/10.2.0/oradata/orcl/control03.ctl
Finished restore at 25-JUN-13

RMAN> ALTER DATABASE MOUNT;

database mounted
released channel: ORA_DISK_1

RMAN>

RMAN>

RMAN> RESTORE DATABASE;

Starting restore at 25-JUN-13
Starting implicit crosscheck backup at 25-JUN-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 4 objects
Finished implicit crosscheck backup at 25-JUN-13

Starting implicit crosscheck copy at 25-JUN-13
using channel ORA_DISK_1
Finished implicit crosscheck copy at 25-JUN-13

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

List of Cataloged Files
=======================
File Name: /oracle/product/10.2.0/flash_recovery_area/ORCL/autobackup/2013_06_25/o1_mf_s_819044006_8wlx8t3h_.bkp

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 /oracle/product/10.2.0/oradata/orcl/system01.dbf
restoring datafile 00002 to /oracle/product/10.2.0/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /oracle/product/10.2.0/oradata/orcl/sysaux01.dbf
restoring datafile 00004 to /oracle/product/10.2.0/oradata/orcl/users01.dbf
restoring datafile 00005 to /oracle/product/10.2.0/oradata/orcl/example01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/product/10.2.0/flash_recovery_area/ORCL/backupset/2013_06_25/o1_mf_nnndf_TAG20130625T161443_8wlx4vy9_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/product/10.2.0/flash_recovery_area/ORCL/backupset/2013_06_25/o1_mf_nnndf_TAG20130625T161443_8wlx4vy9_.bkp tag=TAG20130625T161443
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 25-JUN-13

RMAN>

RMAN>

RMAN> RECOVER DATABASE;

Starting recover at 25-JUN-13
using channel ORA_DISK_1

starting media recovery

unable to find archive log
archive log thread=1 sequence=1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 06/25/2013 16:23:28
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 550400

RMAN> ALTER DATABASE OPEN RESETLOGS;

database opened

RMAN>


THE DATABASE OPEN WITH RESETLOGS

SQL> ARCHIVE LOG LIST;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     0
Next log sequence to archive   1
Current log sequence           1
SQL>