Pages

Sunday, 3 February 2013

OWB repository creation fails with error as ORA-29540: class oracle/wh/runtime/server/Util does not exist


OWB repository creation fails with error as ORA-29540: class oracle/wh/runtime/server/Util does not exist

Solution:

It seems that you must have set wrong OWB Control Center Home so reset using reset_owbcc_home.sql script located at $ORACLE_HOME/owb/UnifiedRepos as below.

SQL> @reset_owbcc_home.sql
Enter the full path of the Oracle home for the OWB Control Center install.
If you are installing in a Windows environment, please ensure that the case of the path exactly matches the Oracle install path including the drive letter.

OWB Control Center Home:
/u01/app/oracle/product/11.2.0.3/dbhome_1/owb

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

SQL>
SQL> !pwd
/u01/app/oracle/product/11.2.0.3/dbhome_1/owb/UnifiedRepos

SQL> SHO USER;
USER is "SYS"

Goldengate: ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file


We got below error while connecting to GG after installing it.

[gbuora@slc03qmb GG]$ ./ggsci
./ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory

Solution:

1. Go to GG installed directory

eg: cd /scratch/GG

2. create softlink for below files located at $ORACLE_HOME/lib as below.

libnnz11.so
libclntsh.so.11.1

ln -s /scratch/app/gbuora/product/11.2.0/dbhome_1/lib/libnnz11.so
ln -s /scratch/app/gbuora/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1


lrwxrwxrwx 1 gbuora dba        59 Feb  3 23:07 libnnz11.so -> /scratch/app/gbuora/product/11.2.0/dbhome_1/lib/libnnz11.so
lrwxrwxrwx 1 gbuora dba        65 Feb  3 23:08 libclntsh.so.11.1 -> /scratch/app/gbuora/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1

3. Connect to GG now.

[gbuora@slc03qmb GG]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.



GGSCI (slc03qmb) 1> exit
[gbuora@slc03qmb GG]$ pwd
/scratch/GG

Tuesday, 8 January 2013

Golden Gate extract process fails to start with error OGG-00529


Golden Gate extract process fails to start with error as below

GGSCI (slc01jbc) 3> start lsrcet

Sending START request to MANAGER ...
EXTRACT LSRCET starting


GGSCI (slc01jbc) 4> start extract e2_dpmp

Sending START request to MANAGER ...
EXTRACT E2_DPMP starting


GGSCI (slc01jbc) 5> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     E2_DPMP     00:00:00      00:50:26
EXTRACT     STOPPED     LSRCET      00:00:00      00:57:01


error in the log is

2013-01-08 06:55:51  INFO    OGG-01815  Oracle GoldenGate Capture for Oracle, lsrcet.prm:  Virtual Memory Facilities for: COM
    anon alloc: mmap(MAP_ANON)  anon free: munmap
    file alloc: mmap(MAP_SHARED)  file free: munmap
    target directories:
    /orasw/GG/dirtmp.
2013-01-08 06:55:51  ERROR   OGG-00529  Oracle GoldenGate Capture for Oracle, lsrcet.prm:  DDL Replication is enabled but table ggs_owner.GGS_DDL_HIST is not found. Please check DDL installation in the database.
2013-01-08 06:55:51  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, lsrcet.prm:  PROCESS ABENDING.
2013-01-08 06:56:11  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): start extract e2_dpmp.
2013-01-08 06:56:11  INFO    OGG-00963  Oracle GoldenGate Manager for Oracle, mgr.prm:  Command received from GGSCI on host slc01jbc.us.oracle.com (START EXTRACT E2_DPMP ).
2013-01-08 06:56:11  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  EXTRACT E2_DPMP starting.



Solution:

DDL support scripts should be run in source database:

#> sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 8 06:07:40 2013

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

ERROR:
ORA-01031: insufficient privileges


Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
SQL> @marker_setup.sql
Marker setup script
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:ggs_owner
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GG
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.
SQL> @ddl_setup.sql
GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:ggs_owner
You will be prompted for the mode of installation.
To install or reinstall DDL replication, enter INITIALSETUP
To upgrade DDL replication, enter NORMAL
Enter mode of installation:INITIALSETUP
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...
Check complete.
SQL> @role_setup.sql
GGS Role setup script
This script will drop and recreate the role GGS_GGSUSER_ROLE
To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred name. (Do not run the script.)
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:ggs_owner
Wrote file role_setup_set.txt
PL/SQL procedure successfully completed.
Role setup script complete
Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command:
GRANT GGS_GGSUSER_ROLE TO
where is the user assigned to the GoldenGate processes.
SQL> GRANT GGS_GGSUSER_ROLE TO ggs_owner;
Grant succeeded.
SQL> @ddl_enable
Trigger altered.

Now Extract process can be started.

GGSCI (slc01jbc) 3> start extract LSRCET

Sending START request to MANAGER ...
EXTRACT LSRCET starting


GGSCI (slc01jbc) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     E2_DPMP     00:00:00      01:24:26
EXTRACT     RUNNING     LSRCET      01:30:59      00:00:02



Thursday, 3 January 2013

ORA-12519: TNS:no appropriate service handler found while connecting to database.




New database connection attempts to Oracle database fail with following Oracle error





Reason:

One of the most common reasons for TNS-12519 Oracle erroris the configured maximum number of PROCESSES and/or SESSIONS limitation being reached. When this occurs, the service handlers for the TNS Listener become “Blocked” and no new connections can be made. Once the TNS Listener receives an update from the PMON process associated with the database instance telling that thresholds are below the configured limit, the database listener will start to accept new connections

Solution:


Check if a database instance reaches the maximum number of processes using below command.

select * from v$resource_limit where resource_name = 'processes';

eg:

SQL> col LIMIT_VALUE format a20;
col RESOURCE_NAME format a20;
col INITIAL_ALLOCATION format a15;
select * from v$resource_limit where resource_name = 'processes';SQL> SQL> SQL>

RESOURCE_NAME        CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCAT LIMIT_VALUE
-------------------- ------------------- --------------- --------------- --------------------
processes                            299             300        300             300

1 row selected.


If this is the case, to fix this Oracle error, increase the PROCESSES parameter value to allow the Oracle database Listener to spawn more server process as required in your environment or Kill some inactive and unwanted sessions using alter system kill session ‘SID, SERAL#’;

Monday, 17 December 2012

Duplicate database fails with RMAN-05537


Error statement

[oracle@blr221012 dbs]$ rman TARGET sys/*****@B12500DV AUXILIARY sys/****@B12500DV_DEST

Recovery Manager: Release 11.2.0.2.0 - Production on Mon Dec 17 11:11:24 2012

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

connected to target database: B12500DV (DBID=3563904870)
connected to auxiliary database: B12500DV (not mounted)

RMAN> RUN
{
2> 3>   SET NEWNAME FOR DATAFILE 1 TO '/orasw/oracle/app/oracle/oradata/B12500DV/system01.dbf';
  SET NEWNAME FOR DATAFILE 2 TO '/orasw/oracle/app/oracle/oradata/B12500DV/sysaux01.dbf';
  SET NEWNAME FOR DATAFILE 3 TO '/orasw/oracle/app/oracle/oradata/B12500DV/undotbs01.dbf';
4> 5> 6>   SET NEWNAME FOR DATAFILE 4 TO '/orasw/oracle/app/oracle/oradata/B12500DV/users01.dbf';
  SET NEWNAME FOR DATAFILE 5 TO '/orasw/oracle/app/oracle/oradata/B12500DV/example01.dbf';
  SET NEWNAME FOR DATAFILE 6 TO '/orasw/oracle/app/oracle/oradata/B12500DV/cists01.dbf';
7> 8> 9>   SET NEWNAME FOR TEMPFILE 1 TO '/oradatat/temp01.dbf';
  DUPLICATE TARGET DATABASE TO 'B12500DV' FROM ACTIVE DATABASE
10> 11>   SPFILE
  SET LOG_FILE_NAME_CONVERT '/orasw/oracle/app/oracle/oradata/B12500DV/','/orasw/oracle/app/oracle/oradata/B12500DV/'
12> 13>   SET DB_FILE_NAME_CONVERT  '/orasw/oracle/app/oracle/oradata/B12500DV/','/orasw/oracle/app/oracle/oradata/B12500DV/'
    LOGFILE
14> 15>       GROUP 3 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo03.log') SIZE 50M REUSE,
16>       GROUP 4 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo04.log') SIZE 100M REUSE,
17> GROUP 5 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo05.log') SIZE 100M REUSE,
18> GROUP 6 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo06.log') SIZE 100M REUSE,
GROUP 7 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo07.log') SIZE 100M REUSE,
19> 20> GROUP 8 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo08.log') SIZE 100M REUSE,
21> GROUP 9 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo09.log') SIZE 100M REUSE;
}
22>
executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting Duplicate Db at 17-DEC-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/17/2012 11:11:37
RMAN-05501: aborting duplication of target database
RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause




Reason: 

Auxiliary instance was started with spfile and we specified spfile in duplicate command as below. RMAN cannot restore the server parameter file if the auxiliary database is already started with a server parameter file

RUN
 {
  SET NEWNAME FOR DATAFILE 1 TO '/orasw/oracle/app/oracle/oradata/B12500DV/system01.dbf';
  SET NEWNAME FOR DATAFILE 2 TO '/orasw/oracle/app/oracle/oradata/B12500DV/sysaux01.dbf';
  SET NEWNAME FOR DATAFILE 3 TO '/orasw/oracle/app/oracle/oradata/B12500DV/undotbs01.dbf';
  SET NEWNAME FOR DATAFILE 4 TO '/orasw/oracle/app/oracle/oradata/B12500DV/users01.dbf';
  SET NEWNAME FOR DATAFILE 5 TO '/orasw/oracle/app/oracle/oradata/B12500DV/example01.dbf';
  SET NEWNAME FOR DATAFILE 6 TO '/orasw/oracle/app/oracle/oradata/B12500DV/cists01.dbf';
  SET NEWNAME FOR TEMPFILE 1 TO '/oradatat/temp01.dbf';
  DUPLICATE TARGET DATABASE TO 'B12500DV' FROM ACTIVE DATABASE
  SPFILE
  PASSWORD FILE
  NOFILENAMECHECK
  LOGFILE
  GROUP 3 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo03.log') SIZE 50M REUSE,
  GROUP 4 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo04.log') SIZE 100M REUSE,
  GROUP 5 ('//orasw/oracle/app/oracle/oradata/B12500DV/redo05.log') SIZE 100M REUSE,
  GROUP 6 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo06.log') SIZE 100M REUSE,
  GROUP 7 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo07.log') SIZE 100M REUSE,
 GROUP 8 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo08.log') SIZE 100M REUSE,
 GROUP 9 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo09.log') SIZE 100M REUSE;
 }


Solution:


Start the auxiliary database with a client parameter file or do not specify SPFILE in duplicate command if you had started auxiliary database using spfile.

Eg:
[oracle@blr221012 dbs]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.2.0 Production on Mon Dec 17 11:03:30 2012

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


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

SQL> shut immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup nomount pfile='/orasw/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/initB12500DV.ora';
ORACLE instance started.

Total System Global Area  217157632 bytes
Fixed Size                  2225064 bytes
Variable Size             159386712 bytes
Database Buffers           50331648 bytes
Redo Buffers                5214208 bytes
SQL> exit


OR

Use duplicate command as below.

RUN
 {
  SET NEWNAME FOR DATAFILE 1 TO '/orasw/oracle/app/oracle/oradata/B12500DV/system01.dbf';
  SET NEWNAME FOR DATAFILE 2 TO '/orasw/oracle/app/oracle/oradata/B12500DV/sysaux01.dbf';
  SET NEWNAME FOR DATAFILE 3 TO '/orasw/oracle/app/oracle/oradata/B12500DV/undotbs01.dbf';
  SET NEWNAME FOR DATAFILE 4 TO '/orasw/oracle/app/oracle/oradata/B12500DV/users01.dbf';
  SET NEWNAME FOR DATAFILE 5 TO '/orasw/oracle/app/oracle/oradata/B12500DV/example01.dbf';
  SET NEWNAME FOR DATAFILE 6 TO '/orasw/oracle/app/oracle/oradata/B12500DV/cists01.dbf';
  SET NEWNAME FOR TEMPFILE 1 TO '/oradatat/temp01.dbf';
  DUPLICATE TARGET DATABASE TO 'B12500DV' FROM ACTIVE DATABASE
  PASSWORD FILE
  NOFILENAMECHECK
  LOGFILE
  GROUP 3 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo03.log') SIZE 50M REUSE,
  GROUP 4 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo04.log') SIZE 100M REUSE,
  GROUP 5 ('//orasw/oracle/app/oracle/oradata/B12500DV/redo05.log') SIZE 100M REUSE,
  GROUP 6 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo06.log') SIZE 100M REUSE,
  GROUP 7 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo07.log') SIZE 100M REUSE,
 GROUP 8 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo08.log') SIZE 100M REUSE,
 GROUP 9 ('/orasw/oracle/app/oracle/oradata/B12500DV/redo09.log') SIZE 100M REUSE;
 }



Duplicate Database fails with RMAN-05001


RMAN Duplicate fails with following errors, even though allocated channel for duplication is auxiliary using below command.


sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/17/2012 11:18:31
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/cists01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/example01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/system01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/redo10.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/redo08.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/redo09 conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/redo06.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/redo05.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/redo04.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /orasw/oracle/app/oracle/oradata/B12500DV/redo03.log conflicts with a file used by the target database

RMAN> exit

Reason:
Source and Auxiliary have same directory structure and are running on two different machines. Source database files are sharing the name as the duplicate datafiles being generated. So we should tell rman not to check file names and directory structure of destination(where duplicate db is being created) using nofilenamecheck command. Please note that, if you are duplicating database on the same server, you shouldn't use this parameter,

Solution:

Use the nofilenamecheck in syntax as below


RMAN> DUPLICATE TARGET DATABASE TO 'B12500DV' FROM ACTIVE DATABASE NOFILENAMECHECK;

Starting Duplicate Db at 17-DEC-12
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=135 device type=DISK

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''B12500DV'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''B12500DV'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   backup as copy current controlfile auxiliary format  '/orasw/oracle/app/oracle/oradata/B12500DV/control01.ctl';
   restore clone controlfile to  '/orasw/oracle/app/oracle/fast_recovery_area/B12500DV/control02.ctl' from
 '/orasw/oracle/app/oracle/oradata/B12500DV/control01.ctl';

Sunday, 16 December 2012

How to add and remove databases from Oracle cluster


To remove database from Oracle clusterware, use below commands using "oracle" user(Oracle software owner).

srvctl remove database -d db_name

$ srvctl remove database -d test
PRKO-3141 : Database test could not be removed because it was running

$ srvctl stop database -d test
$ srvctl remove database -d test
Remove the database test? (y/[n]) y
$


Once you remove the database,cluserware doesn't maintain any information about this database and its instances and hence you can't manage this database using srvctl.

$ srvctl status database -d TEST
PRCD-1120 : The resource for database TEST could not be found.
PRCR-1001 : Resource ora.test.db does not exist
$ srvctl status instance -d TEST -i TEST1
PRCD-1120 : The resource for database TEST could not be found.
PRCR-1001 : Resource ora.test.db does not exist
$ srvctl status instance -d TEST -i TEST2
PRCD-1120 : The resource for database TEST could not be found.
PRCR-1001 : Resource ora.test.db does not exist



To add database to Oracle clusterware,use below commands using "oracle" user(Oracle software owner).

$ srvctl add database -d test -o /u01/app/oracle/product/11.2.0/dbhome_1 --> This is $ORACLE_HOME of database
$ srvctl config database -d test
Database unique name: test
Database name:
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: test
Database instances:
Disk Groups:
Services:
Database is administrator managed
$ srvctl status database -d test
Database is not running.

$ srvctl start database -d test
Database test cannot be started since it has no configured instances.

So register the database instances as below

$ srvctl add instance -d test -i TEST1 -n rsvmsb300
$ srvctl add instance -d test -i TEST2 -n rsvmsb302
$ srvctl start database -d test
$ srvctl config database -d TEST
Database unique name: test
Database name:
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: test
Database instances: TEST1,TEST2
Disk Groups:
Services:
Database is administrator managed


$ id
uid=1000(oracle) gid=2262(oinstall) groups=1001(dba),2259(asmadmin),2260(asmdba),2261(asmoper),2262(oinstall)
$