Wednesday, April 03, 2013

ORA-06553: PLS-553


RMAN recovery fails:
RMAN-03002: failure of recover command at
ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-553: character set name is not recognized

Solution:

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Restarted database with above characterset.

Start Recovery. 

Monday, October 15, 2012

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options


ORA-19504: failed to create file "/backup/rman/01nmqsmk_1_1"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options


Solution:

SQL> alter system set event="10298 trace name context forever, level 32" scope=spfile; 


Thursday, July 12, 2012

EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet.

To resolve this error, follow these two steps.

1.
On the remote host itself run
rm -r /sysman/emd/state/*
rm -r /sysman/emd/collection/*
rm -r /sysman/emd/upload/*
rm /sysman/emd/lastupld.xml
rm /sysman/emd/agntstmp.txt
rm /sysman/emd/blackouts.xml
rm /sysman/emd/protocol.ini
Some files may not exists in the agent home. 

Clear the agent state
$Agent_home/emctl clearstate agent
Secure the agent again

emctl secure agent

2. Log into Grid Control, click on the Setup link located in the top right hand corner. Next click on the Agentslink in the blue bar,
followed by the Misconfiguration Alerts and Blocked Agents tab.
3.To resynch it click on the Agent Resynchronization button.  or Click on unblock button selecting all blocked agents at Blocked agents tab.
--------------


In case of below error



EMD upload error: Upload was successful but collections currently disabled - disk full


-bash-3.00$ emctl upload agent Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0. Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved. --------------------------------------------------------------- EMD upload error: Upload was successful but collections currently disabled - disk full #From Metalink note 317242.1 #Cause The EMD disk system shows used percent at 99%. The agent default for space required for upload files is 98%. The collections will stop when the space on the disk is beyond that. #Solution To implement the solution, please execute the following steps: 1. Update the AGENT OH/sysman/config/emd.properties with the parameter: uploadMaxDiscUsedPct=99 uploadMaxDiskUsedPctFloor=99 2. Stop the agent: emctl stop agent 3. Start the agent: emctl start agent 4. Upload to the OMS: emctl upload

                             ===00===

Tuesday, October 18, 2011

ORA-19909: datafile 1 belongs to an orphan incarnation

ORA-19909: during duplication


-------------------------------------------------------------------------------------------------------
RMAN > CONNECTED TO TARGET AND AUXILIARY
                 DUPLICATE TARGET DATABASE TO DB2'

........................
........................
.........................
starting media recovery

archived log for thread 1 with sequence 934 is already on disk as file /erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-934_T-1_A-760035616_3ump3je0
archived log for thread 1 with sequence 935 is already on disk as file /erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-935_T-1_A-760035616_4mmp3r0u
archived log for thread 2 with sequence 1368 is already on disk as file /erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-1368_T-2_A-760035616_49mp3jfm
archived log for thread 2 with sequence 1369 is already on disk as file /erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-1369_T-2_A-760035616_4bmp3jgq
archived log for thread 2 with sequence 1370 is already on disk as file /erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-1370_T-2_A-760035616_4emp3jhr
archived log file name=/erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-934_T-1_A-760035616_3ump3je0 thread=1 sequence=934
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 10/14/2011 21:08:53
RMAN-03015: error occurred in stored script Memory Script
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-934_T-1_A-760035616_3ump3je0'
ORA-00283: recovery session canceled due to errors
ORA-19906: recovery target incarnation changed during recovery

RMAN> exit


Recovery Manager complete.
[server1:+ASM1:oracle] sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Fri Oct 14 21:38:15 2011

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, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DB2/DB2/datafile/system.274.764540307'


SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '+DB2/DB2/datafile/system.274.764540307'


SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[server1:+ASM1:oracle] ls -ltr /erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-934_T-1_A-760035616_3ump3je0
-rw-r-----   1 oracle   oinstall 285634048 Oct 14 17:49 /erpinstall/rman/arc_arch_D-DB1_id-1844823682_S-934_T-1_A-760035616_3ump3je0
[server1:+ASM1:oracle] rman target /

Recovery Manager: Release 11.1.0.7.0 - Production on Fri Oct 14 21:44:40 2011

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

connected to target database: DB2 (DBID=1844823682, not open)

RMAN> list incarnatin;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "all, archivelog, backup, backuppiece, backupset, backed, completed, copy, controlfilecopy, datafilecopy, device, db_unique_name, expired, failure, foreign, global, incarnation, like, proxy, recoverable, restore, script, tag"
RMAN-01008: the bad identifier was: incarnatin
RMAN-01007: at line 1 column 6 file: standard input

RMAN> list incarnation;

using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       DB2   1844823682       PARENT  5539943343956 24-AUG-11
2       2       DB2   1844823682       CURRENT 5545713781531 20-SEP-11

RMAN> reset database to incarnation 1;

database reset to incarnation 1

RMAN> list incarnatin;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "all, archivelog, backup, backuppiece, backupset, backed, completed, copy, controlfilecopy, datafilecopy, device, db_unique_name, expired, failure, foreign, global, incarnation, like, proxy, recoverable, restore, script, tag"
RMAN-01008: the bad identifier was: incarnatin
RMAN-01007: at line 1 column 6 file: standard input

RMAN> list incarnation;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       DB2   1844823682       CURRENT 5539943343956 24-AUG-11
2       2       DB2   1844823682       ORPHAN  5545713781531 20-SEP-11

RMAN> exit

start recovery

sql> recover database using backup controlfile;
and provide all the archivelogs and open resetlogs;

Wednesday, July 13, 2011

RMAN COMPRESSED BACKUP TO TAPES AND DISKS CONFIGURATIONS

COMPRESSED BACKUP TO Disk WITH PARALLELISM 3 :

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ERPBF are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/dir_name/rman_bkp/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 3 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u02/db/tech_st/11.1.0/dbs/snapcf_DBNAME.f'; # default

Here the backup goes to /dir_name/rman_bkp/ 


COMPRESSED BACKUP TO TAPE WITH PARALLELISM 3 :

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ERPBF are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 3 TIMES TO 'SBT_TAPE';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u02/db/tech_st/11.1.0/dbs/snapcf_DBNAME.f'; # default

check if netbackup or other client is installed and media library has to be set in parameter
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=......';

Friday, June 24, 2011

orapwd file error: ld.so.1: orapwd: fatal: libclntsh.so.11.1: open failed: No such file or directory Killed

orapwd file=$ORACLE_HOME/dbs/orapwDB1 password=system
ld.so.1: orapwd: fatal: libclntsh.so.11.1: open failed: No such file or directory
Killed

Action:

set env
relink all

now try again...

Wednesday, June 22, 2011

Point in Time Rman Restore from tape backup.

Point in time recovery after dropping existing database.
Requirements: Rman backup log file
SQL> startup nomount
RMAN> set DBID 1194164416;
RMAN> run {
ALLOCATE CHANNEL c1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1';
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
restore controlfile from 'backup piece name';  Eg: f6mfa3bj_1_1  , from backup log file;
}

RMAN> alter database mount;
RMAN> restore database from tag ='Tag number from backup log file'; eg: 'TAG20110619T190015';
RMAN>{ set SET UNTIL TIME 'Jun 19 2011 20:00:17';
 recover database from tag ='TAG20110619T193704';     (archive logs backup tag #)
}

SQL> alter database open resetlogs;