Friday 2 December 2016

AWR ASH ADDM


@?/rdbms/admin/awrrpt.sql      -- basic AWR report

@?/rdbms/admin/awrsqrpt.sql    -- Standard SQL statement Report
@?/rdbms/admin/awrddrpt.sql    -- Period diff on current instance
@?/rdbms/admin/awrrpti.sql     -- Workload Repository Report Instance (RAC)
@?/rdbms/admin/awrgrpt.sql     -- AWR Global Report (RAC)
@?/rdbms/admin/awrgdrpt.sql    -- AWR Global Diff Report (RAC)
@?/rdbms/admin/awrinfo.sql     -- Script to output general AWR information

==========================================================================================


set lines 100 pages 999


select snap_id,

  snap_level,
  to_char(begin_interval_time, 'dd/mm/yy hh24:mi:ss') begin
from 
   dba_hist_snapshot 
order by 1;


@$ORACLE_HOME/rdbms/admin/awrrpt.sql


@%ORACLE_HOME%\rdbms\admin\awrrpt.sql


Diff Report

===========
@$ORACLE_HOME/rdbms/admin/awrddrpt.sql

For Multiple AWR reports from a RAC database instances.


To run Global AWR :

===================
define report_type = 'html';
define num_days = 2;
define begin_snap = 15024;
define end_snap = 15025;
@$ORACLE_HOME/rdbms/admin/awrgrpt.sql

To run ASH report

=================
define report_type = 'html'
define begin_time = '07/27/14 22:20:00'
define duration = 10
define report_name = ashrpt_1_0727_2230.html
@$ORACLE_HOME/rdbms/admin/ashrpt.sql

Summary of All User Input

-------------------------
Format         : HTML
DB Id          : 305917710
Inst num       : 1
Begin time     : 27-Jul-14 22:10:00
End time       : 27-Jul-14 22:20:00
Slot width     : Default
Report targets : 0
Report name    : ashrpt_1_0727_2220.html

Monday 28 May 2012

Oracle RAC 10gR2 and 11gR2 commands




Some Oracle RAC 10gR2 and 11gR2 commands -


/u01/11.2.0/grid/bin/crsctl status resource -t
/u01/11.2.0/grid/bin/crs_stat -t
/u01/11.2.0/grid/bin/ocrconfig -showbackup


/u01/11.2.0/grid/bin/olsnodes -n
/u01/11.2.0/grid/bin/olsnodes -c
/u01/11.2.0/grid/bin/ocrcheck




srvctl status database -d orakle
srvctl status instance -d orakle -i "orakle1,orakle2"
srvctl status nodeapps


[oracle@dblcys033 ~]$ srvctl status database -d orakle
Instance orakle1 is running on node dblcys033
Instance orakle2 is running on node dblcys034
[oracle@dblcys033 ~]$


[oracle@dblcys033 ~]$ srvctl status instance -d orakle -i "orakle1,orakle2"
Instance orakle1 is running on node dblcys033
Instance orakle2 is running on node dblcys034
[oracle@dblcys033 ~]$


[oracle@dblcys033 ~]$ srvctl status nodeapps
VIP dblcys033-vip is enabled
VIP dblcys033-vip is running on node: dblcys033
VIP dblcys034-vip is enabled
VIP dblcys034-vip is running on node: dblcys034
Network is enabled
Network is running on node: dblcys033
Network is running on node: dblcys034
GSD is disabled
GSD is not running on node: dblcys033
GSD is not running on node: dblcys034
ONS is enabled
ONS daemon is running on node: dblcys033
ONS daemon is running on node: dblcys034
eONS is enabled
eONS daemon is running on node: dblcys033
eONS daemon is running on node: dblcys034
[oracle@dblcys033 ~]$




[oracle@dblcys033 bin]$ pwd
/u01/11.2.0/grid/bin
[oracle@dblcys033 bin]$ crsctl status resource -t
-bash: crsctl: command not found
[oracle@dblcys033 bin]$ ./crsctl status resource -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.FLASH.dg
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.LISTENER.lsnr
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.OCR.dg
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.OCR2.dg
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.asm
               ONLINE  ONLINE       dblcys033             Started
               ONLINE  ONLINE       dblcys034             Started
ora.eons
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.gsd
               OFFLINE OFFLINE      dblcys033
               OFFLINE OFFLINE      dblcys034
ora.net1.network
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.ons
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
ora.registry.acfs
               ONLINE  ONLINE       dblcys033
               ONLINE  ONLINE       dblcys034
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       dblcys033
ora.orakle.db
      1        ONLINE  ONLINE       dblcys033             Open
      2        ONLINE  ONLINE       dblcys034             Open
ora.oc4j
      1        OFFLINE OFFLINE
ora.dblcys033.vip
      1        ONLINE  ONLINE       dblcys033
ora.dblcys034.vip
      1        ONLINE  ONLINE       dblcys034
ora.scan1.vip
      1        ONLINE  ONLINE       dblcys033
ora.spwebuni.db
      1        ONLINE  ONLINE       dblcys033             Open
      2        ONLINE  ONLINE       dblcys034             Open
[oracle@dblcys033 bin]$




