Thursday, February 20, 2014

ORA-00205: error in identifying control file, check alert log for more info

 

As part of moving the control file from current ASM Diskgroup to new Diskgroup, I did the following;

1. Backup the current controlfile as copy and trace.

2. Backup the current control file

3. Reconfigure the controlfile location using ALTER SYSTEM

4. Restore the controlfile, it will create the controlfiles on the new diskgroup as given in step 3.

SQL> alter database mount;
alter database mount
*

ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info


SQL> select * from v$controlfile;

no rows selected

Cause:

Here, I have mistakenly given +DG_PERF_FLASH02 instead of +DG_PERF_FLASH_02

ALTER SYSTEM SET control_files='+DG_PERF_DATA_01','+DG_PERF_FLASH02' SCOPE=spfile sid='*';

It resulted as the control file restore failure

RMAN>
RMAN> shutdown immediate;
2>
3> startup nomount;
4>
5> restore controlfile from '+DG_PERF_DATA_03/testDB/controlfile/current.486.839732817';
6>
7> exit
using target database control file instead of recovery catalog
Oracle instance shut down

connected to target database (not started)
Oracle instance started

Total System Global Area    2137886720 bytes

Fixed Size                     2184304 bytes
Variable Size               1476397968 bytes
Database Buffers             654311424 bytes
Redo Buffers                   4993024 bytes

Starting restore at 20-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=216 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/20/2014 22:48:35
ORA-19504: failed to create file "+DG_PERF_FLASH02"
ORA-17502: ksfdcre:4 Failed to create file +DG_PERF_FLASH02
ORA-15001: diskgroup "DG_PERF_FLASH02" does not exist or is not mounted
ORA-15001: diskgroup "DG_PERF_FLASH02" does not exist or is not mounted
ORA-19600: input file is control file  (+DG_PERF_DATA_01/testDB/controlfile/current.532.840062915)
ORA-19601: output file is control file  (+DG_PERF_FLASH02)

Recovery Manager complete.

SQL*Plus: Release 11.2.0.3.0 Production on Thu Feb 20 22:48:35 2014

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


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

ALTER DATABASE MOUNT
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info


ALTER DATABASE OPEN
*
ERROR at line 1:
ORA-01507: database not mounted


SQL>

 

Resolution

Fixed the control_files parameter and restored the controlfile from the old ASM diskgroup.

ALTER SYSTEM SET control_files='+DG_PERF_DATA_01','+DG_PERF_FLASH_02' SCOPE=spfile sid='*';

Monday, February 10, 2014

How to open GUI on Unix using Exceed XServer

 

1. Find out the IP address of Host Windows machine

   PING hostname

2. start the X server...

Example C:\Program Files (x86)\Hummingbird\Connectivity\13.00\Exceed\

3. Hover over the Exceed icon and see what "port" it is using

image

4.  Set the DISPLAY variable with IP:Port

   image

5. Start DBCA (you may use a different GUI) and the GUI is running on the terminal server

 image

image

Wednesday, October 16, 2013

Oracle Database Patching Procedure

 

image

Oracle Enterprise Manager 11g - OEM 11g Log file location

 

$ORACLE_HOME/sysman/config/emInstanceMapping.properties

This file will tell you the internal ID (OMS name) of the OMS, and a pointer to the file with all the port and directory details used for this OMS.

EMGC_OMS1=/app/oracle/gc_inst/em/EMGC_OMS1/emgc.properties

Once you know the location of the instance specific files of the OMS, everything else will fall into place. Take note of three key properties in the file, which will help you find the log files

EM_INSTANCE_HOME

EM_INSTANCE_HOME=/app/oracle/gc_inst/em/EMGC_OMS1

EM_DOMAIN_NAME

EM_DOMAIN_NAME=GCDomain

EM_DOMAIN_HOME

EM_DOMAIN_HOME=/app/oracle/gc_inst/user_projects/domains/GCDomain

EM_WEBTIER_INSTHOME

EM_WEBTIER_INSTHOME=/app/oracle/gc_inst/WebTierIH1

The OMS application log files

<EM_INSTANCE_HOME>/sysman/log

/oracle/gc_inst/em/EMGC_OMS1/sysman/log

OMS Java Application log files

<EM_DOMAIN_HOME>/servers/<OMS ID>/logs

/oracle/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs

The Application stack log files:

<EM_DOMAIN_HOME>/servers/EMGC_ADMINSERVER/logs

/oracle/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/logs

The Apache (HTTP Server) log files

