Saturday, April 28, 2012

Linux bootup ERROR:fsck.ext3:Bad magic number in super-block while trying to open /dev/sde1

Below is the step to resolve the error "Linux bootup ERROR:fsck.ext3:Bad magic number in super-block while trying to open /dev/sde1"
 

  • While trying to modify/remove entry from /etc/fstab it is not allowing by telling it is read only so follow the steps to first mount it in RW mode
  • If the correct root filesystem is already mounted, but just as read-only you can remount it read-write with
            mount -o remount,rw /

           then try to modify the /etc/fstab file

Changing the CHARACTERSET of database from WE8MSWIN1252 to AL32UTF8

These are the steps followed for changing the database characterset from WE8MSWIN1252 to AL32UTF8

I have to create a new DB with correct CHARACTERSET(AL32UTF8) & import the database dump to it, So in order to avoid losing data we have performed the below steps

We have followed document Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) [ID 260192.1] for it============================
START OF SCREENSHOT
============================
SQL> set TERMOUT ON
SQL> set ECHO ON
SQL> spool csminst.log
SQL> drop user csmig cascade;
drop user csmig cascade
          *
ERROR at line 1:
ORA-01918: user 'CSMIG' does not exist

SQL> @?/rdbms/admin/csminst.sql
SQL> rem
SQL> rem $Header: csmig/sql/csminst.sql /main/29 2008/09/09 00:47:40 ssubrama Exp $ csminst.sql
SQL> rem
SQL> rem Copyright (c) 1988, 2008, Oracle. All rights reserved.
SQL> rem
SQL> rem NAME
SQL> rem   csminst.sql
SQL> rem DESCRIPTION
SQL> rem   Create tables for Database Character Set Migration Utility
SQL> rem NOTE
SQL> rem   This script must be run while connected as SYS
SQL> rem MODIFIED
SQL> rem   ssubrama     09/04/08 - bug 7047837 fix create user
SQL> rem   nli       07/25/08 - fix bug 7256242, add the ORADATA user
SQL> rem   ssubrama     06/09/08 - bug 7047837 cleanup csmig schema for security
SQL> rem   xpeng        10/18/07 - fix bug 6460895
SQL> rem   ssubrama     01/09/07 - bug 5738695 add copyright information
SQL> rem   nli       08/02/06 - bug 5372557: CSX support. Add a CNVTYPE column into CSMIG.CSM$COLUMNS
SQL> rem   ywu       07/14/04 - up version
SQL> rem   fayang       04/23/04 - add column UNNESTED in CSM$TABLES
SQL> rem   fayang       04/06/04 - add SCNCOL# in EXTABLES and add a view for EXTABLES
SQL> rem   ywu       02/19/04 - fix bug 3434808, delete hard code passwd.
SQL> rem   ywu       07/29/03 - grant privilege to system for external table
SQL> rem   ywu       05/30/03 - add a table for data dictionary
SQL> rem   ywu       05/09/03 - add led parameter to csm$errors
SQL> rem   ywu       10/22/02 - add another error for codepoint exceed
SQL> rem   ywu       08/30/02 - up version
SQL> rem   ywu       07/01/02 - add size information
SQL> rem   ywu       07/02/02 - add resumable
SQL> rem   plinsley     01/24/02 - add include/exclude
SQL> rem   plinsley     04/02/01 - up version
SQL> rem   plinsley     03/23/01 - #1509940
SQL> rem   plinsley     03/26/01 - update views
SQL> rem   plinsley     12/15/00 - remove order by from view
SQL> rem   plinsley     11/03/00 - Add converter process column
SQL> rem   plinsley     10/04/00 - split tables that cross files
SQL> rem   plinsley     09/21/00 - Long ROWIDs in id
SQL> rem   plinsley     08/09/00 - Adding constraint dependency handling
SQL> rem   mtozawa      06/29/00 - add csmv$ views
SQL> rem   mtozawa      06/27/00 - add browid to csm$columns
SQL> rem   mtozawa      06/02/00 - specify the storage clause for csm$errors
SQL> rem   mtozawa      05/26/00 - bug1314547:optimize split mechanism, add blocks
SQL> rem   mtozawa      05/19/00 - Change table names from SCN$* to CSM$*
SQL> rem   mtozawa      03/08/00 - add SPLIT support
SQL> rem   mtozawa      12/21/99 - add property column to SCN$TABLES for IOT
SQL> rem   mtozawa      11/05/99 - remove storage params from SCN$ERRORS
SQL> rem   mtozawa      11/04/99 - add maxsiz to SCN$COLUMNS
SQL> rem   mtozawa      09/26/99 - Creation
SQL> rem
SQL>
SQL>
SQL> rem *****************************************************************
SQL> rem  The user CSMIG owns tables and procedures of Database Scanner
SQL> rem *****************************************************************
SQL> WHENEVER SQLERROR EXIT
SQL>
SQL> create user csmig identified by csmig password expire account lock
  2  /