[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    db...s033
ora.FLASH.dg   ora....up.type ONLINE    ONLINE    db...s033
ora....ER.lsnr ora....er.type ONLINE    ONLINE    db...s033
ora....N1.lsnr ora....er.type ONLINE    ONLINE    db...s033
ora.OCR.dg     ora....up.type ONLINE    ONLINE    db...s033
ora.OCR2.dg    ora....up.type ONLINE    ONLINE    db...s033
ora.asm        ora.asm.type   ONLINE    ONLINE    db...s033
ora.eons       ora.eons.type  ONLINE    ONLINE    db...s033
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora.orakle.db   ora....se.type ONLINE    ONLINE    db...s033
ora....network ora....rk.type ONLINE    ONLINE    db...s033
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE
ora....SM1.asm application    ONLINE    ONLINE    db...s033
ora....33.lsnr application    ONLINE    ONLINE    db...s033
ora....033.gsd application    OFFLINE   OFFLINE
ora....033.ons application    ONLINE    ONLINE    db...s033
ora....033.vip ora....t1.type ONLINE    ONLINE    db...s033
ora....SM2.asm application    ONLINE    ONLINE    db...s034
ora....34.lsnr application    ONLINE    ONLINE    db...s034
ora....034.gsd application    OFFLINE   OFFLINE
ora....034.ons application    ONLINE    ONLINE    db...s034
ora....034.vip ora....t1.type ONLINE    ONLINE    db...s034
ora.ons        ora.ons.type   ONLINE    ONLINE    db...s033
ora....ry.acfs ora....fs.type ONLINE    ONLINE    db...s033
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    db...s033
ora....buni.db ora....se.type ONLINE    ONLINE    db...s033
[oracle@dblcys033 ~]$


/u01/11.2.0/grid/bin/crsctl query css votedisk


[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   48dbb58e2c4b4f87bf64705b5f35c4d7 (/dev/mapper/mpath16p1) [OCR2]
 2. ONLINE   61ddb0f2a7844fb4bf7714877dd7e467 (/dev/mapper/mpath17p1) [OCR2]
 3. ONLINE   9e885b6812fe4fa0bfd49bd87dcbbd49 (/dev/mapper/mpath18p1) [OCR2]
Located 3 voting disk(s).
[oracle@dblcys033 ~]$


/u01/11.2.0/grid/bin/crsctl check crs    
/u01/11.2.0/grid/bin/crsctl check cluster


[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
[oracle@dblcys033 ~]$


[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
[oracle@dblcys033 ~]$


[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/ocrconfig -showbackup


dblcys033     2012/03/09 14:17:43     /u01/11.2.0/grid/cdata/dblc-cluster/backup00.ocr


dblcys033     2012/03/09 10:17:42     /u01/11.2.0/grid/cdata/dblc-cluster/backup01.ocr


dblcys033     2012/03/09 06:17:41     /u01/11.2.0/grid/cdata/dblc-cluster/backup02.ocr


dblcys033     2012/03/08 02:17:33     /u01/11.2.0/grid/cdata/dblc-cluster/day.ocr


dblcys033     2012/02/27 02:16:33     /u01/11.2.0/grid/cdata/dblc-cluster/week.ocr


dblcys033     2011/03/08 09:58:50     /u01/11.2.0/grid/cdata/dblc-cluster/backup_20110308_095850.ocr
[oracle@dblcys033 ~]$


[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/olsnodes -n
dblcys033    1
dblcys034    2


[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/olsnodes -c
dblc-cluster


[oracle@dblcys033 ~]$ /u01/11.2.0/grid/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2808
         Available space (kbytes) :     259312
         ID                       : 1223731229
         Device/File Name         :      +ocr2
                                    Device/File integrity check succeeded


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


         Cluster registry integrity check succeeded


         Logical corruption check bypassed due to non-privileged user


[oracle@dblcys033 ~]$
[oracle@dblcys033 ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#
# DCL, 17/11/2010 - Remove hostname from loopback address
#127.0.0.1              dblcys033 localhost.localdomain localhost
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6


# DCL, 17/11/2010 - eth0 - Public Interface
10.130.128.33   dblcys033
10.130.128.34   dblcys034
10.130.130.39   dbltols062
10.130.130.41   dbltols066


# DCL, 17/11/2010 - VIP
10.130.128.168  dblcys033-vip
10.130.128.169  dblcys034-vip


# DCL, 18/11/2010 - SCAN - required during installation
10.130.128.170  dblc-scan


# DCL, 17/11/2010 - eth1 - Private Interface
192.168.1.33    dblcys033-priv
192.168.1.34    dblcys034-priv


## Netbackup Servers - Added 10-03-2011 pfv
10.130.128.175  NBUdbLTCMAST
10.130.128.59   NBUdbLTCMED1


10.130.130.175  NBUdbTC3MAST
10.130.130.59   NBUdbTC3MED1


## Temporary SFTP server name - pfv
#10.130.239.13  db-ftp-01 db-ftp-01.intra.db.local
#10.130.198.13  db-ftp-01 db-ftp-01.intra.db.local
#10.130.238.41  db-ftp-01 db-ftp-01.intra.db.local
10.130.238.42   db-ftp-01 db-ftp-01.intra.db.local
[oracle@dblcys033 ~]$


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


[oracle@dblcys033 ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora.dblcys033 Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora.dblcys033
# Generated by Oracle configuration tools.


# DCL 24/11/2010 - Alias for spwebuni REMOTE_LISTENER
# DCL 24/11/2010 - Aliases for spwebuni LOCAL_LISTENER


LISTENERS_SPWEBUNI =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys033)(PORT = 1521))
      (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys034)(PORT = 1521))
    )
  )


orakle_ORG =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblc-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orakle.db)
    )
  )


LISTENER_SPWEBUNI2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys034)(PORT = 1521))
  )


LISTENER_SPWEBUNI1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys033)(PORT = 1521))
    (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys033)(PORT = 1900))
  )


LISTENERS_orakle =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys033)(PORT = 1521))
      (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys034)(PORT = 1521))
    )
  )


orakle_STANDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.130.130.38)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orakle.db)
    )
  )


LISTENER_orakle2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys034)(PORT = 1521))
  )


LISTENER_orakle1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST = dblcys033)(PORT = 1521))
    (ADDRESS = (PROTOCOL = tcp)(HOSt = dblcys033)(PORT = 1900))
  )


SPWEBUNI_STANDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.130.130.38)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = spwebuni.ls.de)
    )
  )


orakle =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys033-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys034-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orakle.db)
    )
  )


orakle1 =
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys033)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orakle.db)
      (INSTANCE_NAME = orakle1)
    )
  )


orakle2 =
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys034)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orakle.db)
      (INSTANCE_NAME = orakle2)
    )
  )


spwebuni =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys033-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys034-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = spwebuni.ls.de)
    )
  )


LISTENERS_LOCAL=
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys033-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys033-vip)(PORT = 1900))
  )


+ASM1 =
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dblcys033)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = +ASM)
      (INSTANCE_NAME = +ASM1)
    )
  )


[oracle@dblcys033 ~]$

Sunday 25 September 2011

RMAN : Retention Policy of recovery window and backup optimization on experiments

RMAN> show all;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
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 CHANNEL DEVICE TYPE DISK MAXPIECESIZE 1 G;
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 'D:\ORACLE\PRODUCT\10.2.0\DATABASE\SNCFNE
W1.ORA'; # default


RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=148 devtype=DISK
no obsolete backups found

RMAN>

D:\>rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Sun Sep 25 02:10:38 2011

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

connected to target database: NEW1 (DBID=1594352576)

RMAN> backup database plus archivelog;


Starting backup at 25-SEP-11
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=144 devtype=DISK
skipping archive log file D:\ORACLE\FRA\NEW1\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_
59_77LWX5YZ_.ARC; already backed up 2 time(s)
skipping archive log file D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_60_77
LWZRSH_.ARC; already backed up 1 time(s)
skipping archive log file D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_61_77
LX0VJQ_.ARC; already backed up 1 time(s)
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=62 recid=4 stamp=762482263
input archive log thread=1 sequence=63 recid=5 stamp=762486481
input archive log thread=1 sequence=64 recid=6 stamp=762571215
input archive log thread=1 sequence=65 recid=7 stamp=762582643
input archive log thread=1 sequence=66 recid=8 stamp=762735297
input archive log thread=1 sequence=67 recid=9 stamp=762735327
input archive log thread=1 sequence=68 recid=10 stamp=762747078
channel ORA_DISK_1: starting piece 1 at 25-SEP-11
channel ORA_DISK_1: finished piece 1 at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0AMND66B_1_1 tag=TAG20110925T0211
22 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 25-SEP-11

Starting backup at 25-SEP-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=D:\ORACLE\ORADATA\NEW1\SYSTEM.DBF
input datafile fno=00003 name=D:\ORACLE\ORADATA\NEW1\SYSAUX.DBF
input datafile fno=00002 name=D:\ORACLE\ORADATA\NEW1\UNDO.DBF
channel ORA_DISK_1: starting piece 1 at 25-SEP-11
channel ORA_DISK_1: starting piece 1 at 25-SEP-11
channel ORA_DISK_1: finished piece 1 at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0BMND66K_1_1 tag=TAG20110925T0211
32 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 25-SEP-11

Starting backup at 25-SEP-11
current log archived
using channel ORA_DISK_1
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=69 recid=11 stamp=762747118
channel ORA_DISK_1: starting piece 1 at 25-SEP-11
channel ORA_DISK_1: finished piece 1 at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0CMND67E_1_1 tag=TAG20110925T0211
58 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 25-SEP-11

Starting Control File and SPFILE Autobackup at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-00 comment=
NONE
Finished Control File and SPFILE Autobackup at 25-SEP-11

RMAN>
RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
using channel ORA_DISK_1
no obsolete backups found

RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_01MN3IS6_1_1
.BKP recid=1 stamp=762432390
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_02MN3ISV_1_1
.BKP recid=2 stamp=762432417
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\FRA\NEW1\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG
20110921T104830_77LWX806_.BKP recid=3 stamp=762432511
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T104956_77LWZXCT_.BKP recid=4 stamp=762432597
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNNDF_TAG20110
921T104958_77LWZZ36_.BKP recid=5 stamp=762432599
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCSNF_TAG20110
921T104958_77LX0T7G_.BKP recid=6 stamp=762432626
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T105027_77LX0X5O_.BKP recid=7 stamp=762432629
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCNNF_TAG20110
921T105122_77LX2MNN_.BKP recid=8 stamp=762432683
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNSNF_TAG20110
921T105122_77LX2OV9_.BKP recid=9 stamp=762432685
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0AMND66B_1_1 recid=10 stam
p=762747084
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0BMND66K_1_1 recid=11 stam
p=762747092
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0CMND67E_1_1 recid=12 stam
p=762747119
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-00 r
ecid=13 stamp=762747121
Crosschecked 13 objects

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
using channel ORA_DISK_1
no obsolete backups found

RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;

old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
new RMAN configuration parameters are successfully stored

RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_01MN3IS6_1_1
.BKP recid=1 stamp=762432390
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_02MN3ISV_1_1
.BKP recid=2 stamp=762432417
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\FRA\NEW1\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG
20110921T104830_77LWX806_.BKP recid=3 stamp=762432511
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T104956_77LWZXCT_.BKP recid=4 stamp=762432597
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNNDF_TAG20110
921T104958_77LWZZ36_.BKP recid=5 stamp=762432599
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCSNF_TAG20110
921T104958_77LX0T7G_.BKP recid=6 stamp=762432626
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T105027_77LX0X5O_.BKP recid=7 stamp=762432629
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCNNF_TAG20110
921T105122_77LX2MNN_.BKP recid=8 stamp=762432683
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNSNF_TAG20110
921T105122_77LX2OV9_.BKP recid=9 stamp=762432685
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0AMND66B_1_1 recid=10 stam
p=762747084
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0BMND66K_1_1 recid=11 stam
p=762747092
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0CMND67E_1_1 recid=12 stam
p=762747119
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-00 r
ecid=13 stamp=762747121
Crosschecked 13 objects


RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_01MN3IS6_1_1
.BKP recid=1 stamp=762432390
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_02MN3ISV_1_1
.BKP recid=2 stamp=762432417
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\FRA\NEW1\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG
20110921T104830_77LWX806_.BKP recid=3 stamp=762432511
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T104956_77LWZXCT_.BKP recid=4 stamp=762432597
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNNDF_TAG20110
921T104958_77LWZZ36_.BKP recid=5 stamp=762432599
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCSNF_TAG20110
921T104958_77LX0T7G_.BKP recid=6 stamp=762432626
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T105027_77LX0X5O_.BKP recid=7 stamp=762432629
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCNNF_TAG20110
921T105122_77LX2MNN_.BKP recid=8 stamp=762432683
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNSNF_TAG20110
921T105122_77LX2OV9_.BKP recid=9 stamp=762432685
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0AMND66B_1_1 recid=10 stam
p=762747084
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0BMND66K_1_1 recid=11 stam
p=762747092
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0CMND67E_1_1 recid=12 stam
p=762747119
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-00 r
ecid=13 stamp=762747121
Crosschecked 13 objects


RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           1      21-SEP-11
  Backup Piece       1      21-SEP-11          D:\ORACLE\PRODUCT\10.2.0\DATABASE
\SAN-MIGR_NEW1_01MN3IS6_1_1.BKP
Backup Set           2      21-SEP-11
  Backup Piece       2      21-SEP-11          D:\ORACLE\PRODUCT\10.2.0\DATABASE
\SAN-MIGR_NEW1_02MN3ISV_1_1.BKP
Archive Log          1      21-SEP-11          D:\ORACLE\FRA\NEW1\NEW1\ARCHIVELO
G\2011_09_21\O1_MF_1_59_77LWX5YZ_.ARC
Backup Set           3      21-SEP-11
  Backup Piece       3      21-SEP-11          D:\ORACLE\FRA\NEW1\NEW1\BACKUPSET
\2011_09_21\O1_MF_ANNNN_TAG20110921T104830_77LWX806_.BKP
Archive Log          2      21-SEP-11          D:\ORACLE\FRA\NEW1\ARCHIVELOG\201
1_09_21\O1_MF_1_60_77LWZRSH_.ARC
Backup Set           4      21-SEP-11
  Backup Piece       4      21-SEP-11          D:\ORACLE\FRA\NEW1\BACKUPSET\2011
