Archive

Archive for the ‘Administration with ASM’ Category

ORA-19504: failed to create file “+VOPDATA”

September 5, 2013 Leave a comment

Today, when I created a new database in silent mode, it failed and showed the messages below from ./dbca/voppro/voppro.log file

Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 3%
DBCA_PROGRESS : 9%
DBCA_PROGRESS : 15%
ORA-19624: operation failed, retry possible
ORA-19870: error while restoring backup piece /opt/oracle/product/11.2/db_2/assistants/dbca/templates/Seed_Database.dfb
ORA-19504: failed to create file “+VOPDATA”
ORA-15045: ASM file name ‘+VOPDATA’ is not in reference form
ORA-17502: ksfdcre:5 Failed to create file +VOPDATA
ORA-15081: failed to submit an I/O operation to a disk
ORA-06512: at “SYS.X$DBMS_BACKUP_RESTORE”, line 5827
ORA-06512: at line 20

DBCA_PROGRESS : 21%
DBCA_PROGRESS : 30%
Creating and starting Oracle instance
ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file ‘+VOPDATA/voppro/system01.dbf’
ORA-17503: ksfdopn:2 Failed to open file +VOPDATA/voppro/system01.dbf
ORA-15173: entry ‘voppro’ does not exist in directory ‘/’

ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file ‘+VOPDATA/voppro/system01.dbf’
ORA-17503: ksfdopn:2 Failed to open file +VOPDATA/voppro/system01.dbf
ORA-15173: entry ‘voppro’ does not exist in directory ‘/’

DBCA_PROGRESS : 100%

Cause

After checking, there was no permission on raw disks for oracle account to access  (For my case, the raw disks are /dev/rdsk/emcpower*)

Fix

1. Login all nodes as root

2. Change permission on all /dev/rdsk/emcpower* to 775

# cd /dev/rdsk

# chmod 775 emcpower*

 

 

 

 

Advertisements

Can’t restore backup of database

June 9, 2012 Leave a comment

I need to restore a database to different asm diskgroup. Once I start to restore the database with the command follows.

run{
set newname for datafile 1 to ‘+DISKGROUP/cmsprod/datafile/system.261.670168721’;
set newname for datafile 2 to ‘+DISKGROUP/cmsprod/datafile/undotbs1.262.670168727’;
set newname for datafile 3 to ‘+DISKGROUP/cmsprod/datafile/sysaux.263.670168729’;
set newname for datafile 4 to ‘+DISKGROUP/cmsprod/datafile/undotbs2.265.670168733’;
set newname for datafile 5 to ‘+DISKGROUP/cmsprod/datafile/users.266.670168737’;
set newname for datafile 6 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.296.670173343’;
set newname for datafile 7 to ‘+DISKGROUP/cmsprod/datafile/tbs_production.297.670173385’;
set newname for datafile 8 to ‘+DISKGROUP/cmsprod/datafile/tbs_volantis_mcs.298.670173393’;
set newname for datafile 9 to ‘+DISKGROUP/cmsprod/datafile/volantis_tbs.316.670175271’;
set newname for datafile 10 to ‘+DISKGROUP/cmsprod/datafile/tbs_volantis_mcs_stg.317.670174997’;
set newname for datafile 11 to ‘+DISKGROUP/cmsprod/datafile/perfstat.335.671363091’;
set newname for datafile 12 to ‘+DISKGROUP/cmsprod/datafile/undotbs3.389.673005569’;
set newname for datafile 13 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.397.700411387’;
set newname for datafile 14 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.393.731520969’;
set newname for datafile 15 to ‘+DISKGROUP/cmsprod/datafile/manuted.368.731673341’;
set newname for datafile 16 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.401.736106307’;
restore database;
}

The message returned as below. It showed that it couldn’t connect to ASM Instance since the maximum number of processes exceeded. The default ASM instance default process is 40.

ORA-19870: error reading backup piece /u01/bkup/database/cmsprod/CMSPROD_data_bkup_5193
ORA-19504: failed to create file “+DISKGROUP”
ORA-17502: ksfdcre:4 Failed to create file +DISKGROUP
ORA-15055: unable to connect to ASM instance
ORA-00020: maximum number of processes () exceeded
ORA-15055: unable to connect to ASM instance
ORA-00020: maximum number of processes () exceeded
failover to previous backup

Fix Procedures

Then I increased process number in ASM instance and restarted. The problem is fixed

Procedure to Fix ASM Disk Full caused by number of archived logs

February 1, 2010 Leave a comment

– Suppose the ASM diskgroup and database are SG_DG and sgcmsqa respectively

1. Start ASMCMD

export ORACLE_SID=+ASM1;export ORACLE
asmcmd

2. Change to ARCHIVELOG ( suppose the ASM diskgroup and database are SG_DG and sgcmsqa respectively)

ASMCMD> cd +SG_DG/SGCMSQA/ARCHIVELOG

ASMCMD> ls -la
Type  Redund  Striped  Time             Sys  Name
Y    2010_01_30/
Y    2010_01_31/
Y    2010_02_01/

3. Delete archived logs under 2010_01_30/

ASMCMD> cd 2010_01_30/
ASMCMD> rm *
You may delete multiple files and/or directories.
Are you sure? (y/n) y

ASMCMD> pwd
+SG_DG/SGCMSQA/ARCHIVELOG/2010_01_30
ASMCMD> ls
ASMCMD-08002: entry ‘2010_01_30’ does not exist in directory ‘+SG_DG/SGCMSQA/ARCHIVELOG/’

ASMCMD> cd +SG_DG/SGCMSQA/ARCHIVELOG
ASMCMD> ls
2010_01_31/
2010_02_01/

4. Perform archived log crsscheck by RMAN, otherwise the next RMAN backup fails with following errors

Starting backup at 01-FEB-10
current log archived
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 02/01/2010 10:41:43
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file +SG_DG/sgcmsqa/archivelog/2010_01_30/thread_1_seq_9177.5387.709605763
ORA-17503: ksfdopn:2 Failed to open file +SG_DG/sgcmsqa/archivelog/2010_01_30/thread_1_seq_9177.5387.709605763
ORA-15012: ASM file ‘+SG_DG/sgcmsqa/archivelog/2010_01_30/thread_1_seq_9177.5387.709605763′ does not exist

$ ORACLE_SID=sgcmsqa1;export ORACLE_SID
$ rman target /

Recovery Manager: Release 11.1.0.7.0 – Production on Mon Feb 1 10:46:41 2010
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
connected to target database: SGCMSQA (DBID=2240214422)
RMAN> change archivelog all crosscheck;

5. Perform a full database up immediately

RMAN> run{
2> allocate channel ch1 type disk;
3> sql ‘alter system archive log current’;
4> backup
5> format ‘/bkuppool/oracle/bkup/databases/sgcmsqa/bkup_%d_%s_%p_%t.dat’
6> database plus archivelog;
7> delete obsolete;
8> }
9>



Cloning a RAC database in ASM

December 21, 2009 1 comment

Usually, we can create a RAC database in ASM by dbca. We can use RMAN to clone one from an existing database to a new one. Here is the steps-by-steps procedures I work out.

Cloning Database from sgptqa to vtbqa in ASM

Rename Database in ASM

December 21, 2009 Leave a comment

Recently, I deployed RAC cluster with ASM. After creating database, I found that the database name was not matching to our project objective. I needed to rename to match the requirement. I found that I couldn’t find detailed steps to do it. Finally, I worked out the detailed steps. Here is my steps below.

 An example to rename database in ASM

Add Redo Logs in ASM

December 21, 2009 Leave a comment

1. Show existing Redo Log Groups

SQL> select inst_id,group#,status,type,member from gv$logfile;

   INST_ID     GROUP# STATUS  TYPE    MEMBER

———- ———- ——- ——- ————————————————–

         1          2         ONLINE  +DAT1/sgcsprod/onlinelog/group_2.286.700253009

         1          2         ONLINE  +REC1/sgcsprod/onlinelog/group_2.278.700253011

         1          1         ONLINE  +DAT1/sgcsprod/onlinelog/group_1.285.700253007

         1          1         ONLINE  +REC1/sgcsprod/onlinelog/group_1.277.700253009

         1          3         ONLINE  +DAT1/sgcsprod/onlinelog/group_3.289.700253235

         1          3         ONLINE  +REC1/sgcsprod/onlinelog/group_3.279.700253235

         1          4         ONLINE  +DAT1/sgcsprod/onlinelog/group_4.290.700253237

         1          4         ONLINE  +REC1/sgcsprod/onlinelog/group_4.280.700253239

         2          2         ONLINE  +DAT1/sgcsprod/onlinelog/group_2.286.700253009

         2          2         ONLINE  +REC1/sgcsprod/onlinelog/group_2.278.700253011

         2          1         ONLINE  +DAT1/sgcsprod/onlinelog/group_1.285.700253007

         2          1         ONLINE  +REC1/sgcsprod/onlinelog/group_1.277.700253009

         2          3         ONLINE  +DAT1/sgcsprod/onlinelog/group_3.289.700253235

         2          3         ONLINE  +REC1/sgcsprod/onlinelog/group_3.279.700253235

         2          4         ONLINE  +DAT1/sgcsprod/onlinelog/group_4.290.700253237

         2          4         ONLINE  +REC1/sgcsprod/onlinelog/group_4.280.700253239

 16 rows selected.

SQL> select inst_id,group#,thread#,sequence#,bytes,members,status from gv$log;

    INST_ID     GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS STATUS

———- ———- ———- ———- ———- ———- —————-

         1          1          1         99  104857600          2 INACTIVE

         1          2          1        100  104857600          2 CURRENT 

         1          3          2        113  104857600          2 CURRENT <–

         1          4          2        112  104857600          2 INACTIVE

         2          1          1         99  104857600          2 INACTIVE

         2          2          1        100  104857600          2 CURRENT

         2          3          2        113  104857600          2 CURRENT

         2          4          2        112  104857600          2 INACTIVE

– Redo group 1and 2 are assigned to instance 1, Redo group 3 and 4 are assigned to instance 2

– Redo group 2 is active on instance 1 and instance 1 acts as recovery instance once instance 2 is down, therefore Redo group 3 is active on instance 1

– Redo group 3 is active on instance 2 and instance  acts as recovery instance once instance 2 is down, therefore Redo group 1 is active on instance 2

2. Add log groups for thread 1 and thread 2 with two members, one is created on ‘+DAT1’ Diskgroup, anoth 

alter database add logfile thread 1 group 5 (‘+DAT1′,’+REC1’) size 100M;

alter database add logfile thread 1 group 6 (‘+DAT1′,’+REC1’) size 100M;

alter database add logfile thread 2 group 7 (‘+DAT1′,’+REC1’) size 100M;

alter database add logfile thread 2 group 8 (‘+DAT1′,’+REC1’) size 100M;