30 December 2012

Step by Step to Disabling and droping old RAC instance Log group and thread

Step by Step to Disabling and droping old RAC instance Log group and thread

SQL> select GROUP#,THREAD# from v$log;
    GROUP#    THREAD#
---------- ----------
         1          1
         2          1
         3          1
         4          2
         5          2
         6          2
6 rows selected.
SQL> alter database drop logfile group 4;
alter database drop logfile group 4
*
ERROR at line 1:
ORA-01623: log 4 is current log for instance PROD2 (thread 2) - cannot drop
ORA-00312: online log 4 thread 2: '/u02/UAT02/data/redo04b.dbf'
ORA-00312: online log 4 thread 2: '+DGUAT02/uat02/onlinelog/group_4.385.803355387'
ORA-00312: online log 4 thread 2: '+DGUAT02/uat02/onlinelog/group_4.386.803355389'
SQL> ALTER DATABASE DISABLE THREAD 2;

Database altered.

SQL> alter database drop logfile group 4;

Database altered.

SQL> alter database drop logfile group 5;

Database altered.

SQL> alter database drop logfile group 6;

Database altered.

SQL>

Step by Step Migratation from NonASM to ASM database using RMAN

Step by Step Migratation from NonASM to ASM database using RMAN

Before stoping the database, we must know datafile,tempfile,logfile location .

SQL> select name from v$datafile;

NAME

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

/u02/PROD/data/system04.dbf

/u02/PROD/data/system05.dbf

/u02/PROD/data/ctxd01.dbf

/u02/PROD/data/owad01.dbf

SQL> select name from v$controlfile;

NAME

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

/u02/PROD/data/cntrl01.dbf

/u02/PROD/data/cntrl02.dbf

/u02/PROD/data/cntrl03.dbf

SQL>select GROUP#,MEMBER from v$logfile;

    GROUP#

----------

MEMBER

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

         3

/u02/PROD/data/redo03a.dbf

         3

/u02/PROD/data/redo03b.dbf

         2

/u02/PROD/data/redo02a.dbf

SQL> select FILE#,name from v$tempfile;

     FILE#

----------

NAME

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

         1

/u02/PROD/data/temp04.dbf

         2

/u02/PROD/data/temp03.dbf

         3

/u02/PROD/data/temp02.dbf

SQL> select name from v$asm_diskgroup where name='ASMPROD';

NAME

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

ASMPROD

1 rows selected.

SQL> exit

then Shutdown your database

SQL> shut immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.

Total System Global Area 6263357440 bytes

Fixed Size                  2171304 bytes

Variable Size            4244639320 bytes

Database Buffers         1996488704 bytes

Redo Buffers               20058112 bytes

Database mounted.

SQL>exit

Take Full backup of your Database using RMAN:-

[oraprod@prod02 ~]$ rman target / catalog rman/muthu@RMAN

Recovery Manager: Release 11.1.0.7.0 - Production on Sat Dec 29 23:22:21 2012

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

connected to target database: PROD (DBID=3877050111, not open)

connected to recovery catalog database

RMAN> backup as compressed backupset incremental level 0 cumulative tag LEVEL0_BACKUP filesperset 4 format '/l01/backup/PROD/level0/%d_LVL0_%T_%s' database;

Starting backup at 29-DEC-12

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=1983 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=1981 device type=DISK

input datafile file number=00396 name=/u02/PROD/data/a_summ01.dbf

channel ORA_DISK_4: starting piece 1 at 29-DEC-12

channel ORA_DISK_5: starting compressed incremental level 0 datafile backup set

channel ORA_DISK_5: specifying datafile(s) in backup set

input datafile file number=00038 name=/u02/PROD/data/a_media04.dbf

input datafile file number=00085 name=/u02/PROD/data/sysaux28.dbf

channel ORA_DISK_5: backup set complete, elapsed time: 00:04:43

channel ORA_DISK_6: finished piece 1 at 30-DEC-12

piece handle=/l01/backup/PROD/level0/PROD_LVL0_20121230_19000 tag=LEVEL0_BACKUP comment=NONE

channel ORA_DISK_6: backup set complete, elapsed time: 00:04:42

Finished backup at 30-DEC-12

RMAN>exit

[oraprod@prod02 dbs]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Sun Dec 30 00:36:55 2012

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

Connected to an idle instance.

SQL> startup nomount

ORACLE instance started.

Total System Global Area 6263357440 bytes

Fixed Size                  2171304 bytes

Variable Size            4244639320 bytes

Database Buffers         1996488704 bytes

Redo Buffers               20058112 bytes

SQL> exit

[oraprod@prod02 ~]$

Chnage below parameter on initPROD.ora file

Old value :   *.control_files='/u02/PROD/data/cntrl01.dbf','/u02/PROD/data/cntrl02.dbf','/u02/PROD/data/cntrl03.dbf'

New Value :   *.control_files='+DBIMP02','+DBIMP02'

[oraprod@prod02 ~]$ rman target /

Recovery Manager: Release 11.1.0.7.0 - Production on Sun Dec 30 00:37:35 2012

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

connected to target database: PROD (not mounted)

RMAN> restore controlfile from '/u02/PROD/data/cntrl01.dbf';

Starting restore at 30-DEC-12

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=1977 device type=DISK

channel ORA_DISK_1: copied control file copy

output file name=+ASMPROD/prod/controlfile/current.256.803349501

output file name=+ASMPROD/prod/controlfile/current.257.803349503

Finished restore at 30-DEC-12

RMAN>exit

[oraprod@prod02 dbs]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Sun Dec 30 00:36:55 2012

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

Connected to an idle instance

SQL> alter database mount;

Database altered.

SQL> exit

[oraprod@prod02 ~]$ rman target /

Recovery Manager: Release 11.1.0.7.0 - Production on Sun Dec 30 00:37:35 2012

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

connected to target database: PROD (not mounted)

RMAN>backup as copy database format '+ASMPROD';

Starting backup at 30-DEC-12

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=1977 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=1975 device type=DISK

channel ORA_DISK_1: starting datafile copy

input datafile file number=00030 name=/u02/PROD/data/sysaux03.dbf

channel ORA_DISK_2: starting datafile copy

input datafile file number=00034 name=/u02/PROD/data/undotbs5.dbf

output file name=+ASMPROD/prod/datafile/apps_ts_queues.364.803353979 tag=TAG20121230T004026 RECID=133 STAMP=803354005

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:26

output file name=+ASMPROD/prod/datafile/system.361.803353939 tag=TAG20121230T004026 RECID=132 STAMP=803354002

channel ORA_DISK_6: datafile copy complete, elapsed time: 00:01:07

Finished backup at 30-DEC-12

RMAN>switch database to copy;

datafile 1 switched to datafile copy "+ASMPROD/prod/datafile/system.351.803353795"

datafile 2 switched to datafile copy "+ASMPROD/prod/datafile/system.352.803353795"

datafile 3 switched to datafile copy "+ASMPROD/prod/datafile/system.353.803353795"

datafile 4 switched to datafile copy "+ASMPROD/prod/datafile/system.354.803353795"

datafile 405 switched to datafile copy "+ASMPROD/prod/datafile/apps_ts_tx_idx.287.803351559"

datafile 406 switched to datafile copy "+ASMPROD/prod/datafile/apps_ts_tx_idx.288.803351655"

datafile 407 switched to datafile copy "+ASMPROD/prod/datafile/apps_ts_seed.333.803353361"

RMAN> run {

set newname for tempfile 1 to '+ASMPROD';

set newname for tempfile 2 to '+ASMPROD';

set newname for tempfile 3 to '+ASMPROD';

set newname for tempfile 4 to '+ASMPROD';

set newname for tempfile 5 to '+ASMPROD';

set newname for tempfile 6 to '+ASMPROD';

set newname for tempfile 7 to '+ASMPROD';

set newname for tempfile 8 to '+ASMPROD';

set newname for tempfile 9 to '+ASMPROD';

switch tempfile all;

}2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to +ASMPROD in control file

renamed tempfile 8 to +ASMPROD in control file

renamed tempfile 9 to +ASMPROD in control file

RMAN>exit