<EM_WEBTIER_INSTHOME>/diagnostics/logs/OHS/ohs1

/app/oracle/gc_inst/WebTierIH1/diagnostics/logs/OHS/ohs1

 

Reference: https://blogs.oracle.com/oem/entry/differences_between_em10g_and

Wednesday, October 09, 2013

How to change password of SYS user on ASM

 

For changing the SYS password on ASM:

In 11.2 we can use asmcmd to change the password as follows

· In single instance environment

$ asmcmd

ASMCMD> passwd sys

Enter old password (optional): ******

Enter new password: ******

· In Cluster environment

ASMCMD> orapwusr --modify --password sys

Enter password: ******

We can not change the password for ASM databases via alter user command.
The password should be the one provided when the password file was created,also REMOTE_LOGIN_PASSWORDFILE should be set to EXCLUSIVE on all instances.

If you want to change the password then you would need to recreate the password file using the orapwd utility

Tuesday, October 08, 2013

How to exclude disk on Linux ASMLib

 

Requirement:

We need the 2 asm disk groups (DG_UAT_DATA_01, DG_UAT_FLASH_01) to be mounted only on +ASM that runs on ServerB.
I see that the disks for these 2 asm disk groups (ORCL:VOL_05_C8, ORCL:VOL_05_C9, ORCL:VOL_05_CE) are presented to both servers (ServerA1 and ServerB) and that ServerB has the 2 disk groups mounted.
I also know that these servers are non-clustered (ie, these are non-RAC ASM instances).

We need to do is to disable ASM on ServerA to discover these 3 asmlib disks that correspond to those 2 asm disk groups.

Solution:

The ASMLIB team will have to do something to disable ServerA to discover these 3 asmlib disks (ie, oracleasm listdisks from ServerA o no longer lst these 3 asmlib disks) but without affecting their discovery in ServerB.
If ASMLIB rpms do not longer lists these 3 disks on ServerA, then ASM on ServerA also will not be presented with them and therefore these will no longer be listed in v$asm_disk view.
 

1. Edit /etc/sysconfig/oracleasm file and you can add the non-required disk in below field:

ORACLEASM_SCANEXCLUDE=

e.g. ORACLEASM_SCANEXCLUDE="sdb sdc"

It will ensure that those disk are not scanned while you perform oracleasm scandisk

2. Restart the ASMLib

Thursday, September 26, 2013

Analogy: Restore & Recovery to bone fracture

 

Restore and recovery are analogous to the healing process when you break a bone.

Restoring is similar to the process of setting the broken bone back to its original position.
This is like restoring the datafiles from a backup and placing them in their original locations.

Recovering a datafile is similar to the healing process that recovers the bone back to its state before it was broken.
When you recover your datafiles, you apply transactions (stored in the redo files) to get the datafiles back to the state they were in before the media failure took place.

Traffic analogy: Unix – CPU metric Run queue length

 

The traffic analogy

A single-core CPU is like a single lane of traffic. Imagine you are a bridge operator ... sometimes your bridge is so busy there are cars lined up to cross. You want to let folks know how traffic is moving on your bridge. A decent metric would be how many cars are waiting at a particular time. If no cars are waiting, incoming drivers know they can drive across right away. If cars are backed up, drivers know they're in for delays.

So, Bridge Operator, what numbering system are you going to use? How about:

  • 0.00 means there's no traffic on the bridge at all. In fact, between 0.00 and 1.00 means there's no backup, and an arriving car will just go right on.
  • 1.00 means the bridge is exactly at capacity. All is still good, but if traffic gets a little heavier, things are going to slow down.
  • over 1.00 means there's backup. How much? Well, 2.00 means that there are two lanes worth of cars total -- one lane's worth on the bridge, and one lane's worth waiting. 3.00 means there are three lane's worth total -- one lane's worth on the bridge, and two lanes' worth waiting. Etc.

clip_image002= load of 1.00

clip_image004= load of 0.50

clip_image006= load of 1.70

This is basically what CPU load is. "Cars" are processes using a slice of CPU time ("crossing the bridge") or queued up to use the CPU.

Unix refers to this as the
run-queue length: the sum of the number of processes that are currently running plus the number that are waiting (queued) to run.

Like the bridge operator, you'd like your cars/processes to never be waiting. So, your CPU load should ideally stay below 1.00. Also like the bridge operator, you are still ok if you get some temporary spikes above 1.00 ... but when you're consistently above 1.00, you need to worry.

Courtesy: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages