Thursday, July 19, 2018

Recovery was unable to create the file

Error

WARNING: File being created with same name as in Primary
Existing file may be overwritten
Errors in file /ccbs/appl/oracle/orabase/diag/rdbms/prodtabs/TABS1/trace/TABS1_pr00_4213.trc:
ORA-01119: error in creating database file '+DATA_DG1/tabsdr/u14/prodtabs/tabsxl01_f09.dbf'
ORA-17502: ksfdcre:4 Failed to create file +DATA_DG1/tabsdr/u14/prodtabs/tabsxl01_f09.dbf
ORA-15001: diskgroup "DATA_DG1" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
File #308 added to control file as 'UNNAMED00308'.
Originally created as:
'+DATA_DG1/tabsdr/u14/prodtabs/tabsxl01_f09.dbf'
Recovery was unable to create the file as:
'+DATA_DG1/tabsdr/u14/prodtabs/tabsxl01_f09.dbf'
MRP0: Background Media Recovery terminated with error 1274
Errors in file /ccbs/appl/oracle/orabase/diag/rdbms/prodtabs/TABS1/trace/TABS1_pr00_4213.trc:
ORA-01274: cannot add datafile '+DATA_DG1/tabsdr/u14/prodtabs/tabsxl01_f09.dbf' - file could not be created
Tue Jun 12 11:03:40 2018
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Recovery stopped due to failure in applying recovery marker (opcode 17.30).

Cause

Our DR was prepared from filesystem to ASM, after switchover standby_file_management was set to 'AUTO' but DB_FILE_NAME_CONVERT wasn't (missed).

So, when we added datafile in new primary database as '+DATA_DG1/tabsdr/u14/prodtabs/tabsxl01_f09.dbf' it tries to create this file on Standby using the same path as of primary database, as this path is not exist it got failed.

Solution

Frist of all there are many ways to fix, what i followed is as below.

1. Stop recovery
recover managed standby database cancel;
2. Shutdown database
3. Update pfile with all subsequent location of datafiles in DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT
4. Create spfile from pfile
5. Start database in standby mode.
6. Start recovery
Alter database recover managed standby database  using current logfile disconnect;

By the time i checked the system and applied all these changes huge archive gap generated and archive logs were deleted from production server too.

Now i have to sync DR from incremental bacukp from the SCN from which logs were missing.

To avoid this i used another way.

7. Restore archive logs of primary datatabase directly to standby database server.
8. No need to register archive logs with database, database will read from the location where i'm doing restore.



Wednesday, July 11, 2018

OAV-46599: internal error

Error

While deleting target from Audit vault i got an error.




Cause

Java framework was not running.


Solution


Start Java framework and retry delete.


Sunday, July 8, 2018

Changing database name using NID


1. Shutdown your database.
2. Start it in mount stage.
3. Run nid to apply changes.
4. After successful completion start database with resetlogs.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 3206836224 bytes
Fixed Size                  2257520 bytes
Variable Size            1778388368 bytes
Database Buffers         1409286144 bytes
Redo Buffers               16904192 bytes
Database mounted.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bash-3.2$
bash-3.2$ nid TARGET=SYS/xxxxxxx DBNAME=UAT

DBNEWID: Release 11.2.0.4.0 - Production on

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

Connected to database PROD (DBID=337679511)

Connected to server version 11.2.0

Control Files in database:
    /DB/app/oracle/oradata/UAT/control01.ctl
    /DB/app/oracle/oradata/UAT/control02.ctl

