Monday, 27 April 2015
ORA-00230: operation disallowed: snapshot control file enqueue unavailable
This error encountered during archivelog backup of a database. More details of error below:
Starting backup at 27-APR-15
channel CH01: starting full datafile backup set
channel CH01: specifying datafile(s) in backup set
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
waiting for snapshot control file enqueue
cannot make a snapshot control file
released channel: CH01
released channel: CH02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on CH01 channel at 04/27/2015 04:00:14
ORA-00230: operation disallowed: snapshot control file enqueue unavailable
Cause:
One process is holding an enqueue on the control file when this backup attempt was made. Two options are:
1. Wait for the enqueue holding session/process to complete.
2. Locate and terminate the holder if you can afford to.
For option 2.
Use the sql below to locate the process:
SELECT s.sid, username, program, module, action, logon_time, l.*
FROM v$session s, v$enqueue_lock l
WHERE l.sid = s.sid and l.type = 'CF' AND l.id1 = 0 and l.id2 = 2;
You can use operating system "kill -9" command to terminate the identified process and then re-initiate the backup.
For windows, use "orakill" utility to terminate the specific thread.
orakill sid thread_id
sid: instance ID.
thread_id: SPID from above.
reference: http://www.arcserve-knowledgebase.com
Wednesday, 1 April 2015
ORA-01012: not logged on
The following happened when a user connects to an already running database:
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 1 08:13:58 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL>
SQL>
SQL>
SQL> select name from v$database;
select name from v$database
*
ERROR at line 1:
ORA-01012: not logged on
Process ID: 0
Session ID: 0 Serial number: 0
Cause: This is usually happens to an heavily loaded database.
Solution: The following options will help resolve the challenge.
1. Kill Oracle processes>
#ps -ef |grep ora_smon*
#kill -9 smon_process_id
$sqlplus / as sysdba
SQL> startup
2. Restart the database server and bring up the database afterwards.
3. Stop the application server and stop listener to prevent new incoming connections. This will release sessions and allow new connections to the database.
Additionally, it is advised that the "processes" parameter be increased on the database.
SQL> show parameter processes
SQL> alter system set processes=new_value scope spfile;
SQL> shutdown (immediate)
SQL> startup
SQL> show parameter processes
Tuesday, 31 March 2015
ORA-27300: OS system dependent operation:fork failed with status: 2
This error normally would appear in alert logs in the following way:
ORA-27300: OS system dependent operation:fork failed with status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: skgpspawn5
Process J001 died, see its trace file
kkjcre1p: unable to spawn jobq slave process
Errors in file /oracle_home/oracle/myserver/diag/rdbms/myservertest/myserverTEST/trace/myserverTEST_cjq0_18153518.trc:
When you try to connect to sqlplus, you may get the following error:
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 31 11:09:58 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-12536: TNS:operation would block
This is caused by the inability of the Oracle software owner to get the OS to spurn more processes. In other words, the user (Oracle software owner) has reached it's maximum number of processes it is allowed to spurn.
A check on the server resources will usually show that utilization is no where near maximum.
Solution:
Check current "maxuproc" for the user
# lsattr -E -l sys0 | grep -i maxuproc
maxuproc 128 Maximum number of PROCESSES allowed per user True
Increase this value to a higher one
# chdev -l sys0 -a maxuproc=NewValue
Additionally, we can increase number of processes at the database level
SQL> show parameter processes
SQL> alter system set processes=NewValue scope=spfile;
Saturday, 17 January 2015
Prerequisite check "CheckActiveFilesAndExecutables" failed while applying PSU 19121548 on Oracle 11.2.0.3 Home
PROBLEM:
[oracleuser@TESTSERVER 19121548]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /oracle_home/app/orahome
Central Inventory : /oracle_home/app/oracle/oraInventory
from : /oracle_home/app/orahome/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.3.0
Log file location : /oracle_home/app/orahome/cfgtoollogs/opatch/opatch2015-01-17_23-26-27PM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following executables are active :
/oracle_home/app/orahome/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /oracle_home/app/orahome/cfgtoollogs/opatch/opatch2015-01-17_23-26-27PM_1.log
CAUSE:
Some processes are using the named executable file "/oracle_home/app/orahome/lib/libclntsh.so.11.1"
SOLUTION:
Identify the processes using the executable and kill them.
[oracleuser@TESTSERVER 19121548]$ /sbin/fuser /oracle_home/app/orahome/lib/libclntsh.so.11.1
/oracle_home/app/orahome/lib/libclntsh.so.11.1: 416m 422m 813m 838m 873m 879m 1187m 1549m 1746m 1812m 2187m 2222m 2223m 2254m 2505m 2821m 3031m 3158m 3452m 3514m 3552m 3572m 3808m 4112m 4317m 4459m 4730m 4764m 4841m 4882m 5061m 5402m 5572m 5694m 6013m 6060m 6101m 6208m 6353m 6724m 6851m 6954m 7317m 7422m 7471m 7615m 7704m 8176m 8184m 8325m 8636m 8727m 8753m 8980m 9055m 9553m 9592m 9839m 9921m 10073m 10098m 10384m 10435m 10928m 10976m 10994m 11268m 11391m 11399m 11430m 11686m 11701m 12229m 12241m 12544m 12576m 12670m 12676m 12699m 12982m 12998m 13518m 13520m 13841m 13986m 13987m 13988m 14021m 14301m 14340m 14766m 14808m 15216m 15417m 15443m 15457m 15853m 15859m 16206m 16281m 16566m 16720m 16755m 16781m 17140m 17148m 17484m 17549m 17563m 17863m 18006m 18029m 18068m 18453m 18470m 18759m 18836m 18861m 19119m 19299m 19304m 19358m 19727m 19774m 20032m 20118m 20133m 20410m 20559m 20569m 20639m 21025m 21085m 21375m 21400m 21680m 21807m 21829m 22358m 22438m 22672m 22764m 22958m 23004m 23167m 23185m 23629m 23737m 23930m 23996m 24304m 24350m 24427m 24460m 24943m 25052m 25208m 25241m 25604m 25623m 25692m 25757m 26213m 26351m 26455m 26517m 26899m 26910m 26968m 27044m 27513m 27677m 27755m 27829m 28175m 28192m 28243m 28412m 28783m 29001m 29095m 29239m 29455m 29460m 29497m 29705m 30049m 30330m 30360m 30630m 30750m 30763m 30770m 30978m 31340m 31610m 31629m 31993m 32017m 32054m 32055m 32307m 32647m
[oracleuser@TESTSERVER 19121548]$ kill -9 422
[oracleuser@TESTSERVER 19121548]$ kill -9 813
[oracleuser@TESTSERVER 19121548]$ kill -9 838
[oracleuser@TESTSERVER 19121548]$ kill -9 873
[oracleuser@TESTSERVER 19121548]$ kill -9 879
[oracleuser@TESTSERVER 19121548]$ kill -9 1187
[oracleuser@TESTSERVER 19121548]$ kill -9 1549
[oracleuser@TESTSERVER 19121548]$ kill -9 1746
credit to http://yichen-oracledba.blogspot.com/
Wednesday, 17 September 2014
ERROR: NMO not setuid-root (Unix-only)
Thus error came up while I was specifying a host credentials on EM 12c.
After some research I found that I had not run root.sh on the agent home.
Solution:
# cd $AGENT_HOME
# ./root.sh
Finished product-specific root actions.
/etc exist
Finished product-specific root actions.
#
This solved my problem!
After some research I found that I had not run root.sh on the agent home.
Solution:
# cd $AGENT_HOME
# ./root.sh
Finished product-specific root actions.
/etc exist
Finished product-specific root actions.
#
This solved my problem!
Wednesday, 10 September 2014
Setup of RMAN Catalog
The benefits of running RMAN backup and recovery with a catalog cannot not be overstated. A simple internet search will reveal several reasons why a serious DBA handling several databases should consider setting up a recovery catalog.
The steps involved are pretty straight forward.
1. Creation of the catalog database using DBCA or scripts.
2. Creation of catalog owner and granting necessary roles and privileges.
SQL> create user mycat identified by mycat;
- Grant necessary roles, priviledges to user
SQL> grant recovery_catalog_owner to mycat;
SQL> grant connect, resource to mycat;
3. Creation of the recovery catalog
$ rman catalog mycat/mycat
RMAN> create catalog;
4. Registering the databases which will use this database as recovery catalog
run these commands from each of the concerned databases.
$ rman target / catalog mycat/mycat@CATDB
RMAN> register database;
- Verify that the registration was successful by running REPORT SCHEMA
RMAN> report schema;
To unregister a database TESTDB from RMAN catalog, there are two ways.
1. Unregistering from the target database.
Connect to the target and catalog
rman target / catalog=mycat/mycat@catdb
perform clean -up by deleting existing backups
RMAN> LIST BACKUP SUMMARY;
RMAN> DELETE BACKUP DEVICE TYPE SBT;
RMAN> DELETE BACKUP DEVICE TYPE DISK;
Unregister database
RMAN> UNREGISTER DATABASE;
OR
RMAN> UNREGISTER DATABASE NOPROMPT;
2. Unregistering when there is no access to the target database.
Start RMAN, connect only to the catalog.
$ rman catalog=mycat/mycat@catdb
Unregister the database by name.
RMAN> UNREGISTER DATABASE TESTDB NOPROMPT;
In a case where there is more than one database in the catalog with the same name, you will need to use the DBID to identify the database to unregister. You can find this using the LIST INCARNATION command.
RMAN> LIST INCARNATION OF DATABASE TESTDB;
Once you have the DBID, you can unregister the database using the following script.
RUN
{
SET DBID 1111111111;
UNREGISTER DATABASE TESTDB NOPROMPT;
}
The steps involved are pretty straight forward.
1. Creation of the catalog database using DBCA or scripts.
2. Creation of catalog owner and granting necessary roles and privileges.
SQL> create user mycat identified by mycat;
- Grant necessary roles, priviledges to user
SQL> grant recovery_catalog_owner to mycat;
SQL> grant connect, resource to mycat;
3. Creation of the recovery catalog
$ rman catalog mycat/mycat
RMAN> create catalog;
4. Registering the databases which will use this database as recovery catalog
run these commands from each of the concerned databases.
$ rman target / catalog mycat/mycat@CATDB
RMAN> register database;
- Verify that the registration was successful by running REPORT SCHEMA
RMAN> report schema;
To unregister a database TESTDB from RMAN catalog, there are two ways.
1. Unregistering from the target database.
Connect to the target and catalog
rman target / catalog=mycat/mycat@catdb
perform clean -up by deleting existing backups
RMAN> LIST BACKUP SUMMARY;
RMAN> DELETE BACKUP DEVICE TYPE SBT;
RMAN> DELETE BACKUP DEVICE TYPE DISK;
Unregister database
RMAN> UNREGISTER DATABASE;
OR
RMAN> UNREGISTER DATABASE NOPROMPT;
2. Unregistering when there is no access to the target database.
Start RMAN, connect only to the catalog.
$ rman catalog=mycat/mycat@catdb
Unregister the database by name.
RMAN> UNREGISTER DATABASE TESTDB NOPROMPT;
In a case where there is more than one database in the catalog with the same name, you will need to use the DBID to identify the database to unregister. You can find this using the LIST INCARNATION command.
RMAN> LIST INCARNATION OF DATABASE TESTDB;
Once you have the DBID, you can unregister the database using the following script.
RUN
{
SET DBID 1111111111;
UNREGISTER DATABASE TESTDB NOPROMPT;
}
ORA-12514: TNS listener cannot resolve service name error
This came up after I created a test RMAN catalog database on one of my test serves that had three other databases running on it. These databases are actually ones that I restored while testing my full database backups, therefore I never really bothered about the networking aspect of them as I never connect to them from outside the server.
I had to setup the tnsnames.ora and listener configuartion to enable connections to and from the RMAN catalog database. This was a pretty straight forward thing but I unfortunately skipped a key configuration which caused the error ORA-12514 every time I tried to connect to the Catalog DB from any of the others.
Note that #tnsping CATDB was successful, which got me more confused and at the same time convinced that all was well with the SERVICE_NAME definition.
I also ran #lsnrctl service and I could see the CATDB service running.
However, the problem was the SERVICE_NAME I defined for the Catalog DB.
Original configuration in tnsnames.ora
CATDB=
(DESCRIPTION=
(ADDRESS=(PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = CATDB))
Correct configuration
CATDB=
(DESCRIPTION=
(ADDRESS=(PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = CATDB.xxxxxx.local))
I did not fully specify the service name!
This resolved my problem and I was able to connect to the Catalog DB.
I had to setup the tnsnames.ora and listener configuartion to enable connections to and from the RMAN catalog database. This was a pretty straight forward thing but I unfortunately skipped a key configuration which caused the error ORA-12514 every time I tried to connect to the Catalog DB from any of the others.
Note that #tnsping CATDB was successful, which got me more confused and at the same time convinced that all was well with the SERVICE_NAME definition.
I also ran #lsnrctl service and I could see the CATDB service running.
However, the problem was the SERVICE_NAME I defined for the Catalog DB.
Original configuration in tnsnames.ora
CATDB=
(DESCRIPTION=
(ADDRESS=(PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = CATDB))
Correct configuration
CATDB=
(DESCRIPTION=
(ADDRESS=(PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = CATDB.xxxxxx.local))
I did not fully specify the service name!
This resolved my problem and I was able to connect to the Catalog DB.
Subscribe to:
Posts (Atom)