[oraprod@prod02 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Sun Dec 30 02:05:02 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining

and Real Application Testing options

SQL> select name from v$datafile;

NAME

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

+ASMPROD/prod/datafile/system.351.803353795

+ASMPROD/prod/datafile/system.352.803353795

+ASMPROD/prod/datafile/system.353.803353795

SQL> select name from v$tempfile;

NAME

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

+ASMPROD

+ASMPROD

+ASMPROD

SQL> alter database open;

Database altered.

SQL> SELECT a.group#, b.member, a.status FROM v$log a, v$logfile b WHERE a.group#=b.group#;

GROUP# MEMBER                                   STATUS

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

         3 /u02/PROD/data/redo03a.dbf            INACTIVE

         3 /u02/PROD/data/redo03b.dbf            INACTIVE

         2 /u02/PROD/data/redo02a.dbf            INACTIVE

         2 /u02/PROD/data/redo02b.dbf            INACTIVE

         1 /u02/PROD/data/redo01a.dbf            CURRENT

         1 /u02/PROD/data/redo01b.dbf            CURRENT

         4 /u02/PROD/data/redo04a.dbf            UNUSED

         4 /u02/PROD/data/redo04b.dbf            UNUSED

         5 /u02/PROD/data/redo05a.dbf            UNUSED

         5 /u02/PROD/data/redo05b.dbf            UNUSED

         6 /u02/PROD/data/redo06a.dbf            UNUSED

    GROUP# MEMBER                                   STATUS

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

         6 /u02/PROD/data/redo06b.dbf            UNUSED

12 rows selected.

SQL> ALTER DATABASE ADD LOGFILE MEMBER '+ASMPROD' TO GROUP 1;

Database altered.

SQL> /

Database altered.

SQL> ALTER SYSTEM SWITCH LOGFILE;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> ALTER DATABASE DROP LOGFILE MEMBER '/u02/PROD/data/redo01a.dbf';

Database altered.

SQL> set line 200

SQL> col member for a40

SQL> SELECT a.group#, b.member, a.status FROM v$log a, v$logfile b WHERE a.group#=b.group#;

    GROUP# MEMBER                                   STATUS

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

         2 +ASMPROD/prod/onlinelog/group_2.387.8 CURRENT

           03355621

         1 +ASMPROD/prod/onlinelog/group_1.383.8 INACTIVE

           03355199

         1 +ASMPROD/prod/onlinelog/group_1.384.8 INACTIVE

           03355211

         2 +ASMPROD/prod/onlinelog/group_2.388.8 CURRENT

           03355625

    GROUP# MEMBER                                   STATUS

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

         3 +ASMPROD/prod/onlinelog/group_3.389.8 INACTIVE

           03355633

         3 +ASMPROD/prod/onlinelog/group_3.390.8 INACTIVE

           03355635

6 rows selected.

SQL>shut immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining

and Real Application Testing options

[oraprod@prod02 ~]$ vi /u01/PROD/oracle/db/tech_st/11.1.0/db_1/dbs/initPROD.ora

Change below parameter on initPROD.ora file

Old value :   *.control_files='+DBIMP02','+DBIMP02'

New Value :   *.control_files='+ASMPROD/prod/controlfile/current.256.803349501','+ASMPROD/prod/controlfile/current.257.803349503'

[oraprod@prod02 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Sun Dec 30 02:35:28 2012

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 6263357440 bytes

Fixed Size                  2171304 bytes

Variable Size            4244639320 bytes

Database Buffers         1996488704 bytes

Redo Buffers               20058112 bytes

Database mounted.

Database opened.

SQL>

29 December 2012

FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence Error 1017 received logging on to the standby

SQL> select * from v$archive_gap;

   THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
         1          2192           2212

SQL>

Stand by Alert log error:-

FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence
Sat Dec 29 10:12:21 2012
Fetching gap sequence in thread 1, gap sequence 2192-2212
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence
Sat Dec 29 10:12:31 2012
Fetching gap sequence in thread 1, gap sequence 2192-2212
Error 1017 received logging on to the standby

Solution :-

We have to recover Archive log from catalog database.

[orprod@muthu]$ rman target / catalog rman/muth123@RMAN

Recovery Manager: Release 11.2.0.2.0 - Production on Sat Dec 29 09:44:53 2012

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

connected to target database: PROD (DBID=2808283451)
connected to recovery catalog database

RMAN> run {
set archivelog destination to '/oracle/PROD/db/apps_st/archive';
restore archivelog from logseq=2192  until logseq=2212  thread=1;
 }2> 3> 4>

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 29-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=512 device type=DISK

archived log for thread 1 with sequence 2211 is already on disk as file /oracle/PROD/db/apps_st/archive/1_2211_785817078.dbf
archived log for thread 1 with sequence 2212 is already on disk as file /oracle/PROD/db/apps_st/archive/1_2212_785817078.dbf
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2192
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31041
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31041 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2193
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31042
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31042 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2194
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31043
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31043 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2195
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31044
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31044 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2196
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31045
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31045 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2197
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31046
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31046 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2199
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31048
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31048 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2198
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31047
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31047 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2201
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31050
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31050 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2200
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31049
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31049 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2203
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31052
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31052 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2202
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31051
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121228_31051 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2206
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31069
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31069 tag=TAG20121229T000928
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2205
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31068
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31068 tag=TAG20121229T000928
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2204
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31067
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31067 tag=TAG20121229T000928
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2208
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31074
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31074 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2207
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31073
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31073 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2210
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31076
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31076 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to user-specified destination
archived log destination=/oracle/PROD/db/apps_st/archive
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2209
channel ORA_DISK_1: reading from backup piece /backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31075
channel ORA_DISK_1: piece handle=/backup_pip/Prod_EBS/rman/PROD_ARCH_20121229_31075 tag=PROD ARCLOG BKP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 29-DEC-12

RMAN> exit

Login to stand by server stop and start the mrp services:-

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL>

Stand by alert log detail:-

Archived Log entry 350 added for thread 1 sequence 2211 rlc 785817078 ID 0xbc84a3b dest 2:
RFS[3]: Opened log for thread 1 sequence 2212 dbid -1486683845 branch 785817078
Sat Dec 29 10:23:01 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2202_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2203_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2204_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2205_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2206_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2207 (in transit)
Archived Log entry 351 added for thread 1 sequence 2212 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:10 2012
Archived Log entry 352 added for thread 1 sequence 2207 rlc 785817078 ID 0x0 dest 2:
Sat Dec 29 10:23:11 2012
RFS[2]: Opened log for thread 1 sequence 2215 dbid -1486683845 branch 785817078
RFS[1]: Opened log for thread 1 sequence 2216 dbid -1486683845 branch 785817078
Sat Dec 29 10:23:11 2012
RFS[3]: Opened log for thread 1 sequence 2217 dbid -1486683845 branch 785817078
Archived Log entry 353 added for thread 1 sequence 2216 rlc 785817078 ID 0xbc84a3b dest 2:
Archived Log entry 354 added for thread 1 sequence 2217 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:12 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2207_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2208_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2209_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2210_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2211_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2212_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2213_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2214_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2215 (in transit)
RFS[1]: Opened log for thread 1 sequence 2218 dbid -1486683845 branch 785817078
Sat Dec 29 10:23:17 2012
Primary database is in MAXIMUM PERFORMANCE mode
RFS[4]: Assigned to RFS process 24407
RFS[4]: No standby redo logfiles created for thread 1
RFS[4]: Opened log for thread 1 sequence 2219 dbid -1486683845 branch 785817078
Archived Log entry 355 added for thread 1 sequence 2218 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:25 2012
Archived Log entry 356 added for thread 1 sequence 2215 rlc 785817078 ID 0xbc84a3b dest 2:
Sat Dec 29 10:23:30 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2215_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2216_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2217_785817078.dbf
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2218_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2219 (in transit)
Sat Dec 29 10:26:04 2012
Archived Log entry 357 added for thread 1 sequence 2219 rlc 785817078 ID 0xbc84a3b dest 2:
RFS[4]: No standby redo logfiles created for thread 1
RFS[4]: Opened log for thread 1 sequence 2220 dbid -1486683845 branch 785817078
Sat Dec 29 10:26:06 2012
Media Recovery Log /oracle/PROD/db/apps_st/archive/1_2219_785817078.dbf
Media Recovery Waiting for thread 1 sequence 2220 (in transit)


verify the archive log gap:-

SQL> select * from v$archive_gap;

no rows selected

SQL>

Error 16191 PING[ARC2]: Heartbeat failed to connect to standby ORA-16191 ORA-01017 ORA-01031

Stand by Server alert log error:-


FAL[client, USER]: Error 16191 connecting to PRODNY for fetching gap sequence
Sat Dec 29 10:12:00 2012
Fetching gap sequence in thread 1, gap sequence 2192-2212
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
   
     

Primary Server Alert log error:-


PING[ARC2]: Heartbeat failed to connect to standby 'PRODVA'. Error is 16191.
Error 1017 received logging on to the standby
      returning error ORA-16191
PING[ARC2]: Heartbeat failed to connect to standby 'PRODVA'. Error is 16191.

Primary Server Trace file detail;-


OCISessionBegin failed -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'

*** 2012-12-29 08:00:10.260
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1031 and errmsg is 'ORA-01031: insufficient privileges
'
*** 2012-12-29 08:00:10.261 4265 krsh.c
Error 1031 received logging on to the standby
*** 2012-12-29 08:00:10.261 912 krsu.c
Error 1031 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'PRODVA'
Error 1031 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'PRODVA'
*** 2012-12-29 08:00:10.261 4265 krsh.c
Error 1031 for archive log file 1 to 'PRODVA'
*** 2012-12-29 08:00:10.261 2864 krsi.c
krsi_dst_fail: dest:2 err:1031 force:0 blast:1
ORA-01031: insufficient privileges

Cause:-


Password file got correpted or Password changes in Primary and standby servers or we have to check sec_case_sensitive_logon parameter on primary and standby.

SQL> show parameter sec_case_sensitive_logon;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     FALSE
SQL>

Solution:-


We have to recreate the passwd file or copy Primary server to Standby server.

Example:-


In cause sec_case_sensitive_logon parameter value is true, we have to use below orapwd command.

orapwd file=$ORACLE_HOME/dbs/orapwPROD password=muthu123 entries=10 ignorecase=y

In cause sec_case_sensitive_logon parameter value is false, we have to use below orapwd command.

orapwd file=$ORACLE_HOME/dbs/orapwPROD password=muthu123 entries=10

22 December 2012

RMAN-00571 RMAN-00569 RMAN-03002 RMAN-05501 RMAN-05597:Database started with server parameter file and PFILE clause used in command


Recently We have done the RMAN clone DEV from PROD that time We are faced  below Issue

 Error:-

channel ch1: CommVault Systems for Oracle: Version 9.0.0(BUILD84)
executing command: SET until clause
Starting Duplicate Db at Dec 21 2012 10:36:11
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/21/2012 10:36:11
RMAN-05501: aborting duplication of target database
RMAN-05597: Database started with server parameter file and PFILE clause used in command
Recovery Manager completed

Cause:-

Database mounted with spfile

Solution :-

We have to stop the Database then use startup pfile=<LOcation of Pfile> mount then your problem will resolved


 
Example:-

SQL> startup pfile=/oracle/product/db/tech_st/11.2.0/dba/initMUTH.ora mount

Then Provide dublicate database command


Comments are welcome!!!!!!!!!!

23 November 2012

Step by Step to create Duplicate database from active database10g using Rman

Step by Step create Rman Duplicate from active database10g


RMAN 'Duplicate From Active Database' Feature in 11G [ID 452868.1]

Creating a Duplicate Database on a New Host. [ID 388431.1]

1. Instance Oracle 10G database

2, Enable archive log mode

3, Prepare targetinstance

4, modify pfile db_file_name_convert,log_file_name_convert

# Set the below for the from and to location for all data files / redo
# logs to be cloned.
#db_file_name_convert =("source", "target")
db_file_name_convert =("/oradata/PROD/", "/oradata/AUX/") 

#log_file_name_convert =("source", "target")
log_file_name_convert =("/oradata/PROD/", "/oradata/AUX/")
#Set the below to the same as the production target

[oradev@muthu dbs]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Tue Oct 30 13:44:43 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area  150667264 bytes
Fixed Size                  1342736 bytes
Variable Size              96469744 bytes
Database Buffers           46137344 bytes
Redo Buffers                6717440 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oradev@muthu dbs]$ rman target sys/***@oracle3 catalog tst/tst@rman auxiliary /
Recovery Manager: Release 11.2.0.2.0 - Production on Tue Oct 30 13:45:05 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORC3DB (DBID=3030113310)
connected to recovery catalog database
connected to auxiliary database: ORADEV (not mounted)
RMAN> run {
  allocate auxiliary channel C1 device type disk
  duplicate target database to oradev
}
allocated channel: C1
channel C1: SID=63 device type=DISK
Starting Duplicate Db at 30-OCT-12
contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     150667264 bytes
Fixed Size                     1342736 bytes
Variable Size                 96469744 bytes
Database Buffers              46137344 bytes
Redo Buffers                   6717440 bytes
allocated channel: C1
channel C1: SID=63 device type=DISK
contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''ORC3DB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''ORADEV'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile;
   alter clone database mount;
}
executing Memory Script
sql statement: alter system set  db_name =  ''ORC3DB'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set  db_unique_name =  ''ORADEV'' comment= ''Modified by RMAN duplicate'' scope=spfile
0-20121029-01.ctl
channel C1: piece handle=/ORACLE2/oradata/test/rmanbkp1/c-3030113310-20121029-01.ctl tag=TAG20121029T100438
channel C1: restored backup piece 1
channel C1: restore complete, elapsed time: 00:00:01
output file name=/u02/app/oradata/devdir/control.ctl
Finished restore at 30-OCT-12
database mounted
contents of Memory Script:
{
   set until scn  345421;
   set newname for datafile  1 to
 "/u02/app/oradata/devdir/system.dbf";
   set newname for datafile  2 to
 "/u02/app/oradata/devdir/sysaux.dbf";
   set newname for datafile  3 to
 "/u02/app/oradata/devdir/undotbs.dbf";
   set newname for datafile  4 to
Oracle instance shut down
Oracle instance started
Total System Global Area     150667264 bytes
Fixed Size                     1342736 bytes
Variable Size                 96469744 bytes
Database Buffers              46137344 bytes
Redo Buffers                   6717440 bytes
allocated channel: C1
channel C1: SID=63 device type=DISK
Starting restore at 30-OCT-12
channel C1: starting datafile backup set restore
channel C1: restoring control file
channel C1: reading from backup piece /ORACLE2/oradata/test/rmanbkp1/c-303011331
 "/u02/app/oradata/devdir/userdata.dbf";
   set newname for datafile  5 to
 "/u02/app/oradata/devdir/ts1.dbf";
   set newname for datafile  6 to
 "/u02/app/oradata/devdir/ts2.dbf";
   restore
   clone database
   ;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 30-OCT-12
channel C1: starting datafile backup set restore
channel C1: specifying datafile(s) to restore from backup set
channel C1: restoring datafile 00001 to /u02/app/oradata/devdir/system.dbf
channel C1: restoring datafile 00004 to /u02/app/oradata/devdir/userdata.dbf
channel C1: restoring datafile 00006 to /u02/app/oradata/devdir/ts2.dbf
channel C1: reading from backup piece /ORACLE2/oradata/test/rmanbkp1/9dnov6fi_1_1.dbf
channel C1: piece handle=/ORACLE2/oradata/test/rmanbkp1/9dnov6fi_1_1.dbf tag=TAG20121029T100329
channel C1: restored backup piece 1
channel C1: restore complete, elapsed time: 00:00:45
channel C1: starting datafile backup set restore
channel C1: specifying datafile(s) to restore from backup set
channel C1: restoring datafile 00002 to /u02/app/oradata/devdir/sysaux.dbf
channel C1: restoring datafile 00003 to /u02/app/oradata/devdir/undotbs.dbf
channel C1: restoring datafile 00005 to /u02/app/oradata/devdir/ts1.dbf
channel C1: reading from backup piece /ORACLE2/oradata/test/rmanbkp1/9enov6fj_1_1.dbf
channel C1: piece handle=/ORACLE2/oradata/test/rmanbkp1/9enov6fj_1_1.dbf tag=TAG20121029T100329
channel C1: restored backup piece 1
channel C1: restore complete, elapsed time: 00:00:36
Finished restore at 30-OCT-12
contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=7 STAMP=798040042 file name=/u02/app/oradata/devdir/system.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=8 STAMP=798040042 file name=/u02/app/oradata/devdir/sysaux.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=9 STAMP=798040042 file name=/u02/app/oradata/devdir/undotbs.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=10 STAMP=798040042 file name=/u02/app/oradata/devdir/userdata.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=11 STAMP=798040043 file name=/u02/app/oradata/devdir/ts1.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=12 STAMP=798040043 file name=/u02/app/oradata/devdir/ts2.dbf
contents of Memory Script:
{
   set until scn  345421;
   recover
 clone database
    delete archivelog
   ;
}
executing Memory Script
executing command: SET until clause
Starting recover at 30-OCT-12
starting media recovery
archived log for thread 1 with sequence 70 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_70_796934633.dbf
archived log for thread 1 with sequence 71 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_71_796934633.dbf
archived log for thread 1 with sequence 72 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_72_796934633.dbf
archived log for thread 1 with sequence 73 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_73_796934633.dbf
archived log for thread 1 with sequence 74 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_74_796934633.dbf
archived log for thread 1 with sequence 75 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_75_796934633.dbf
archived log for thread 1 with sequence 76 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_76_796934633.dbf
archived log for thread 1 with sequence 77 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_77_796934633.dbf
archived log for thread 1 with sequence 78 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_78_796934633.dbf
archived log for thread 1 with sequence 79 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_79_796934633.dbf
archived log for thread 1 with sequence 80 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_80_796934633.dbf
archived log for thread 1 with sequence 81 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_81_796934633.dbf
archived log for thread 1 with sequence 82 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_82_796934633.dbf
archived log for thread 1 with sequence 83 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_83_796934633.dbf
archived log for thread 1 with sequence 84 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_84_796934633.dbf
archived log for thread 1 with sequence 85 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_85_796934633.dbf
archived log for thread 1 with sequence 86 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_86_796934633.dbf
archived log for thread 1 with sequence 87 is already on disk as file /ORACLE2/oradata1/orc3dir/arch/1_87_796934633.dbf
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_70_796934633.dbf thread=1 sequence=70
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_71_796934633.dbf thread=1 sequence=71
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_72_796934633.dbf thread=1 sequence=72
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_73_796934633.dbf thread=1 sequence=73
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_74_796934633.dbf thread=1 sequence=74
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_75_796934633.dbf thread=1 sequence=75
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_86_796934633.dbf thread=1 sequence=86
archived log file name=/ORACLE2/oradata1/orc3dir/arch/1_87_796934633.dbf thread=1 sequence=87
media recovery complete, elapsed time: 00:00:24
Finished recover at 30-OCT-12
Oracle instance started
Total System Global Area     150667264 bytes
Fixed Size                     1342736 bytes
Variable Size                 96469744 bytes
Database Buffers              46137344 bytes
Redo Buffers                   6717440 bytes
contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''ORADEV'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script
sql statement: alter system set  db_name =  ''ORADEV'' comment= ''Reset to original value by RMAN'' scope=spfile
sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     150667264 bytes
Fixed Size                     1342736 bytes
Variable Size                 96469744 bytes
Database Buffers              46137344 bytes
Redo Buffers                   6717440 bytes
allocated channel: C1
channel C1: SID=63 device type=DISK
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ORADEV" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      2
  MAXDATAFILES       30
  MAXINSTANCES     1
MAXLOGHISTORY     1103
 LOGFILE
  GROUP  1 ( '/u02/app/oradata/devdir/redolog1.log' ) SIZE 4 M  REUSE,
  GROUP  2 ( '/u02/app/oradata/devdir/redolog2.log' ) SIZE 4 M  REUSE
 DATAFILE
  '/u02/app/oradata/devdir/system.dbf'
 CHARACTER SET US7ASCII

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u02/app/oradata/devdir/temp.dbf";
   switch clone tempfile all;
   catalog clone datafilecopy  "/u02/app/oradata/devdir/sysaux.dbf", "/u02/app/oradata/devdir/undotbs.dbf",
 "/u02/app/oradata/devdir/userdata.dbf",
 "/u02/app/oradata/devdir/ts1.dbf",
 "/u02/app/oradata/devdir/ts2.dbf";
   switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u02/app/oradata/devdir/temp.dbf in control file
cataloged datafile copy
datafile copy file name=/u02/app/oradata/devdir/sysaux.dbf RECID=1 STAMP=798040098
cataloged datafile copy
datafile copy file name=/u02/app/oradata/devdir/undotbs.dbf RECID=2 STAMP=798040098
cataloged datafile copy
datafile copy file name=/u02/app/oradata/devdir/userdata.dbf RECID=3 STAMP=798040098
cataloged datafile copy
datafile copy file name=/u02/app/oradata/devdir/ts1.dbf RECID=4 STAMP=798040098
cataloged datafile copy
datafile copy file name=/u02/app/oradata/devdir/ts2.dbf RECID=5 STAMP=798040098
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=798040098 file name=/u02/app/oradata/devdir/sysaux.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=798040098 file name=/u02/app/oradata/devdir/undotbs.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=798040098 file name=/u02/app/oradata/devdir/userdata.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=798040098 file name=/u02/app/oradata/devdir/ts1.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=798040098 file name=/u02/app/oradata/devdir/ts2.dbf
contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 30-OCT-12
released channel: C1
RMAN> exit

Recovery Manager complete.
[oradev@muthu dbs]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Tue Oct 30 13:49:47 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>select instance_name,status from v$instance;
INSTANCE_NAME    STATUS
---------------- ------------
oradev           OPEN
SQL>

22 October 2012

passwd: Authentication token manipulation error


passwd: Authentication token manipulation error on Linux 

[muthu@testserver ~]$ passwd
Changing password for user muthu.
Changing password for muthu
(current) UNIX password:
passwd: Authentication token manipulation error

[muthu@testserver ~]$ ls -lrt /etc/passwd


-rw-r--r-- 1 root root 2499 Oct 17 05:17 /etc/passwd
[muthu@testserver ~]$ ls -lrt /etc/shadow
-r-------- 1 root root 1899 Oct 17 05:15 /etc/shadow
[muthu@testserver ~]$ cat /etc/shadow
cat: /etc/shadow: Permission denied
[muthu@testserver ~]$ su -
Password:
[root@testserver ~]# chmod -R 755 /etc/shadow /etc/passwd
[root@testserver ~]# su - muthu

Password:
[muthu@testserver ~]$ passwd
Changing password for user muthu.
Changing password for muthu
(current) UNIX password:
New UNIX password:

Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[muthu@testserver ~]# ls -lr /etc/shadow /etc/passwd
-rwxr-xr-x 1 root root 1920 Oct 22 01:42 /etc/shadow
-rwxr-xr-x 1 root root 2499 Oct 17 05:17 /etc/passwd
[muthu@testserver ~]$





21 August 2012

Error in involking target 'libso_install bld_install

Developer suit1og Installation Error:.


Logfile Detail:-

/usr/bin/ar x /oracle/OraHome_1/lib//librw.a zrhitem.o zrhcursor.o
rm -f rwbuilder
gcc -o rwbuilder -L/oracle/OraHome_1//lib/ -L/oracle/OraHome_1/lib/ -L/oracle/OraHome_1/lib//stubs  -rdynamic -Bdynamic -L/oracle/OraHome_1/jdk/jre/lib/i386 -L/oracle/OraHome_1/jdk/jre/lib/i386/server -L/oracle/OraHome_1/jdk/jre/lib/i386/native_threads -ljvm rxmasb.o /oracle/OraHome_1/reports/lib/ui10.o /oracle/OraHome_1/reports/lib/uiicxd.o /oracle/OraHome_1/reports/lib/rwsng.o /oracle/OraHome_1/reports/lib/rwscl.o /oracle/OraHome_1/reports/lib/rwssc.o /oracle/OraHome_1/reports/lib/rwssc0.o /oracle/OraHome_1/reports/lib/rwsdt.o -lrw /oracle/OraHome_1/lib//librw.a  -lobx   -lnn -lrws -lde /oracle/OraHome_1/lib//libzrc.a -lrws   -lucol -luicc -lca -lmma -lmmiw -lmmov -lmma -lmmos -lmmoi  -lmmia -lmmft -lmmcm  -lvgs -luihx -luc -luipr -luimotif -lot -lrem -lree -lrec -luiimg -luimotif -luipr -luiimg -luc -lrem -luimotif -luia -ltknqap -luipr -luimotif -lutt -lix -lixd -lrod -lror -lros -lrod -lror -lros -lrod -luat  -ldfc -lutc -lutj -lutl -lutsl -lpls10  -lplp10 /oracle/OraHome_1/lib/libplc10.a -lpls10  -lplp10 -lslax10 -lsql10 -lclntsh  `cat /oracle/OraHome_1/lib/ldflags`    -lnsslb10  -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /oracle/OraHome_1/lib/ldflags`    -lnsslb10  -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm  -lcore10  -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /oracle/OraHome_1/lib/ldflags`    -lnsslb10  -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /oracle/OraHome_1/lib/ldflags`    -lnsslb10  -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10    -lcore10  -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10  -lcore10  -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /oracle/OraHome_1/lib/sysliblist` -Wl,-rpath,/oracle/OraHome_1/lib,-rpath,/oracle/OraHome_1/jdk/jre/lib/i386:/lib:/usr/lib -lm    `cat /oracle/OraHome_1/lib/sysliblist` -ldl -lpthread -lm   -L/oracle/OraHome_1/lib -L/oracle/OraHome_1/lib/stubs/ -lsnls10 -lpthread  -ljvm -lhpi -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -lXm -lXt -lX11 -lm -lXp -lXext  /oracle/OraHome_1/lib//librw.a -lnsl
/usr/lib/libXtst.so.6: undefined reference to `__stack_chk_fail@GLIBC_2.4'
/usr/lib/libXtst.so.6: undefined reference to `__fprintf_chk@GLIBC_2.3.4'
/usr/lib/libXtst.so.6: undefined reference to `__sprintf_chk@GLIBC_2.3.4'
collect2: ld returned 1 exit status
make: *** [rwbuilder] Error 1


Solution:-

[root@dev108 ~]# unlink /usr/lib/libXtst.so.6
[root@dev108 ~]# ln -s /usr/X11R6/lib/libXtst.so.6.1 /usr/lib/libXtst.so.6
[root@dev108 ~]#

07 August 2012

Step by Step Create Business Continuity Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database Part -4

Business Continuity Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database Part -4

On Stand by server :-

SQL> startup nomount
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter database open read only;

Database altered.

SQL> alter database register physical logfile '/xprodarch/xprodarch/XPROD/archive/XPROD_1_152_789237530.arch';

Switch over to Primary as a Standby

SQL> startup
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
Database mounted.
Database opened.
SQL> alter database commit to switchover to primary with session shutdown;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ WRITE

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /xprodarch/xprodarch/XPROD/archive
Oldest online log sequence 180
Next log sequence to archive 181
Current log sequence 181
SQL> alter system switch logfile;

System altered.

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
--------------------
TO STANDBY

SQL> shut immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

SQL> show parameter;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string enable

SQL> alter system set log_archive_dest_state_2=defer;

System altered.

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
--------------------
SESSIONS ACTIVE

SQL> select database_role, open_mode from v$database;

DATABASE_ROLE OPEN_MODE
---------------- ----------
PHYSICAL STANDBY MOUNTED

SQL>

Switching Standby as a Primary :-

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /xprodarch/xprodarch/XPROD/archive
Oldest online log sequence 178
Next log sequence to archive 0
Current log sequence 182

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

SQL> alter database open;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ ONLY

SQL> alter database commit to switchover to primary with session shutdown;

Database altered.

SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
Database mounted.
Database opened.
SQL> show parameter;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string defer

SQL> alter system set log_archive_dest_state_2=enable;

System altered.

SQL> select database_role, open_mode from v$database;

DATABASE_ROLE OPEN_MODE
---------------- ----------
PRIMARY READ WRITE

SQL>

Preparing Standby application :-

$ sqlplus apps/apps

SQL> exec fnd_conc_clone.setup_clean

Run auto Config on Database tier

$ adclonectx.pl /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibms22/appl/admin/XPROD_bcibms22.xml

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adclonectx Version 120.23.12010000.1

Running:
/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jlib/ojdbc14.jar:/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jlib/xmlparserv2.jar:/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/../jlib/java oracle.apps.ad.context.CloneContext -e /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibms22/appl/admin/XPROD_bcibms22.xml
Enter the APPS password : apps

Log file located at /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/CloneContext_0728123328.log

Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [bcibmp15] :

It is recommended that your inputs are validated by the program.
However you might choose not to validate them under following circumstances:

-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and
you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.

Do you want the inputs to be validated (y/n) [n] ? :
Target System Database SID : XPROD
Target System Database Server Node [bcibmp15] :
Target System Base Directory : /xprodfm/xprodfm/XPROD
Target System Tools ORACLE_HOME Directory [/xprodfm/xprodfm/XPROD/apps/tech_st/10.1.2] :
Target System Web ORACLE_HOME Directory [/xprodfm/xprodfm/XPROD/apps/tech_st/10.1.3] :
Target System APPL_TOP Directory [/xprodfm/xprodfm/XPROD/apps/apps_st/appl] :
Target System COMMON_TOP Directory [/xprodfm/xprodfm/XPROD/apps/apps_st/comn] :
Target System Instance Home Directory [/xprodfm/xprodfm/XPROD/inst] :
Username for the Applications File System Owner [xappl] :
Group for the Applications File System Owner [dba] :
Target System Root Service [enabled] :
Target System Web Entry Point Services [enabled] :
Target System Web Application Services [enabled] :
Target System Batch Processing Services [enabled] :
Target System Other Services [disabled] :
Do you want to preserve the Display [bcibms22:0.0] (y/n) ? : n
Target System Display [bcibmp15:0.0] :
Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 50
Checking the port pool 50
done: Port Pool 50 is free
Report file located at /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/admin/out/portpool.lst
Complete port information available at /xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /xprodtmp
3. /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/outbound/XPROD_bcibmp15
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 2

Creating the new APPL_TOP Context file from :
/xprodfm/xprodfm/XPROD/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :
/xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/appl/admin/XPROD_bcibmp15.xml

Log file located at /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/CloneContext_0728123328.log
contextfile=/xprodfm/xprodfm/XPROD/inst/apps/XPROD_bcibmp15/appl/admin/XPROD_bcibmp15.xml
Check Clone Context logfile /xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin/CloneContext_0728123328.log for details.
$ pwd
/xprodfm/xprodfm/XPROD/apps/apps_st/comn/clone/bin

Run adconfig on Application Tier using new Context file .

Failover testing on DbTier:-

xdb@pbcibms55(/home/xdb)# sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Sun Jul 29 14:25:52 2012

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Database altered.
SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE;
Database altered.
SQL> shut immediate
ORA-01109: database not open

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

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
Database mounted.
Database opened.
SQL> conn apps/apps
Connected.
SQL> select REQUEST_DATE,REQUEST_ID,LAST_UPDATE_DATE from fnd_concurrent_requests where REQUEST_ID='11272536';
REQUEST_D REQUEST_ID LAST_UPDA
--------- ---------- ---------
29-JUL-12 11272536 29-JUL-12

SQL> select name,DATABASE_ROLE,OPEN_MODE from v$database;

NAME DATABASE_ROLE OPEN_MODE
--------- ---------------- ----------
XPROD PRIMARY READ WRITE
SQL>