User created.
SQL>
SQL> WHENEVER SQLERROR CONTINUE
SQL>
SQL> grant select on sys.obj$ to csmig
  2  /
Grant succeeded.
SQL> grant select on sys.col$ to csmig
  2  /
Grant succeeded.
SQL> grant select on sys.icol$ to csmig
  2  /
Grant succeeded.
SQL> grant select on sys.ind$ to csmig
  2  /
Grant succeeded.
SQL> grant select on sys.cdef$ to csmig
  2  /
Grant succeeded.
SQL> grant select on sys.con$ to csmig
  2  /
Grant succeeded.
SQL> grant select on sys.trigger$ to csmig
  2  /
Grant succeeded.
SQL> rem *****************************************************************
SQL> rem  DBA MUST ASSIGN PROPER TABLESPACE TO CSMIG
SQL> rem *****************************************************************
SQL> alter user csmig default tablespace SYSTEM quota unlimited on SYSTEM
  2  /
User altered.
SQL>
SQL> rem *****************************************************************
SQL> rem  Add version information for csm$* schema
SQL> rem  The schema version must be bumped up as csm$* schema get updated.
SQL> rem  VERSION HISTORY:
SQL> rem    1 ... 8.1.7
SQL> rem *****************************************************************
SQL> insert into sys.props$
  2  select 'NLS_CSMIG_SCHEMA_VERSION', 'x',
  3         'Character set migration utiltiy schema version #'
  4    from dual
  5   where not exists
  6         (select 'x' from sys.props$ where name = 'NLS_CSMIG_SCHEMA_VERSION')
  7  /
1 row created.
SQL> update sys.props$ set value$ = 5 where name = 'NLS_CSMIG_SCHEMA_VERSION'
  2  /
1 row updated.
SQL> rem *****************************************************************
SQL> rem  Database Scanner leaves the last scan parameters in CSM$PARAMETERS
SQL> rem  Each background process will read scan parameters from here.
SQL> rem *****************************************************************
SQL> create table csmig.csm$parameters
  2  ( name      varchar2(30) not null,                         /* paraneter name */
  3    value     varchar2(80) not null                        /* parameter value */
  4  )
  5  /
Table created.
SQL> drop public synonym csm$parameters
  2  /
drop public synonym csm$parameters
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$parameters for csmig.csm$parameters
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  Database Scanner saves the query string in CSM$QUERY
SQL> rem *****************************************************************
SQL> create table csmig.csm$query
  2  (
  3    value    clob not null                       /* query value */
  4  )
  5  /
Table created.
SQL> drop public synonym csm$query
  2  /
drop public synonym csm$query
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$query for csmig.csm$query
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  Database Scanner enumerate all tables need to be scanned
SQL> rem  Each background process will pick up a row from here for table to scan
SQL> rem *****************************************************************
SQL> create table csmig.csm$tables
  2  ( usr#      number not null,                   /* user id of the table owner */
  3    obj#      number not null,                       /* object id of the table */
  4    minrowid  rowid,          /* Minimum rowid of the split range of the table */
  5    maxrowid  rowid,          /* Maximum rowid of the split range of the table */
  6    property  number,                                        /* table property */
  7    blocks    number,                   /* number of blocks used by this table */
  8    files     number,                    /* number of files used by this table */
  9    who       number,              /* internal thread id who scanned the table */
 10    whoconv   number,            /* internal thread id who converted the table */
 11    lngconv   number,             /* internal thread id who converted long col */
 12    scnstart  date,                                 /* time table scan started */
 13    scnend    date,                               /* time table scan completed */
 14    scncols   number,                       /* number of columns to be scanned */
 15    scnrows   number,                                /* number of rows scanned */
 16    cnvstart  date,                              /* time table convert started */
 17    cnvend    date,                            /* time table convert completed */
 18    lngstart  date,                         /* time table convert long started */
 19    lngend    date,                       /* time table convert long completed */
 20    cnvcols   number,                     /* number of columns to be converted */
 21    cnvrows   number,                        /* number of rows to be converted */
 22    lngrows   number,               /* number of rows  of long to be converted */
 23    addsize   number,
 24    lastupd   rowid,                                      /* ROWID lastupdated */
 25    pstcvrows number,                      /* how many rows have been converted */
 26    lastupdlg rowid,                                      /* ROWID lastupdated */
 27    pstcvrowslg  number,                   /* how many rows have been converted */
 28    unnested  number                       /* if this table is unnested or not */
 29  )
 30  /
Table created.
SQL> drop public synonym csm$tables
  2  /
drop public synonym csm$tables
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$tables for csmig.csm$tables
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$COLUMNS contains statistic information of column data
SQL> rem *****************************************************************
SQL> create table csmig.csm$columns
  2  ( usr#       number not null,                  /* user id of the table owner */
  3    obj#       number not null,                      /* object id of the table */
  4    browid     rowid,                        /* rowid of the row in csm$tables */
  5    col#       number not null,                                   /* column id */
  6    intcol#    number not null,                /* internal column id (for ADT) */
  7    dty#       number not null,                            /* column data type */
  8    frm#       number not null,                          /* character set form */
  9    numrows    number not null,                /* number of rows in this table */
 10    nulcnt     number not null,                    /* number of null cell data */
 11    cnvcnt     number not null,    /* number of cell data that need to convert */
 12    cnvtype    number default 0 not null,                      /* convert type */
 13                 /* 1 = data in data dictionary, and can be converted by csconv*/
 14    errcnt     number not null,      /* number of cell data that has exception */
 15    sizerr     number not null, /* number of cell data that exceed column size */
 16    cnverr     number not null, /* number of cell data that undergo lossy conv.*/
 17    maxsiz     number not null,               /* max post conversion data size */
 18    chrsiz     number not null,            /* truncation due to char semantics */
 19    cnvsuc     number,                         /* cells converted successfully */
 20    cnvtrn     number,                      /* cells converted with truncation */
 21    cnvlos     number,                    /* cells converted with lossy result */
 22    cnvfai     number                               /* cells failed to convert */
 23  )
 24  /
Table created.
SQL> drop public synonym csm$columns
  2  /
drop public synonym csm$columns
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$columns for csmig.csm$columns
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$EXTABLES contains exception tables
SQL> rem *****************************************************************
SQL> create table csmig.csm$extables
  2  ( usr#       number not null,                  /* user id of the table owner */
  3    obj#       number not null,                      /* object id of the table */
  4    col#       number,                                            /* column id */
  5    intcol#    number,                         /* internal column id (for ADT) */
  6    dty#       number,                                     /* column data type */
  7    frm#       number,                                   /* character set form */
  8    property   number default 0 not null,                   /* property of row */
  9    scncol#    number                                /* column id to be scaned */
 10  )
 11  /
Table created.
SQL> drop public synonym csm$extables
  2  /
drop public synonym csm$extables
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$extables for csmig.csm$extables
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$ERRORS contains individual exception information
SQL> rem *****************************************************************
SQL> create table csmig.csm$errors
  2  ( err#       number not null,                              /* exception type */
  3    usr#       number not null,            /* user id of the object/data owner */
  4    obj#       number not null,                                  /* object id  */
  5    col#       number,                                 /* column id / position */
  6    intcol#    number,                         /* internal column id (for ADT) */
  7    typ#       number,                       /* column data type / object type */
  8    frm#       number,                                   /* character set form */
  9    cnvsize    number,                            /* post conversion data size */
 10    id$        varchar2(1000),              /* rowid / name to identify object */
 11    csidleds   number,                      /* number of charset id from led   */
 12    csidled1   number,                      /* first charset id from led       */
 13    csidled2   number,                      /* second charset id from led      */
 14    csidled3   number,                      /* third charset id from led       */
 15    langidleds number,                      /* number of language id from led  */
 16    langidled1 number,                      /* first language id from led      */
 17    langidled2 number,                      /* second language id from led     */
 18    langidled3 number                        /* third language id from led     */
 19  )
 20  pctfree 0 pctused 99
 21  storage(next 100K maxextents unlimited pctincrease 0)
 22  /
Table created.
SQL> drop public synonym csm$errors
  2  /
drop public synonym csm$errors
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$errors for csmig.csm$errors
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$LANGID contains summary information
SQL> rem *****************************************************************
SQL> create table csmig.csm$langid
  2  ( obj#       number not null,                                  /* object id  */
  3    langid     number,                                 /* language id from led */
  4    count      number
  5  )
  6  /
Table created.
SQL> drop public synonym csm$langid
  2  /
drop public synonym csm$langid
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$langid for csmig.csm$langid
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$CHARSETID contains summary information
SQL> rem *****************************************************************
SQL> create table csmig.csm$charsetid
  2  ( obj#       number not null,                                  /* object id  */
  3    csid       number,                                 /* language id from led */
  4    count      number
  5  )
  6  /
Table created.
SQL> drop public synonym csm$charsetid
  2  /
drop public synonym csm$charsetid
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$charsetid for csmig.csm$charsetid
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$INDEXES lists indexes to be disabled
SQL> rem *****************************************************************
SQL> create table csmig.csm$indexes
  2  ( obj#       number not null                       /* object id of the index */
  3  )
  4  /
Table created.
SQL> drop public synonym csm$indexes
  2  /
drop public synonym csm$indexes
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$indexes for csmig.csm$indexes
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$CONSTRAINTS lists constraints to be disabled
SQL> rem *****************************************************************
SQL> create table csmig.csm$constraints
  2  (
  3    rid        number not null,                   /* root constraint id         */
  4    lvl        number,                            /* constraint level           */
  5    con#       number not null                    /* internal constraint number */
  6  )
  7  /