Changing database ID from 337679511 to 3686432641
Changing database name from PROD to UAT
    Control File /DB/app/oracle/oradata/UAT/control01.ctl - modified
    Control File /DB/app/oracle/oradata/UAT/control02.ctl - modified
    Datafile /DB/app/oracle/oradata/UAT/system.294.87146925 - dbid changed, wrote new name
    Datafile /DB/app/oracle/oradata/UAT/sysaux.267.87146925 - dbid changed, wrote new name
    Datafile /DB/app/oracle/oradata/UAT/undotbs1.270.87146925 - dbid changed, wrote new name
    Datafile /DB/app/oracle/oradata/UAT/users.269.87146925 - dbid changed, wrote new name
    Datafile /DB/app/oracle/oradata/UAT/undotbs2.272.87146940 - dbid changed, wrote new name
    Datafile /DB/app/oracle/oradata/UAT/temp.295.87146934 - dbid changed, wrote new name
    Control File /DB/app/oracle/oradata/UAT/control01.ctl - dbid changed, wrote new name
    Control File /DB/app/oracle/oradata/UAT/control02.ctl - dbid changed, wrote new name
    Instance shut down

Database name changed to UAT.
Modify parameter file and generate a new password file before restarting.
Database ID for database UAT changed to 3686432641.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.


Saturday, July 7, 2018

FRM-92095: Oracle JInitiator version too low

Error

FRM-92095: Oracle JInitiator version too low


Casue

The cause is the JRE version is not compatible. Oracle made an internal change in the Java plugin after Java 7 that causes Oracle Forms (Banner) to not recognize that Java is correctly installed.

Solution

Add JAVA_TOOL_OPTIONS in system environment setings.



Wednesday, July 4, 2018

Installing Oracle Forms and Reports 12c on Windows 64 Bit machine


This installation will be done in three phases.

1. Java JDK installation
2. Oracle WebLogic Server (FMW Infrastructure) Installation and
3. Oracle Forms and Reports 12c Installation

Java JDK installation

Download JDK from below location and complete the simple installation to java to your desired location

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html









Oracle WebLogic Server (FMW Infrastructure) Installation

Download WebLogic Server from the below link and launch installer from java

http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html









Oracle Forms and Reports 12c Installation

Download software from the link mentioned below and run installer as administrator.

http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html











This completes your installation but, in 12c you have to run "Repository Configuration Utility (RCU)" and "Create the Forms and Reports Services Domain" manually.


Sunday, July 1, 2018

Could not create the change tracking file

Error

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-19751: could not create the change tracking file
ORA-19750: change tracking file:
'+DATA_USG/RAREF/CHANGETRACKING/ctf.344.951649823'
ORA-17502: ksfdcre:4 Failed to create file
+DATA_USG/RAREF/CHANGETRACKING/ctf.344.951649823
ORA-15046: ASM file name '+DATA_USG/RAREF/CHANGETRACKING/ctf.344.951649823' is
not in single-file creation form
ORA-17503: ksfdopn:2 Failed to open file
+DATA_USG/RAREF/CHANGETRACKING/ctf.344.951649823

ORA-15012: ASM file '+DATA_USG/RAREF/CHANGETRACKING/ctf.344.951649823' does not exist

Cause

Block change tracking file entry that exists in source controlfile is not found where DB got restored because the directory structure.

Solution

Disable block change tracking and recreate it after opening database.

SQL> alter database disable block change tracking;

Database altered.

SQL> alter database open;

Database altered.

SQL>alter database enable block change tracking using file '+DATA_USG';

Failed to load Media Management Library

Error

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on c1 channel at 06/26/2018 11:28:08
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library

Additional information: 2

Cause

Link between Oracle database server software and NetBackup API library wasn't found.

$ ls -l $ORACLE_HOME/lib/libobk.so
/u01/app/oradr/product/12.1.0.2/dbhome_1/lib/libobk.so: No such file or directory

Solution

Create soft link between Oracle database server software and NetBackup API library

$ ln -s /usr/openv/netbackup/bin/libobk.so64.1 $ORACLE_HOME/lib/libobk.so

$ ls -l $ORACLE_HOME/lib/libobk.so
lrwxrwxrwx   1 oradr    oinstall      38 Jun 26 11:30 /u01/app/oradr/product/12.1.0.2/dbhome_1/lib/libobk.so -> /usr/openv/netbackup/bin/libobk.so64.1
$