_09_21\O1_MF_ANNNN_TAG20110921T104956_77LWZXCT_.BKP
Backup Set           6      21-SEP-11
  Backup Piece       6      21-SEP-11          D:\ORACLE\FRA\NEW1\BACKUPSET\2011
_09_21\O1_MF_NCSNF_TAG20110921T104958_77LX0T7G_.BKP

RMAN>

RMAN> show all;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
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 CHANNEL DEVICE TYPE DISK MAXPIECESIZE 1 G;
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 'D:\ORACLE\PRODUCT\10.2.0\DATABASE\SNCFNE
W1.ORA'; # default

RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters are successfully stored

RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_01MN3IS6_1_1
.BKP recid=1 stamp=762432390
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\SAN-MIGR_NEW1_02MN3ISV_1_1
.BKP recid=2 stamp=762432417
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=D:\ORACLE\FRA\NEW1\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG
20110921T104830_77LWX806_.BKP recid=3 stamp=762432511
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T104956_77LWZXCT_.BKP recid=4 stamp=762432597
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNNDF_TAG20110
921T104958_77LWZZ36_.BKP recid=5 stamp=762432599
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCSNF_TAG20110
921T104958_77LX0T7G_.BKP recid=6 stamp=762432626
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_ANNNN_TAG20110
921T105027_77LX0X5O_.BKP recid=7 stamp=762432629
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NCNNF_TAG20110
921T105122_77LX2MNN_.BKP recid=8 stamp=762432683
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\FRA\NEW1\BACKUPSET\2011_09_21\O1_MF_NNSNF_TAG20110
921T105122_77LX2OV9_.BKP recid=9 stamp=762432685
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0AMND66B_1_1 recid=10 stam
p=762747084
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0BMND66K_1_1 recid=11 stam
p=762747092
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0CMND67E_1_1 recid=12 stam
p=762747119
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-00 r
ecid=13 stamp=762747121
Crosschecked 13 objects


RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
no obsolete backups found

RMAN> crosscheck archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=144 devtype=DISK
validation failed for archived log
archive log filename=D:\ORACLE\FRA\NEW1\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_59_77
LWX5YZ_.ARC recid=1 stamp=762432510
validation succeeded for archived log
archive log filename=D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_60_77LWZRS
H_.ARC recid=2 stamp=762432592
validation succeeded for archived log
archive log filename=D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_61_77LX0VJ
Q_.ARC recid=3 stamp=762432627
validation succeeded for archived log
archive log filename=D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_22\O1_MF_1_62_77NFHZ2
7_.ARC recid=4 stamp=762482263
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00063_0762400640.001 reci
d=5 stamp=762486481
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00064_0762400640.001 reci
d=6 stamp=762571215
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00065_0762400640.001 reci
d=7 stamp=762582643
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00066_0762400640.001 reci
d=8 stamp=762735297
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00067_0762400640.001 reci
d=9 stamp=762735327
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00068_0762400640.001 reci
d=10 stamp=762747078
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00069_0762400640.001 reci
d=11 stamp=762747118
validation succeeded for archived log
archive log filename=D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00070_0762400640.001 reci
d=12 stamp=762777018
Crosschecked 12 objects


RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
no obsolete backups found

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
using channel ORA_DISK_1
no obsolete backups found

RMAN>

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     209715200 bytes

Fixed Size                     1295896 bytes
Variable Size                 67111400 bytes
Database Buffers             134217728 bytes
Redo Buffers                   7090176 bytes

RMAN> SHOW ALL;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
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 CHANNEL DEVICE TYPE DISK MAXPIECESIZE 1 G;
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 'D:\ORACLE\PRODUCT\10.2.0\DATABASE\SNCFNE
W1.ORA'; # default

RMAN> BACKUP DATABASE;

Starting backup at 25-SEP-11
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=D:\ORACLE\ORADATA\NEW1\SYSTEM.DBF
input datafile fno=00003 name=D:\ORACLE\ORADATA\NEW1\SYSAUX.DBF
input datafile fno=00002 name=D:\ORACLE\ORADATA\NEW1\UNDO.DBF
channel ORA_DISK_1: starting piece 1 at 25-SEP-11
channel ORA_DISK_1: finished piece 1 at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0GMNE6RK_1_1 tag=TAG20110925T1128
52 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 25-SEP-11

Starting Control File and SPFILE Autobackup at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-02 comment=
NONE
Finished Control File and SPFILE Autobackup at 25-SEP-11

MOUNT STAGE : DB SCN IS NOT CHANGING, HENCE NO NEED TO TAKE A NEW BACKUP BECAUSE WE HAVE DATAFILES WITH THE SAME SCNs.

RMAN> BACKUP DATABASE;

Starting backup at 25-SEP-11
using channel ORA_DISK_1
skipping datafile 1; already backed up 1 time(s)
skipping datafile 2; already backed up 1 time(s)
skipping datafile 3; already backed up 1 time(s)
Finished backup at 25-SEP-11

RMAN> BACKUP DATABASE;

Starting backup at 25-SEP-11
using channel ORA_DISK_1
skipping datafile 1; already backed up 1 time(s)
skipping datafile 2; already backed up 1 time(s)
skipping datafile 3; already backed up 1 time(s)
Finished backup at 25-SEP-11

RMAN>

OPEN MODE : DB SCN IS KEEP ON CHANGING HENCE THERE IS NEED TO PERFORM A FRESH BACKUP ALWAYS.

RMAN> ALTER DATABASE OPEN;

database opened

RMAN> BACKUP DATABASE;

Starting backup at 25-SEP-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=D:\ORACLE\ORADATA\NEW1\SYSTEM.DBF
input datafile fno=00003 name=D:\ORACLE\ORADATA\NEW1\SYSAUX.DBF
input datafile fno=00002 name=D:\ORACLE\ORADATA\NEW1\UNDO.DBF
channel ORA_DISK_1: starting piece 1 at 25-SEP-11
channel ORA_DISK_1: finished piece 1 at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0IMNE715_1_1 tag=TAG20110925T1131
49 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:26
Finished backup at 25-SEP-11

Starting Control File and SPFILE Autobackup at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-03 comment=
NONE
Finished Control File and SPFILE Autobackup at 25-SEP-11

RMAN>

RMAN> BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL;

Starting backup at 25-SEP-11
current log archived
using channel ORA_DISK_1
skipping archive log file D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_60_77
LWZRSH_.ARC; already backed up 1 time(s)
skipping archive log file D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_21\O1_MF_1_61_77
LX0VJQ_.ARC; already backed up 1 time(s)
skipping archive log file D:\ORACLE\FRA\NEW1\ARCHIVELOG\2011_09_22\O1_MF_1_62_77
NFHZ27_.ARC; already backed up 1 time(s)
skipping archive log file D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00063_0762400640.001
; already backed up 1 time(s)
skipping archive log file D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00064_0762400640.001
; already backed up 1 time(s)
skipping archive log file D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00065_0762400640.001
; already backed up 1 time(s)
skipping archive log file D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00066_0762400640.001
; already backed up 1 time(s)
skipping archive log file D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00067_0762400640.001
; already backed up 1 time(s)
skipping archive log file D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00068_0762400640.001
; already backed up 1 time(s)
skipping archive log file D:\ORACLE\PRODUCT\10.2.0\RDBMS\ARC00069_0762400640.001
; already backed up 1 time(s)
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=70 recid=12 stamp=762777018
input archive log thread=1 sequence=71 recid=13 stamp=762781309
channel ORA_DISK_1: starting piece 1 at 25-SEP-11
channel ORA_DISK_1: finished piece 1 at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\0KMNE7JU_1_1 tag=TAG20110925T1141
49 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 25-SEP-11

Starting Control File and SPFILE Autobackup at 25-SEP-11
piece handle=D:\ORACLE\PRODUCT\10.2.0\DATABASE\C-1594352576-20110925-04 comment=
NONE
Finished Control File and SPFILE Autobackup at 25-SEP-11

RMAN>

========================================================================================================================
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'x:\oracle\backups\%ORACLE_SID%\controlfiles\%F';
configure retention policy to redundancy 2;

run {
allocate channel ch1 type disk MAXPIECESIZE 1G;
crosscheck backup;
delete noprompt obsolete;
sql 'alter system switch logfile';
change archivelog all validate;
backup AS COMPRESSED BACKUPSET database
format 'x:\oracle\backups\%ORACLE_SID%\full\%d_%s_%U.DBF';
backup archivelog all
format 'x:\oracle\backups\%ORACLE_SID%\full\%d_%s_%U.ARC';
backup current controlfile
format 'x:\oracle\backups\%ORACLE_SID%\full\%d_%s_%U.CTL';
}
========================================================================================================================

TEST "RECOVERY WINDOW" ON PROD
AND BACKUP OPTIMIZATION
AND REPORT OBSOLETE

=======================================================================================================================

Wednesday 22 June 2011

RMAN test recovery


catalog start with '......' noprompt;

RMAN> recover datafile 3 test;

Starting recover at 22-JUN-2011 10:50:56
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=132 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=131 devtype=DISK

starting media recovery
RMAN-11006: WARNING: test recovery results:
ORA-10574: Test recovery did not corrupt any data block
ORA-10573: Test recovery tested redo from change 1153602 to 1153605
ORA-10572: Test recovery canceled due to errors
ORA-10585: Test recovery can not apply redo that may modify control file

media recovery complete, elapsed time: 00:00:01

Finished recover at 22-JUN-2011 10:51:04

RMAN> recover datafile 3;

Starting recover at 22-JUN-2011 10:51:46
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

starting media recovery
media recovery complete, elapsed time: 00:00:02

Finished recover at 22-JUN-2011 10:51:49

RMAN> sql 'alter database datafile 3 online';

sql statement: alter database datafile 3 online

RMAN> exit


Recovery Manager complete.

F:\export>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 22 10:52:15 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from v$recover_file;

no rows selected

Alert Log Messages
==================
Wed Jun 22 10:51:03 2011
alter database recover if needed
 datafile 3 test

Test Media Recovery Start
 ALLOW CORRUPTION option must use serial recovery
Wed Jun 22 10:51:03 2011
Recovery of Online Redo Log: Thread 1 Group 3 Seq 321 Reading mem 0
  Mem# 0 errs 0: F:\ORACLE\ORADATA\NEW1\REDO3.LOG
Test recovery cannot apply redo (17.3) that may modify controlfile
Wed Jun 22 10:51:04 2011
Test recovery canceled due to errors
Test recovery tested redo from change 1153602 to 1153605
Test recovery found no problems
ORA-10574 signalled during: alter database recover if needed
 datafile 3 test
...
Wed Jun 22 10:51:47 2011
alter database recover datafile list clear
Wed Jun 22 10:51:47 2011
Completed: alter database recover datafile list clear
Wed Jun 22 10:51:47 2011
alter database recover if needed
 datafile 3

Media Recovery Start

Tuesday 21 June 2011

How to fix expdp errors ORA-39095 and ORA-01466 ?

Below errors are fixed to make a correct expdp code :

ORA-39095: Dump file space has been exhausted
Sol: By increasing the filesize

ORA-01466: unable to read data - table definition has changed
Sol: Don't mention flashback_time parameter in export.
     OR
     At OS level, command prompt, do below before export :
     F:\export>set nls_date_format=DD-MM-YY HH24:MI:SS

F:\export>set nls_date_format=DD-MM-YY HH24:MI:SS

F:\export>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 21 02:30:15 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> conn u1/u1
Connected.
SQL> select max(LAST_DDL_TIME) from tab2;