Table created.
SQL> drop public synonym csm$constraints
  2  /
drop public synonym csm$constraints
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$constraints for csmig.csm$constraints
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$TRIGGERS lists triggers to be disabled
SQL> rem *****************************************************************
SQL> create table csmig.csm$triggers
  2  ( obj#       number not null                     /* object id of the trigger */
  3  )
  4  /
Table created.
SQL> drop public synonym csm$triggers
  2  /
drop public synonym csm$triggers
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$triggers for csmig.csm$triggers
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSM$DICTUSERS lists triggers to be disabled
SQL> rem *****************************************************************
SQL> create table csmig.csm$dictusers
  2  ( user#       number not null,                /* usre id for all data dictionary */
  3    username    varchar2(30)
  4  )
  5  /
Table created.
SQL> drop public synonym csm$dictusers
  2  /
drop public synonym csm$dictusers
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csm$dictusers for csmig.csm$dictusers
  2  /
Synonym created.
SQL> insert into csmig.csm$dictusers
  2    select distinct u.user_id, u.username from all_users u, sys.ku_noexp_view k
  3    where (k.OBJ_TYPE='USER' and k.name=u.username) or (u.username in ('SYSTEM', 'ORDDATA'))
  4  /
17 rows created.
SQL> rem
SQL> rem  define CSMV$ views
SQL> rem
SQL> rem *****************************************************************
SQL> rem  CSMV$TABLES lists tables (to be) scanned
SQL> rem *****************************************************************
SQL> create or replace view csmig.csmv$tables
  2        (owner_id, owner_name, table_id, table_name, MIN_ROWID, MAX_ROWID,
  3         BLOCKS, SCAN_COLUMNS, SCAN_ROWS, SCAN_START, SCAN_END)
  4      as
  5  select c.usr#, u.username, c.obj#, o.name,
  6         rowidtochar(c.minrowid), rowidtochar(c.maxrowid),
  7         c.blocks, c.scncols, c.scnrows,
  8         to_char(c.scnstart,'hh24:mi:ss'), to_char(c.scnend,'hh24:mi:ss')
  9    from csm$tables c, all_users u, sys.obj$ o
 10   where c.usr#=u.user_id and c.obj#=o.obj#
 11  /
View created.
SQL> drop public synonym csmv$tables
  2  /
drop public synonym csmv$tables
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csmv$tables for csmig.csmv$tables
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSMV$COLUMNS lists columns scanned
SQL> rem *****************************************************************
SQL> create or replace view csmig.csmv$columns
  2       (owner_id, owner_name, table_id, table_name, column_id, column_intid,
  3        column_name, column_type, total_rows, null_rows, conv_rows, error_rows,
  4        exceed_size_rows, data_loss_rows, cs_exceed_size_rows, max_post_convert_size)
  5      as
  6  select c.usr#, u.username, c.obj#, o.name, c.col#, c.intcol#, co.name,
  7         decode(c.frm#, 2, 'N', '') ||
  8         decode(c.dty#, 1, 'VARCHAR2', 8, 'LONG', 96, 'CHAR', 112, 'CLOB',''),
  9         c.numrows, c.nulcnt, c.cnvcnt, c.errcnt, c.sizerr, c.cnverr, c.chrsiz, c.maxsiz
 10    from csm$columns c, all_users u, sys.obj$ o, sys.col$ co
 11   where c.usr#=u.user_id and c.obj#=o.obj# and c.obj#=co.obj#
 12     and c.col#=co.col# and c.intcol#=co.intcol#
 13  /
View created.
SQL> drop public synonym csmv$columns
  2  /
drop public synonym csmv$columns
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csmv$columns for csmig.csmv$columns
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSMV$ERRORS lists exceptional data cell information
SQL> rem *****************************************************************
SQL> create or replace view csmig.csmv$errors
  2        (owner_id, owner_name, table_id, table_name,
  3         column_id, column_intid, column_name, data_rowid,
  4         column_type, error_type)
  5      as
  6  select e.usr#, u.username, e.obj#, o.name,
  7         e.col#, e.intcol#, c.name, e.id$,
  8         decode(e.frm#, 2, 'N', '') ||
  9         decode(e.typ#, 1, 'VARCHAR2', 8, 'LONG', 96, 'CHAR', 112, 'CLOB'),
 10         decode(e.err#, 0, 'CONVERTIBLE', 1, 'EXCEED_SIZE', 2, 'DATA_LOSS',
 11                        3, 'CS_EXCEED_SIZE')
 12    from csm$errors e, all_users u, sys.obj$ o, sys.col$ c
 13   where e.usr#=u.user_id and e.obj#=o.obj#
 14     and e.obj#=c.obj# and e.col#=e.col# and e.intcol#=c.intcol#
 15  /
View created.
SQL> drop public synonym csmv$errors
  2  /
drop public synonym csmv$errors
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csmv$errors for csmig.csmv$errors
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSMV$INDEXES lists all indexes to be disabled
SQL> rem *****************************************************************
SQL> create or replace view csmig.csmv$indexes
  2        (index_owner_id, index_owner_name, index_id, index_name,
  3         index_status#, index_status,
  4         table_owner_id, table_owner_name, table_id, table_name,
  5         column_id, column_intid, column_name)
  6      as
  7  select iu.user_id, iu.username, io.obj#, io.name, id.flags,
  8         decode(bitand(id.flags,1), 1, 'UNUSABLE', 'VALID'),
  9         bu.user_id, bu.username, bo.obj#, bo.name,
 10         cl.col#, cl.intcol#, cl.name
 11    from csm$indexes ci, sys.icol$ ic, sys.ind$ id, all_users iu,
 12         sys.obj$ io, all_users bu, sys.obj$ bo, sys.col$ cl
 13   where ci.obj#=ic.obj# and ci.obj#=id.obj#
 14     and ci.obj#=io.obj# and io.owner#=iu.user_id
 15     and ic.bo# =bo.obj# and bo.owner#=bu.user_id
 16     and ic.bo#=cl.obj# and ic.col#=cl.col# and ic.intcol#=cl.intcol#
 17  /
View created.
SQL> drop public synonym csmv$indexes
  2  /
drop public synonym csmv$indexes
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csmv$indexes for csmig.csmv$indexes
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSMV$CONSTRAINTS lists all constraints to be disabled
SQL> rem *****************************************************************
SQL> create or replace view csmig.csmv$constraints
  2        (owner_id, owner_name, constraint_id, constraint_name,
  3         constraint_type#, constraint_type, table_id, table_name,
  4         constraint_rid, constraint_level)
  5      as
  6  select c.owner#, u.username, c.con#, c.name, cd.type#,
  7         decode(cd.type#, 1, 'CHECK', 2, 'PRIMARY_KEY', 3, 'UNIQUE',
  8                          4, 'REFERENTIAL', 'UNKNOWN'),
  9         o.obj#, o.name, cc.rid, cc.lvl
 10    from csm$constraints cc, sys.cdef$ cd, sys.con$ c, all_users u, sys.obj$ o
 11   where cc.con#=cd.con# and cc.con#=c.con#
 12     and c.owner#=u.user_id and cd.obj#=o.obj#
 13  /
View created.
SQL> drop public synonym csmv$constraints
  2  /
drop public synonym csmv$constraints
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csmv$constraints for csmig.csmv$constraints
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSMV$TRIGGERS lists all triggers to be disabled
SQL> rem *****************************************************************
SQL> create or replace view csmig.csmv$triggers
  2        (trigger_owner_id, trigger_owner_name, trigger_id, trigger_name,
  3         table_owner_id, table_owner_name, table_id, table_name)
  4      as
  5  select ru.user_id, ru.username, tr.obj#, ro.name, bu.user_id,
  6         bu.username, tr.baseobject, bo.name
  7    from csm$triggers ct, sys.trigger$ tr, all_users ru, sys.obj$ ro,
  8         all_users bu, sys.obj$ bo
  9   where ct.obj#=tr.obj# and ct.obj#=ro.obj# and ro.owner#=ru.user_id
 10     and tr.baseobject=bo.obj# and bu.user_id=bo.owner#
 11  /
View created.
SQL> drop public synonym csmv$triggers
  2  /
drop public synonym csmv$triggers
                    *
ERROR at line 1:
ORA-01432: public synonym to be dropped does not exist

SQL> create public synonym csmv$triggers for csmig.csmv$triggers
  2  /
Synonym created.
SQL> rem *****************************************************************
SQL> rem  CSMV$EXTABLES lists all distinct objects to be scaned
SQL> rem *****************************************************************
SQL> create or replace view csmig.csmv$extables
  2        (obj#, usr#, property)
  3      as
  4  select     distinct(obj#), usr#, property
  5    from csm$extables where property=0;
View created.
SQL> /
View created.
SQL> rem *****************************************************************
SQL> rem  SYS.CSMV$KTFBUE wraps the fixed table sys.x$ktfbue in data
SQL> rem  dictionary for users only with DBA privilege to access
SQL> rem *****************************************************************
SQL> create or replace view sys.csmv$ktfbue as select * from sys.x$ktfbue;
View created.
SQL> /
View created.
SQL> grant select on sys.csmv$ktfbue to dba;
Grant succeeded.
SQL> /
Grant succeeded.
SQL> exit;
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@localhost ~]$ echo $ORACLE_SID
labdb
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 23 19:04:02 2012
Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> conn csmig/csmig
ERROR:
ORA-28000: the account is locked

Warning: You are no longer connected to ORACLE.
SQL> show user
USER is ""
SQL> conn / as sysdba
Connected.
SQL> alter account csmig unlock;
alter account csmig unlock
      *
ERROR at line 1:
ORA-00940: invalid ALTER command

SQL> alter user csmig account unlock;
User altered.
SQL> conn csmig/csmig
ERROR:
ORA-28001: the password has expired

Changing password for csmig
New password:
Retype new password:
ERROR:
ORA-01045: user CSMIG lacks CREATE SESSION privilege; logon denied

Password changed
Warning: You are no longer connected to ORACLE.
SQL> show user
USER is ""
SQL> conn / as sysdba
Connected.
SQL> alter user csmig identified by oracle;
User altered.
SQL> conn csmig/oracle
ERROR:
ORA-01045: user CSMIG lacks CREATE SESSION privilege; logon denied

Warning: You are no longer connected to ORACLE.
SQL> conn / as sysdba
Connected.
SQL> show user
USER is "SYS"
SQL> exit\
SP2-0584: EXIT variable "\" was non-numeric
Usage: { EXIT | QUIT }  [ SUCCESS | FAILURE | WARNING | n |
       <variable> | :<bindvariable> ]  [ COMMIT | ROLLBACK ]
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@localhost ~]$ pwd
/home/oracle
[oracle@localhost ~]$ which csscaner
/usr/bin/which: no csscaner in (/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/u01/app/oracle/oracle11201/bin/)
[oracle@localhost ~]$ which csscan
/u01/app/oracle/oracle11201/bin/csscan
[oracle@localhost ~]$ csscan TABLE='(SYS.SQL_VERSION$)' FROMCHAR=US7ASCII TOCHAR=US7ASCII LOG=instchkc CAPTURE=N PROCESS=1 ARRAY=1024000
csscan: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
[oracle@localhost ~]$ csscan
csscan: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
[oracle@localhost ~]$ ldd `which sysresv`
        linux-gate.so.1 =>  (0x00696000)
        libclntsh.so.11.1 => /u01/app/oracle/oracle11201/lib/libclntsh.so.11.1 (0x00697000)
        libnnz11.so => /u01/app/oracle/oracle11201/lib/libnnz11.so (0x00110000)
        libdl.so.2 => /lib/libdl.so.2 (0x0035d000)
        libm.so.6 => /lib/libm.so.6 (0x00361000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00388000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x003a0000)
        libc.so.6 => /lib/libc.so.6 (0x003b7000)
        libaio.so.1 => /usr/lib/libaio.so.1 (0x00508000)
        /lib/ld-linux.so.2 (0x00590000)
[oracle@localhost ~]$ echo $ORACLE_HOME
/u01/app/oracle/oracle11201
[oracle@localhost ~]$ cat /etc/oratab
#

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM:/u01/app/grid11201:N
labdb:/u01/app/oracle/oracle11201:N
[oracle@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/u01/app/oracle/oracle11201/bin/
[oracle@localhost ~]$ echo $LD_LIBRARY_PATH
[oracle@localhost ~]$ LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
[oracle@localhost ~]$ echo $LD_LIBRARY_PATH
/u01/app/oracle/oracle11201/lib:/usr/lib
[oracle@localhost ~]$ echo $CLASSPATH
[oracle@localhost ~]$ csscan

Character Set Scanner v2.2 : Release 11.2.0.1.0 - Production on Mon Apr 23 20:00:46 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Username:
Password:

ORA-01017: invalid username/password; logon denied
Scanner terminated unsuccessfully.
[oracle@localhost ~]$
[oracle@localhost ~]$
[oracle@localhost ~]$
[oracle@localhost ~]$ csscan TABLE='(SYS.SQL_VERSION$)' FROMCHAR=US7ASCII TOCHAR=US7ASCII LOG=instchkc CAPTURE=N PROCESS=1 ARRAY=1024000

Character Set Scanner v2.2 : Release 11.2.0.1.0 - Production on Mon Apr 23 20:01:51 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Username: / as sysdba
Password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Enumerating table to scan...
. process 1 scanning SYS.SQL_VERSION$[AAAACUAABAAAASYAAA]
Creating Database Scan Summary Report...
Creating Individual Exception Report...
Scanner terminated successfully.
[oracle@localhost ~]$ ls -ltr
total 80
drwxr-x--- 3 oracle oinstall  4096 Feb 25 19:55 oradiag_oracle
drwxr-xr-x 2 oracle oinstall  4096 Mar 21 00:02 backup
-rw-r--r-- 1 oracle oinstall 17710 Mar 29 18:38 dgdiag_phystby_labdb_Mar29_0638.out
-rw-r--r-- 1 oracle oinstall    69 Apr 22 08:42 afiedt.buf
-rw-r--r-- 1 oracle oinstall 25279 Apr 23 19:02 csminst.log
-rw-r--r-- 1 oracle oinstall   270 Apr 23 20:00 scan.out
-rw-r--r-- 1 oracle oinstall  7717 Apr 23 20:02 instchkc.txt
-rw-r--r-- 1 oracle oinstall   582 Apr 23 20:02 instchkc.out
-rw-r--r-- 1 oracle oinstall  1357 Apr 23 20:02 instchkc.err
[oracle@localhost ~]$ view instchkc.err

12.d) When using (full) export/import to go to a new/other AL32UTF8 database and there was NO "Truncation" data, only
"Convertible" and "Changeless" in the csscan done in point 4:
 expdp full=Y directory=TEST_DIR dumpfile=Full_labdb.dmp logfile=expdpFull.log
impdp full=Y directory=TEST_DIR dumpfile=Full_labdb.dmp logfile=impdpDB_testDB.log table_exists_action=replace



Tuesday, April 17, 2012

Disaster recovery using RMAN(losing both spfile & control file)

Hi ,
Here i had simulated a situation by manually deleting the spfile & control files from ASM location(we need to shutdown database in order to be able to delete control files)

Before this we need to check for the RMAN backup details.(backup sets)

The steps i followed are as below
========================


[oracle@localhost ~]$ ps -fe|grep pmon
grid      4157     1  0 16:18 ?        00:00:00 asm_pmon_+ASM
oracle    4405     1  0 16:25 ?        00:00:01 ora_pmon_LABDBSBY
oracle   13004 12464  0 20:46 pts/5    00:00:00 grep pmon
[oracle@localhost ~]$ export ORACLE_SID=labdb
[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Mon Apr 16 20:51:16 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> set dbid=1788478824

executing command: SET DBID

RMAN> startup force nomount

startup failed: ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/labdb/spfilelabdb.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/labdb/spfilelabdb.ora
ORA-15056: additional error message
ORA-17503: ksfdopn:DGOpenFile05 Failed to open file +DATA/labdb/spfilelabdb.ora
ORA-17503: ksfdopn:2 Failed to open file +DATA/labdb/spfilelabdb.ora
ORA-15173: entry 'spfilelabdb.ora' does not exist in directory 'labdb'
ORA-06512: at line 4

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area     159019008 bytes

Fixed Size                     1335192 bytes
Variable Size                 75497576 bytes
Database Buffers              79691776 bytes
Redo Buffers                   2494464 bytes

RMAN> restore spfile from autobackup;

Starting restore at 16-APR-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120416
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120415
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120414
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120413
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120412
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120411
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120410
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/16/2012 21:11:30
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> restore spfile to '+DATA/LABDB/spfilelabdb.ora' from '+DATA/labdb/autobackup/2012_04_16/s_780771691.600.780771707';

Starting restore at 16-APR-12
using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP +DATA/labdb/autobackup/2012_04_16/s_780771691.600.780771707
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 16-APR-12

RMAN> shutdown immediate

Oracle instance shut down

RMAN> startup force nomount;

Oracle instance started

Total System Global Area     803500032 bytes

Fixed Size                     1339516 bytes
Variable Size                222302084 bytes
Database Buffers             574619648 bytes
Redo Buffers                   5238784 bytes

RMAN> restore controlfile from autobackup;

Starting restore at 16-APR-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK

recovery area destination: +DATA
database name (or database unique name) used for search: LABDB
channel ORA_DISK_1: AUTOBACKUP +data/LABDB/AUTOBACKUP/2012_04_16/s_780771691.600.780771707 found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120416
channel ORA_DISK_1: restoring control file from AUTOBACKUP +data/LABDB/AUTOBACKUP/2012_04_16/s_780771691.600.780771707
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=+DATA/labdb/controlfile/current.260.780787841
Finished restore at 16-APR-12

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> restore database;

Starting restore at 16-APR-12
Starting implicit crosscheck backup at 16-APR-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=29 device type=DISK
Crosschecked 4 objects
Finished implicit crosscheck backup at 16-APR-12

Starting implicit crosscheck copy at 16-APR-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 16-APR-12

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

List of Cataloged Files
=======================
File Name: +data/LABDB/AUTOBACKUP/2012_04_16/s_780771691.600.780771707
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_211.602.780771917
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_212.603.780772319
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_213.606.780772735
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_214.610.780773129
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_215.612.780774801
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_216.613.780774867
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_217.616.780775293
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_218.617.780775679
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_219.620.780776059
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_220.622.780776441
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_221.623.780776827
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_222.625.780777205
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_223.628.780777587
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_224.630.780777965
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_225.631.780778341
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_226.634.780778727
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_227.635.780779109
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_228.638.780779499
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_229.640.780779879
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_230.641.780780261
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_231.643.780780649
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_232.646.780781035
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_233.647.780781419
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_234.650.780781805
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_235.652.780782187
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_236.653.780782567
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_237.655.780782953
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_238.658.780783337
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_239.659.780783729
File Name: +data/LABDB/ARCHIVELOG/2012_04_16/thread_1_seq_240.662.780784119

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA/labdb/datafile/system.256.776203549
channel ORA_DISK_1: restoring datafile 00002 to +DATA/labdb/datafile/sysaux.257.776203551
channel ORA_DISK_1: restoring datafile 00003 to +DATA/labdb/datafile/undotbs1.258.776203551
channel ORA_DISK_1: restoring datafile 00004 to +DATA/labdb/datafile/users.259.776203551
channel ORA_DISK_1: reading from backup piece +DATA/labdb/backupset/2012_04_16/nnndf0_tag20120416t165621_0.597.780771385
channel ORA_DISK_1: piece handle=+DATA/labdb/backupset/2012_04_16/nnndf0_tag20120416t165621_0.597.780771385 tag=TAG20120416T165621
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:59
Finished restore at 16-APR-12

RMAN> recover database;

Starting recover at 16-APR-12
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 210 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_210.598.780771501
archived log for thread 1 with sequence 211 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_211.602.780771917
archived log for thread 1 with sequence 212 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_212.603.780772319
archived log for thread 1 with sequence 213 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_213.606.780772735
archived log for thread 1 with sequence 214 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_214.610.780773129
archived log for thread 1 with sequence 215 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_215.612.780774801
archived log for thread 1 with sequence 216 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_216.613.780774867
archived log for thread 1 with sequence 217 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_217.616.780775293
archived log for thread 1 with sequence 218 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_218.617.780775679
archived log for thread 1 with sequence 219 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_219.620.780776059
archived log for thread 1 with sequence 220 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_220.622.780776441
archived log for thread 1 with sequence 221 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_221.623.780776827
archived log for thread 1 with sequence 222 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_222.625.780777205
archived log for thread 1 with sequence 223 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_223.628.780777587
archived log for thread 1 with sequence 224 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_224.630.780777965
archived log for thread 1 with sequence 225 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_225.631.780778341
archived log for thread 1 with sequence 226 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_226.634.780778727
archived log for thread 1 with sequence 227 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_227.635.780779109
archived log for thread 1 with sequence 228 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_228.638.780779499
archived log for thread 1 with sequence 229 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_229.640.780779879
archived log for thread 1 with sequence 230 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_230.641.780780261
archived log for thread 1 with sequence 231 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_231.643.780780649
archived log for thread 1 with sequence 232 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_232.646.780781035
archived log for thread 1 with sequence 233 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_233.647.780781419
archived log for thread 1 with sequence 234 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_234.650.780781805
archived log for thread 1 with sequence 235 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_235.652.780782187
archived log for thread 1 with sequence 236 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_236.653.780782567
archived log for thread 1 with sequence 237 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_237.655.780782953
archived log for thread 1 with sequence 238 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_238.658.780783337
archived log for thread 1 with sequence 239 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_239.659.780783729
archived log for thread 1 with sequence 240 is already on disk as file +DATA/labdb/archivelog/2012_04_16/thread_1_seq_240.662.780784119
archived log for thread 1 with sequence 241 is already on disk as file +DATA/labdb/onlinelog/group_3.261.779847493
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_210.598.780771501 thread=1 sequence=210
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_211.602.780771917 thread=1 sequence=211
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_212.603.780772319 thread=1 sequence=212
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_213.606.780772735 thread=1 sequence=213
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_214.610.780773129 thread=1 sequence=214
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_215.612.780774801 thread=1 sequence=215
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_216.613.780774867 thread=1 sequence=216
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_217.616.780775293 thread=1 sequence=217
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_218.617.780775679 thread=1 sequence=218
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_219.620.780776059 thread=1 sequence=219
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_220.622.780776441 thread=1 sequence=220
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_221.623.780776827 thread=1 sequence=221
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_222.625.780777205 thread=1 sequence=222
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_223.628.780777587 thread=1 sequence=223
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_224.630.780777965 thread=1 sequence=224
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_225.631.780778341 thread=1 sequence=225
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_226.634.780778727 thread=1 sequence=226
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_227.635.780779109 thread=1 sequence=227
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_228.638.780779499 thread=1 sequence=228
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_229.640.780779879 thread=1 sequence=229
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_230.641.780780261 thread=1 sequence=230
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_231.643.780780649 thread=1 sequence=231
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_232.646.780781035 thread=1 sequence=232
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_233.647.780781419 thread=1 sequence=233
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_234.650.780781805 thread=1 sequence=234
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_235.652.780782187 thread=1 sequence=235
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_236.653.780782567 thread=1 sequence=236
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_237.655.780782953 thread=1 sequence=237
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_238.658.780783337 thread=1 sequence=238
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_239.659.780783729 thread=1 sequence=239
archived log file name=+DATA/labdb/archivelog/2012_04_16/thread_1_seq_240.662.780784119 thread=1 sequence=240
archived log file name=+DATA/labdb/onlinelog/group_3.261.779847493 thread=1 sequence=241
media recovery complete, elapsed time: 00:00:32
Finished recover at 16-APR-12

RMAN> alter database open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 04/16/2012 21:54:02
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

RMAN> alter database open resetlogs;

database opened

RMAN>