MAX(LAST_DDL_TIME
-----------------
21-06-11 01:21:12

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

F:\export>del *.dmp

F:\export>expdp u1/u1@new1 parfile=exp.par

Export: Release 10.2.0.1.0 - Production on Tuesday, 21 June, 2011 2:30:55

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Starting "U1"."SYS_EXPORT_SCHEMA_04":  u1/********@new1 parfile=exp.par
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 2.937 MB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
. . exported "U1"."TAB2"                                 835.5 KB    9518 rows
. . exported "U1"."SYS_EXPORT_SCHEMA_03"                 214.8 KB    1091 rows
. . exported "U1"."SYS_EXPORT_SCHEMA_02"                 172.7 KB    1092 rows
. . exported "U1"."SYS_EXPORT_SCHEMA_01"                 127.3 KB    1059 rows
. . exported "U1"."TAB1"                                 9.039 KB       8 rows
Master table "U1"."SYS_EXPORT_SCHEMA_04" successfully loaded/unloaded
******************************************************************************
Dump file set for U1.SYS_EXPORT_SCHEMA_04 is:
  F:\EXPORT\U101.DMP
  F:\EXPORT\U102.DMP
  F:\EXPORT\U103.DMP
  F:\EXPORT\U104.DMP
Job "U1"."SYS_EXPORT_SCHEMA_04" successfully completed at 02:31:09


F:\export>del *.dmp

F:\export>type exp.par
#     On CMD
#       ======
# Check where your datapump directory is pointing, check dba_directories.

directory=datapump schemas=u1 FLASHBACK_TIME="TO_TIMESTAMP(SYSDATE, 'DD-MM-YYYY HH24:MI:SS')" dumpfile=u1%U.dmp logfile=u1.log filesize=500k

# Run this as expdp system/manager@new1 parfile=exp.par
F:\export>echo %nls_date_format%
DD-MM-YY HH24:MI:SS

F:\export>

How to set nls_date_format for SQLPLUS,RMAN and DATAPUMP etc tools

C:\Windows\System32>set nls_date_format=DD-MON-YYYY hh24:mi:ss

RMAN> RUN
2> {
3>   SET UNTIL TIME "to_date('14-05-2011 00:00:00','dd-mm-yyyy hh24:mi:ss')";
4>   RESTORE DATABASE;
5>   RECOVER DATABASE;
6> }

Saturday 18 June 2011

How to recreate damaged Sysaux tablespace to make export/import work

SQL> select distinct owner "user" from dba_tables where tablespace_name='SYSAUX';

user
------------------------------
MDSYS
DMSYS
TSMSYS
CTXSYS
OLAPSYS
SYSTEM
EXFSYS
DBSNMP
ORDSYS
SYSMAN
XDB

user
------------------------------
SYS
WMSYS

13 rows selected.

SQL> drop user mdsys cascade;

User dropped.

SQL> drop user dmsys cascade;

User dropped.

SQL> drop user tsmsys cascade;

User dropped.

SQL> drop user ctxsys cascade;

User dropped.

SQL> drop user olapsys cascade;

User dropped.

SQL> drop user exfsys cascade;

User dropped.

SQL> drop user dbsnmp cascade;

User dropped.

SQL> drop user ordsys cascade;

User dropped.

SQL> drop user sysman cascade;

User dropped.

SQL> drop user xdb cascade;

User dropped.

SQL> select distinct owner "user" from dba_tables where tablespace_name='SYSAUX';

user
------------------------------
SYSTEM
SYS
WMSYS

SQL> drop user wmsys cascade;

User dropped.

SQL> drop tablespace sysaux;
drop tablespace sysaux
*
ERROR at line 1:
ORA-01549: tablespace not empty, use INCLUDING CONTENTS option


SQL> drop tablespace sysaux INCLUDING CONTENTS;
drop tablespace sysaux INCLUDING CONTENTS
*
ERROR at line 1:
ORA-25183: index-organized table top index segment is in a different tablespace



SQL> drop tablespace sysaux INCLUDING CONTENTS;
drop tablespace sysaux INCLUDING CONTENTS
*
ERROR at line 1:
ORA-25183: index-organized table top index segment is in a different tablespace

SQL> select distinct IOT_TYPE from dba_tables;

IOT_TYPE
------------

IOT_OVERFLOW
IOT

select 'drop '||owner||'.'||table_name||';' from dba_tables where tablespace_name='SYSAUX';

SQL> select 'drop table '||owner||'.'||table_name||' cascade constraints;' from dba_tables where tablespace_name='SYSAUX';

Table dropped.

drop table SYS.SYS_IOT_OVER_9692 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table


drop table SYS.SYS$SERVICE_METRICS_TAB cascade constraints
               *
ERROR at line 1:
ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables


drop table SYS.AQ$_SYS$SERVICE_METRICS_TAB_S cascade constraints
               *
ERROR at line 1:
ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables


drop table SYS.SYS_IOT_OVER_10165 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table



Table dropped.

set long 999999
set linesize 150
select dbms_metadata.get_ddl('TABLE', table_name, owner) from dba_tables where iot_type like '%IOT%';

select 'drop table '||owner||'.'||table_name||' cascade constraints;' from dba_tables where iot_type like '%IOT%'and tablespace_name='SYSAUX';
         6
SQL> select 'drop table '||owner||'.'||table_name||' cascade constraints;' from dba_tables where iot_type like '%IOT%'and tablespace_name='SYSAUX';
drop table SYS.SYS_IOT_OVER_4478 cascade constraints;
drop table SYS.SYS_IOT_OVER_4484 cascade constraints;
drop table SYS.SYS_IOT_OVER_4488 cascade constraints;
drop table SYS.SYS_IOT_OVER_8799 cascade constraints;
drop table SYS.SYS_IOT_OVER_9692 cascade constraints;
drop table SYS.SYS_IOT_OVER_10165 cascade constraints;

6 rows selected.

SQL> drop table SYS.SYS_IOT_OVER_4478 cascade constraints;
drop table SYS.SYS_IOT_OVER_4478 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table


SQL> drop table SYS.SYS_IOT_OVER_4484 cascade constraints;
drop table SYS.SYS_IOT_OVER_4484 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table


SQL> drop table SYS.SYS_IOT_OVER_4488 cascade constraints;
drop table SYS.SYS_IOT_OVER_4488 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table


SQL> drop table SYS.SYS_IOT_OVER_8799 cascade constraints;
drop table SYS.SYS_IOT_OVER_8799 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table


SQL> drop table SYS.SYS_IOT_OVER_9692 cascade constraints;
drop table SYS.SYS_IOT_OVER_9692 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table


SQL> drop table SYS.SYS_IOT_OVER_10165 cascade constraints;
drop table SYS.SYS_IOT_OVER_10165 cascade constraints
               *
ERROR at line 1:
ORA-25191: cannot reference overflow table of an index-organized table

select 'drop table '||owner||'.'||table_name||' PURGE;' from dba_tables where iot_type like '%IOT%';

SQL> drop tablespace sysaux including contents and datafiles cascade constraints;
drop tablespace sysaux including contents and datafiles cascade constraints
*
ERROR at line 1:
ORA-24008: queue table SYS.ALERT_QT must be dropped first

SQL> startup migrate
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1248600 bytes
Variable Size              71303848 bytes
Database Buffers          213909504 bytes
Redo Buffers                7139328 bytes
Database mounted.
Database opened.
SQL> drop tablespace sysaux including contents and datafiles cascade constraints;
drop tablespace sysaux including contents and datafiles cascade constraints
*
ERROR at line 1:
ORA-24008: queue table SYS.ALERT_QT must be dropped first


SQL> drop table SYS.ALERT_QT;
drop table SYS.ALERT_QT
               *
ERROR at line 1:
ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables


SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE('SYS.ALERT_QT');
BEGIN DBMS_AQADM.DROP_QUEUE_TABLE('SYS.ALERT_QT'); END;

*
ERROR at line 1:
ORA-24012: cannot drop QUEUE_TABLE, some queues in SYS.ALERT_QT have not been
dropped
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 4084
ORA-06512: at "SYS.DBMS_AQADM", line 197
ORA-06512: at line 1


SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE('SYS.ALERT_QT') immediate;
BEGIN DBMS_AQADM.DROP_QUEUE_TABLE('SYS.ALERT_QT') immediate; END;

                                                  *
ERROR at line 1:
ORA-06550: line 1, column 51:
PLS-00103: Encountered the symbol "IMMEDIATE" when expecting one of the
following:
:= . ( % ;
The symbol ":=" was substituted for "IMMEDIATE" to continue.


SQL> exec dbms_aqadm.drop_queue_table(queue_table=>'SYS.ALERT_QT',force =>true);
BEGIN dbms_aqadm.drop_queue_table(queue_table=>'SYS.ALERT_QT',force =>true); END;

*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 4084
ORA-06512: at "SYS.DBMS_AQADM", line 197
ORA-06512: at line 1





select object_name,object_type from dba_objects where owner='SYS' and object_name like '%AQ%';


IF EXISTS(SELECT NULL
            FROM SYS.ALERT_QT) THEN
  DROP TABLE SYS.ALERT_QT;
END IF;



begin
    for r in ( select table_name from user_tables )
    loop
        execute immediate 'drop table '||r.table_name
                    ||' cascade constraints';
    end loop;
end;

Note 203225.1 - How to Manually Cleanup Advanced Queuing Tables
Note 236898.1 - Procedures to Remove Orphan AQ Objects which Fail to Drop via



     DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'<QUEUE_TABLE>',force => TRUE);
exec dbms_aqadm.drop_queue_table(queue_table=>'SYS.ALERT_QT',force =>true);

SELECT object_name, object_type FROM user_objects WHERE object_name like '%ALERT_QT%';


OBJECT_NAME                    OBJECT_TYPE
------------------------------ -------------------
ALERT_QT                       TABLE
AQ$ALERT_QT                    VIEW
AQ$ALERT_QT_R                  VIEW
AQ$ALERT_QT_S                  VIEW
AQ$_ALERT_QT_E                 QUEUE
AQ$_ALERT_QT_F                 VIEW
AQ$_ALERT_QT_G                 TABLE
AQ$_ALERT_QT_H                 TABLE
AQ$_ALERT_QT_I                 TABLE
AQ$_ALERT_QT_N                 SEQUENCE
AQ$_ALERT_QT_S                 TABLE
AQ$_ALERT_QT_T                 TABLE
AQ$_ALERT_QT_V                 EVALUATION CONTEXT

13 rows selected.

SQL> SELECT 'drop '||object_type||' '||object_name||' cascade constraints;' FROM user_objects WHERE object_name like '%ALERT_QT%';

'DROP'||OBJECT_TYPE||''||OBJECT_NAME||'CASCADECONSTRAINTS;'
--------------------------------------------------------------------------------
drop TABLE ALERT_QT cascade constraints;
drop VIEW AQ$ALERT_QT cascade constraints;
drop VIEW AQ$ALERT_QT_R cascade constraints;
drop VIEW AQ$ALERT_QT_S cascade constraints;
drop QUEUE AQ$_ALERT_QT_E cascade constraints;
drop VIEW AQ$_ALERT_QT_F cascade constraints;
drop TABLE AQ$_ALERT_QT_G cascade constraints;
drop TABLE AQ$_ALERT_QT_H cascade constraints;
drop TABLE AQ$_ALERT_QT_I cascade constraints;
drop SEQUENCE AQ$_ALERT_QT_N cascade constraints;
drop TABLE AQ$_ALERT_QT_S cascade constraints;
drop TABLE AQ$_ALERT_QT_T cascade constraints;
drop EVALUATION CONTEXT AQ$_ALERT_QT_V cascade constraints;

13 rows selected.

SQL> SELECT 'drop '||object_type||' '||object_name||' cascade constraints;' FROM user_objects WHERE object_name like '%ALERT_QT%';

'DROP'||OBJECT_TYPE||''||OBJECT_NAME||'CASCADECONSTRAINTS;'
--------------------------------------------------------------------------------
drop TABLE ALERT_QT cascade constraints;
drop VIEW AQ$ALERT_QT cascade constraints;
drop VIEW AQ$ALERT_QT_R cascade constraints;
drop VIEW AQ$ALERT_QT_S cascade constraints;
drop QUEUE AQ$_ALERT_QT_E cascade constraints;
drop VIEW AQ$_ALERT_QT_F cascade constraints;
drop TABLE AQ$_ALERT_QT_G cascade constraints;
drop TABLE AQ$_ALERT_QT_H cascade constraints;
drop TABLE AQ$_ALERT_QT_I cascade constraints;
drop SEQUENCE AQ$_ALERT_QT_N cascade constraints;
drop TABLE AQ$_ALERT_QT_S cascade constraints;
drop TABLE AQ$_ALERT_QT_T cascade constraints;
drop EVALUATION CONTEXT AQ$_ALERT_QT_V cascade constraints;

13 rows selected.

SQL> drop VIEW AQ$ALERT_QT cascade constraints;

View dropped.

SQL> drop VIEW AQ$ALERT_QT_R cascade constraints;

View dropped.

SQL> drop VIEW AQ$ALERT_QT_S cascade constraints;

View dropped.

SQL> drop QUEUE AQ$_ALERT_QT_E cascade constraints;
drop QUEUE AQ$_ALERT_QT_E cascade constraints
     *
ERROR at line 1:
ORA-00950: invalid DROP option


SQL> drop VIEW AQ$_ALERT_QT_F cascade constraints;

View dropped.

SQL> drop TABLE AQ$_ALERT_QT_G cascade constraints;

Table dropped.

SQL> drop TABLE AQ$_ALERT_QT_H cascade constraints;

Table dropped.

SQL> drop TABLE AQ$_ALERT_QT_I cascade constraints;

Table dropped.

SQL> drop SEQUENCE AQ$_ALERT_QT_N cascade constraints;
drop SEQUENCE AQ$_ALERT_QT_N cascade constraints
                             *
ERROR at line 1:
ORA-00933: SQL command not properly ended


SQL> drop TABLE AQ$_ALERT_QT_S cascade constraints;

Table dropped.

SQL> drop TABLE AQ$_ALERT_QT_T cascade constraints;

Table dropped.

SQL> drop EVALUATION CONTEXT AQ$_ALERT_QT_V cascade constraints;
drop EVALUATION CONTEXT AQ$_ALERT_QT_V cascade constraints
     *
ERROR at line 1:
ORA-00950: invalid DROP option


SQL> drop TABLE ALERT_QT cascade constraints;

Table dropped.

SQL> drop tablespace sysaux including contents and datafiles cascade constraints;

Tablespace dropped.

SQL>

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1248600 bytes
Variable Size              71303848 bytes
Database Buffers          213909504 bytes
Redo Buffers                7139328 bytes
Database mounted.
Database opened.
SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
TEMP
USERS
EXAMPLE
SWAMY
PERFSTAT

7 rows selected.

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> select tablespace_name,file_name from dba_data_files;

TABLESPACE_NAME
------------------------------
FILE_NAME
------------------------------------------------------------------------
USERS
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF

UNDOTBS1
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF

SYSTEM
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF

EXAMPLE
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF

SWAMY
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SWAMI01.DBF

PERFSTAT
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\PERF01.DBF


6 rows selected.

CREATE TABLESPACE sysaux
DATAFILE 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF' SIZE 300m
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

SQL> startup
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1248600 bytes
Variable Size              71303848 bytes
Database Buffers          213909504 bytes
Redo Buffers                7139328 bytes
Database mounted.
Database opened.
SQL> select tablespace_name,file_name from dba_data_files;

TABLESPACE_NAME
------------------------------
FILE_NAME
--------------------------------------------------------------------------------
USERS
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF

UNDOTBS1
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF

SYSTEM
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF

EXAMPLE
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF

SWAMY
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SWAMI01.DBF

PERFSTAT
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\PERF01.DBF


6 rows selected.

SQL> CREATE TABLESPACE sysaux
  2  DATAFILE 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF' SIZE 300m
  3  EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

Tablespace created.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

F:\>exp system/manager file=s111.dmp owner=scott

Export: Release 10.2.0.1.0 - Production on Sat May 21 20:34:24 2011

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'EXFSYS.DBMS_EXPFIL_DEPASEXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.LT_EXPORT_PKG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.LT_EXPORT_PKG"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.LT_EXPORT_PKG.schema_info_exp
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'DMSYS.DBMS_DM_MODEL_EXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling DMSYS.DBMS_DM_MODEL_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at "SYS.DBMS_FILE_GROUP_EXP", line 634
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_FILE_GROUP_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_LOGREP_EXP.schema_info_exp
. exporting foreign function library names for user SCOTT
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user SCOTT
About to export SCOTT's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export SCOTT's tables via Conventional Path ...
. . exporting table                          BONUS          0 rows exported
. . exporting table                           DEPT          4 rows exported
. . exporting table                            EMP         14 rows exported
. . exporting table                        EMP_BKP         14 rows exported
. . exporting table                        EMP_ORG         14 rows exported
. . exporting table                       SALGRADE          5 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'EXFSYS.DBMS_EXPFIL_DEPASEXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.LT_EXPORT_PKG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.LT_EXPORT_PKG"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.LT_EXPORT_PKG.schema_info_exp
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'DMSYS.DBMS_DM_MODEL_EXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling DMSYS.DBMS_DM_MODEL_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at "SYS.DBMS_FILE_GROUP_EXP", line 634
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_FILE_GROUP_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_LOGREP_EXP.schema_info_exp
. exporting statistics
Export terminated successfully with warnings.

@%ORACLE_HOME%\rdbms\admin\catexp.sql
login as SYS
run catmetx.sql then
run utlrp.sql

EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'EXFSYS.DBMS_EXPFIL_DEPASEXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.LT_EXPORT_PKG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.LT_EXPORT_PKG"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.LT_EXPORT_PKG.schema_info_exp
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'DMSYS.DBMS_DM_MODEL_EXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling DMSYS.DBMS_DM_MODEL_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at "SYS.DBMS_FILE_GROUP_EXP", line 634
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_FILE_GROUP_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_LOGREP_EXP.schema_info_exp
. exporting foreign function library names for user SCOTT
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user SCOTT
About to export SCOTT's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export SCOTT's tables via Conventional Path ...
. . exporting table                          BONUS          0 rows exported
. . exporting table                           DEPT          4 rows exported
. . exporting table                            EMP         14 rows exported
. . exporting table                        EMP_BKP         14 rows exported
. . exporting table                        EMP_ORG         14 rows exported
. . exporting table                       SALGRADE          5 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'EXFSYS.DBMS_EXPFIL_DEPASEXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.LT_EXPORT_PKG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.LT_EXPORT_PKG"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.LT_EXPORT_PKG.schema_info_exp
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'DMSYS.DBMS_DM_MODEL_EXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling DMSYS.DBMS_DM_MODEL_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at "SYS.DBMS_FILE_GROUP_EXP", line 634
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_FILE_GROUP_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_LOGREP_EXP.schema_info_exp
. exporting statistics
Export terminated successfully with warnings.

F:\export>

@%ORACLE_HOME%\rdbms\admin\catalog.sql
@%ORACLE_HOME%\rdbms\admin\catproc.sql
conn system/manager
@%ORACLE_HOME%\sqlplus\admin\pupbld.sql


BEGIN
*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_STATS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_STATS"
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_REGISTRY", line 560
ORA-06512: at "SYS.DBMS_REGISTRY", line 612
ORA-06512: at line 4


Connected.
SP2-0310: unable to open file "C:\oracle\product\10.2.0\db_1\rdbms\admin\pupbld.sql"
SQL>

EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.LT_EXPORT_PKG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.LT_EXPORT_PKG"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.LT_EXPORT_PKG.schema_info_exp
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'EXFSYS.DBMS_EXPFIL_DEPASEXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEXP.schema_info_exp
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'DMSYS.DBMS_DM_MODEL_EXP' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling DMSYS.DBMS_DM_MODEL_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at "SYS.DBMS_FILE_GROUP_EXP", line 634
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_FILE_GROUP_EXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "SYS.DBMS_LOGREP_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_LOGREP_EXP"
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_LOGREP_EXP.schema_info_exp
. exporting statistics
Export terminated successfully with warnings.

Next Plan
=========
Need to startup Upgrade and then upgrade the database by catupgrd.sql
then
cat102s.sql
then
utlrp.sql

Function created.

No errors.
SELECT version_script AS file_name FROM DUAL
       *
ERROR at line 1:
ORA-20000: Upgrade re-run not supported from version
ORA-06512: at "SYS.VERSION_SCRIPT", line 45


Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

F:\export>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 21 22:21:44 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1248600 bytes
Variable Size             113246888 bytes
Database Buffers          171966464 bytes
Redo Buffers                7139328 bytes
Database mounted.
Database opened.
SQL>