Quantcast
Channel: Helios's Blog
Viewing all 52 articles
Browse latest View live

ORA-39002: ORA-39166: during import from full export

$
0
0

As a DBA We are using export/import utulity many times during our daily process.
I have face this error trying to import only one table from full export.

ORA-39002: invalid operation
ORA-39166: ObjectUSER1.TABLE was not found.


OS: AIX 7.1
DB version : 11.2.0.4 – 2 Node RAC
My syntax was:
impdp system/****@DB_NAME directory=DMP_DIR REMAP_SCHEMA=USER1:restore_user remap_tablespace=USER1_TS:Restorespace tables=USER1.TABLE
dumpfile=MY_RAC_full.dmp logfile=imp.log cluster=n

So it gives:

ORA-39002: invalid operation
ORA-39166: ObjectUSER1.TABLE was not found.

While I checked my full export log, I saw that table has been exported.

After some search issue fix by using below syntax:
impdp system/****@DB_NAME directory=DMP_DIR REMAP_SCHEMA=USER1:restore_user remap_tablespace=USER1_TS:Restorespace tables=”USER1″.”TABLE”
dumpfile=MY_RAC_full.dmp logfile=imp.log cluster=n



Mobile Apps for Oracle E-Business Suite

ORA-02097&ORA-00068

$
0
0

As you know sometimes we need to change CPU count dynamically on our prod systems.

Our Unix team change our 2 node RAC system (11.2.0.3 version) server’s CPU from 20 to 30 on AIX 7.1

After that change one of the instance(node 2) goes down with below error messages:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00068: invalid value 6360 for parameter parallel_max_servers, must be between 0 and 3600
CKPT (ospid: 22135): terminating the instance due to error 2097

After makes some search, to be sure We rised SR 1.

Here is the answers:
Our The Default Value of the parallel_max_servers is calculated based on the Following Equation :

PARALLEL_THREADS_PER_CPU * CPU_COUNT * concurrent_parallel_users * 5

as per : http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams186.htm#REFRN10158

and the maximum value for this parameter is 3600 , so in some times this equation can lead to higher values than 3600

Please Perform the following Action Plan to resolve this issue :

1- Lower the Value of parallel_max_servers parameter to a reasonable value , for example (10) :

SQL> alter system set parallel_max_servers=300 scope=both sid=’*’ ;

or

2- Apply Patch 13743987

If a system has a high CPU count and there is no value set for parallel_max_servers then the system may try to set the default value of the parallel_max_servers parameter higher than is allowed.
eg:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00068: invalid value 6360 for parameter parallel_max_servers, must be between 0 and 3600

This can cause an instance shutdown if the number of system CPUs alters dynamically.
eg:
The alert log may show a dynamically detected change of CPU count:
Detected change in CPU count to 159
* Load Monitor used for high load check
* New Low – High Load Threshold Range = [152640 - 203520]
Errors in file /…/trace/+ASM2_ckpt_22135.trc:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00068: invalid value 6360 for parameter parallel_max_servers, must be between 0 and 3600
CKPT (ospid: 22135): terminating the instance due to error 2097


ORA-29538 Java not installed & Error ORA-06512

$
0
0

When our developers run their code on Our db( version is 11.2.0.4,OS AIX 7.1.), they hit ORA-29538&ORA-06512 errors.

Here is the error messages:

ORA-29538:Java not installed
ORA-06512:at_konum “XXX.UNZIPPER_PKG”, line 2
ORA-06512:at “XXX.UNZIPPER_PKG”, line 12
ORA-06512:at “XXX.UNZIP”, line 4

Here is the code samples:

CREATE OR REPLACE PACKAGE XXX.unzipper_pkg AS
PROCEDURE UNZIP(src IN BLOB, dst IN OUT CLOB);
FUNCTION UNZIP (src IN BLOB) RETURN CLOB;
END;
/

CREATE OR REPLACE PUBLIC SYNONYM UNZIPPER_PKG FOR XXX.UNZIPPER_PKG;
GRANT EXECUTE ON XXX.UNZIPPER_PKG TO CONNECT;

CREATE OR REPLACE PACKAGE BODY XXX.unzipper_pkg AS
PROCEDURE UNZIP(src IN BLOB, dst IN OUT CLOB)
AS LANGUAGE JAVA
NAME ‘com.oracle.Unzipper.unzipClob(oracle.sql.BLOB, oracle.sql.CLOB[])';

FUNCTION UNZIP(src IN blob) RETURN clob
IS
lvResult clob;
BEGIN
IF src is not null THEN
DBMS_LOB.createtemporary(lvResult, true, DBMS_LOB.CALL);
UNZIP(src, lvResult);
END IF;
RETURN lvResult;
END UNZIP;
END;
/
CREATE OR REPLACE PUBLIC SYNONYM UNZIPPER_PKG FOR XXX.UNZIPPER_PKG;
GRANT EXECUTE ON XXX.UNZIPPER_PKG TO CONNECT;

So I started to investigate issue :

# sqlplus “/as sysdba”

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

SQL> set linesize 1000
SQL> select distinct owner,name from dba_source where lower(NAME)=’dbms_java';

no rows selected

SQL> select comp_name, version, status from dba_registry;
COMP_NAME VERSION STATUS
————————- —————————— ———————-
Oracle Workspace Manager 11.2.0.4.0 VALID
Oracle Database Catalog Views 11.2.0.4.0 VALID
Oracle Database Packages and Types 11.2.0.4.0 VALID
SQL> select distinct owner,name from dba_source where NAME=’DBMS_JAVA';

no rows selected

So as you can see there is no Java component on that database. So how we will fix it?

1. Set your env.
2. Go to under $ORACLE_HOME/javavm/install/
3. Connect db as sysdba
4. run initjvm.sql such as @initjvm.sql

You will see lots of line like:
PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Package created.

Package body created.

No errors.
Call completed.

And so on.. When you see SQL prompt again, let us check latest status of components

SQL> select comp_name, version, status from dba_registry
COMP_NAME VERSION STATUS
————————- —————————— ———————-
Oracle Workspace Manager 11.2.0.4.0 VALID
Oracle Database Catalog Views 11.2.0.4.0 VALID
Oracle Database Packages and Types 11.2.0.4.0 VALID
JServer JAVA Virtual Machine 11.2.0.4.0 VALID

As you can see JServer JAVA Virtual Machine has been added to list. After those steps developer team can run code without any error message


ORA-15032&ORA-15177 while removing files in ASM

$
0
0

ORA-15032: not all alterations performed, ORA-15177: cannot operate on system aliases (DBD ERROR: OCIStmtExecute)

If you want to remove some folder in asm via using asmcmd utulity, than you may hit this error message.

Here the steps:

1. Let us see overview of current diskgroups and sizes:

[grid@myserver]</home/grid> asmcmd -p

ASMCMD [+] > lsdg
MOUNTED EXTERN N 512 4096 1048576 11534336 11009776 0 11009776 0 N ORADATA/
MOUNTED EXTERN N 512 4096 1048576   921600   921532 0   921532 0 N ORAFRA/
MOUNTED EXTERN N 512 4096 1048576    40960    40700 0    40700 0 N ORAREDO/

2. Let us see what we have under diskgroup before dropping:
ASMCMD [+] > cd ORADATA

ASMCMD [+ORADATA] > ls -l
Type Redund Striped Time Sys Name
Y ASM/
Y MYDBSID/
ASMCMD [+ORADATA] > rm MYDBSID/
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases (DBD ERROR: OCIStmtExecute)

3. Here is the solution, its simply use the force option

ASMCMD [+ORADATA] > rm -f MYDBSID


Welcome to Oracle 12c-good bye Oracle 11g

$
0
0

I remember as yesterday while I heard something about Oracle 11gR1 version has been released.

After many years We worked with Oracle 11gR1 and finally Oracle11gR2… Finally we have new family member since 2013… Oracle 12c..

Before start let us make some brain storm and remember some old information again:

I just made googling and collect some information together.

The first release of Oracle 11g (Oracle 11g Release 1) was released for Linux on 9 August 2007. The Windows port was released on 23 October. Unix versions (Solaris, AIX and HP-UX) were released on 12 November.

The common theme for this release is “Growing the Grid” (focus on Fusion Middleware, RAC and ASM).

Oracle 11gR2 (for Linux 32-bit and 64-bit) was released on 1 September 2009.Oracle 11gR2 is the second and terminal release of the Oracle 11g database. The common theme for this release is “Consolidate. Compress. Control.”.

Oracle 12c version 12.1.0.1 was released on 1 July 2013.The “c” stands for “cloud” to indicate that 12c is “cloud enabled”. It features a new multi-tenant option that will help companies to consolidate databases into private or public clouds.

There are many many post&docs available on internet. For those docs google search can be your best friends. Today or tomorrow you will need to upgrade&install&migrate to this new Oracle Database version.

So, here is the life-cycle of version:

Oracle-Support-Summary-700x270

here is the upgrade diagram:oracle_database_matrix

So, What Oracle 12c comes with?  As you can imagine it has lots of futures, Mainly:

* Container databases (CDB) with embedded Pluggable Databases (PDB)
* Automatic Data Optimization (ADO) with heat maps to automate ILM
* In-Database archiving and Temporal Validity
* Unified auditing
* Database privilege analysis to see who uses what privileges
* Data redaction
* Adaptive Query Optimization
* Database Migration Assistant for Unicode (DMU) replaces “csscan” and “csalter”
* Row Limiting Queries
* Increased Size Limit for VARCHAR2, NVARCHAR2, and RAW Data Types
* Online move of data files and partitions

Of course there are many Oracle futures available in that versions. Oracle docs are defines all those new futures under below topics:

– “Advanced Index Compression”
– “Approximate Count Distinct”
– “Attribute Clustering”
– “Automatic Big Table Caching”
– “FDA Support for CDBs”
– “Full Database Caching”
– “In-Memory Aggregation”
– “In-Memory Column Store”
– “JSON Support”
– “New FIPS 140 Parameter for Encryption”
– “PDB CONTAINERS Clause”
– “PDB File Placement in OMF”
– “PDB Logging Clause”
– “PDB Metadata Clone”
– “PDB Remote Clone”
– “PDB Snapshot Cloning Additional Platform Support”
– “PDB STANDBYS Clause”
– “PDB State Management Across CDB Restart”
– “PDB Subset Cloning”
– “Rapid Home Provisioning”
– “Zone Maps”

 

For all those futures, you can check below docs:
https://docs.oracle.com/database/121/NEWFT/chapter12102.htm
http://www.orafaq.com/wiki/Oracle

 


How to Change IP on Grid Infrastructure for a Standalone Server

$
0
0

For some reasons, you may need to change your existing IP or hostname after installation.

In this case We need to change our current IP on standalone GI.

Operation System –> AIX 7.1
Oracle GI Version –> 12.1.0.2

Please perform the next steps after the hostname and/or IP address was updated/changed/modified in the Oracle Restart configuration:

Step 1) Configure the CSS & OHAS services as root user as follows:

[root@yourhostname]</u01/app/12.1.0/grid/crs/install>./roothas.pl -deconfig -force

Using configuration parameter file: ./crsconfig_params
[2016/02/23 09:48:06 CLSRSC-337: Successfully deconfigured Oracle Restart stack

[root@yourhostname]</u01/app/12.1.0/grid/crs/install> ./roothas.pl
Using configuration parameter file: ./crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user ‘grid’, privgrp ‘oinstall’..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘system’..
Operation successful.
CRS-4664: Node yourhostname successfully pinned.
2016/02/23 09:48:34 CLSRSC-330: Adding Clusterware entries to file ‘/etc/inittab’
yourhostname 2016/02/23 10:49:12 /u01/app/12.1.0/grid/cdata/yourhostname/backup_20160223_104912.olr 1972992864
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘yourhostname’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘yourhostname’
CRS-2677: Stop of ‘ora.evmd’ on ‘yourhostname’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘yourhostname’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2016/02/23 09:49:45 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

Step 2) Please perform the next steps as oracle or grid OS user (as the Grid Infrastructure OS owner):

FromDOC–> <$GI_HOME>/bin/crsctl modify resource “ora.cssd” -attr “AUTO_START=1”

[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./crsctl modify resource “ora.cssd” -attr “AUTO_START=1” -unsupported

Step 3) Restart the OHAS stack as grid or oracle OS user (as the Grid Infrastructure OS owner):

FromDOC–> <$GI_HOME>/bin/crsctl stop has

[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘yourhostname’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘yourhostname’
CRS-2677: Stop of ‘ora.evmd’ on ‘yourhostname’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘yourhostname’ has completed

Step 4) Check the CSS & OHAS state as grid or oracle OS user (as the Grid Infrastructure OS owner):

FromDOC–> <$GI_HOME>/bin/crsctl start has

[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.

FromDOC–> <$GI_HOME>/bin/crsctl check has

[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./crsctl check has
CRS-4638: Oracle High Availability Services is online

FromDOC–> <$GI_HOME>/bin/crsctl check css
[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./crsctl check css
CRS-4529: Cluster Synchronization Services is online

FromDOC–> <$GI_HOME>/bin/ crsctl stat resource

[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./crsctl stat resource
NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on yourhostname

NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on yourhostname
NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE
FromDOC–> <$GI_HOME>/bin/crsctl stat res -t

[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./crsctl stat res -t
——————————————————————————–
Name Target State Server State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.ons
OFFLINE OFFLINE yourhostname STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1 ONLINE ONLINE yourhostname STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE yourhostname STABLE
——————————————————————————–

Note: If the CSS & OHAS service did NOT start, then you will need to reboot the Linux/unix box and check them again.

Step 5) Recreate the default listener (LISTENER) using port 1521 (or using your desired port), thru the NETCA GUI located on the new Grid Infrastructure Oracle Home (or manually if you do not have graphical access) as grid or oracle OS user (as the Grid Infrastructure OS owner):

FromDOC–> srvctl add listener
[grid@yourhostname]</u01/app/12.1.0/grid/bin> srvctl add listener
FromDOC–> srvctl start listener

[grid@yourhostname]</u01/app/12.1.0/grid/bin> srvctl start listener
[grid@yourhostname]</u01/app/12.1.0/grid/bin> ps -ef |grep tns
grid 30605404 1 0 10:06:59 – 0:00 /u01/app/12.1.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit

Step 6) Please create the init+ASM.ora file on the <$GI_HOME>/dbs directory with the next parameters:

[grid@yourhostname]</u01/app/12.1.0/grid/dbs> cat init+ASM.ora
asm_diskgroups= ”
asm_diskstring= ”
instance_type=’asm’
large_pool_size=12M

Step 7) Add the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner):

FromDOC–> <$GI_HOME>/bin/srvctl add asm
[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./srvctl add asm

Step 8) Enable ASM instance Auto Start as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

FromDOC–> <$GI_HOME>/bin/crsctl modify resource “ora.asm” -attr “AUTO_START=1”
[grid@yourhostname]</u01/app/12.1.0/grid/bin>/crsctl modify resource “ora.asm” -attr “AUTO_START=1” -unsupported

Step 9) Make sure the disks are discovered by kfod as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

Example:
FromDOC–> <$GI_HOME>/bin/kfod asm_diskstring=’ORCL:*’ disks=all
Or
FromDOC–> <$GI_HOME>/bin/kfod asm_diskstring='<full path ASM disks location>/*’ disks=all
[grid@yourhostname]</u01/app/12.1.0/grid/bin> kfod asm_diskstring=’/dev/rhdisk*’ disks=all
——————————————————————————–
Disk Size Path User Group
================================================================================
1: 10240     Mb /dev/rhdisk10 grid oinstall
2: 10240     Mb /dev/rhdisk11 grid oinstall
3: 10240     Mb /dev/rhdisk12 grid oinstall
4: 1048576 Mb /dev/rhdisk3 grid oinstall
5: 102400   Mb /dev/rhdisk4 grid oinstall
6: 10240     Mb /dev/rhdisk5 grid oinstall
7: 10240     Mb /dev/rhdisk6 grid oinstall
8: 10240     Mb /dev/rhdisk7 grid oinstall
9: 10240     Mb /dev/rhdisk8 grid oinstall
10: 10240    Mb /dev/rhdisk9 grid oinstall
KFOD-00313: No ASM instances available. CSS group services were successfully initilized by kgxgncin
KFOD-00311: Error scanning device /dev/rhdisk2
ORA-27041: unable to open file
IBM AIX RISC System/6000 Error: 13: Permission denied
Additional information: 42
Additional information: 576460752353827412
Additional information: 117768193
KFOD-00311: Error scanning device /dev/rhdisk1
ORA-27041: unable to open file
IBM AIX RISC System/6000 Error: 13: Permission denied
Additional information: 42
Additional information: 576460752353827412
Additional information: 117768193
KFOD-00311: Error scanning device /dev/rhdisk0
ORA-27041: unable to open file
IBM AIX RISC System/6000 Error: 13: Permission denied
Additional information: 42
Additional information: 576460752353827412
Additional information: 117768193

Step 10) If so, then startup the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

FromDOC–> export ORACLE_SID=+ASM
FromDOC–> <$GI_HOME>/bin/sqlplus “/as sysasm”
SQL> startup pfile=init+ASM.ora –#init file from point #6
SQL> show parameter asm

Step 11) Validate that the candidate disks are being discovered:

SQL> select path from v$asm_disk;

Step 12) Create a new ASM instance spfile:

SQL> create spfile from pfile;

Step 13) Add the new ASM spfile and listener to the new ASM instance resource:

FromDOC–> <$GI_HOME>/bin/srvctl modify asm -p <spfile full path>
[grid@yourhostname]</u01/app/12.1.0/grid/bin> ./rsrvctl modify asm -p ‘+oradata/ASM/ASMPARAMETERFILE/REGISTRY.253.904564109’
FromDOC–> <$GI_HOME>/bin/srvctl modify asm -l LISTENER

[grid@yourhostname]</u01/app/12.1.0/grid/dbs> srvctl modify asm -l LISTENER

Step 14) Validate the OHAS (Oracle Restart) services start as follows:

FromDOC–> <$GI_HOME>/bin/crsctl stop has
FromDOC–> <$GI_HOME>/bin/crsctl start has
FromDOC–> <$GI_HOME>/bin/crsctl stat res
FromDOC–> <$GI_HOME>/bin/crsctl stat res -t

Step 15) Add database to CLusterware

srvctl add database -db DB_NAME_HERE -dbname DB_NAME_HERE -oraclehome /u01/app/oracle12/product/12.1.0/dbhome -spfile +ORADATA/DB_NAME_HERE/spfileDB_NAME_HERE.ora -role PRIMARY -instance DB_NAME_HERE -diskgroup ORADATA,ORAFRA,ORAREDO

Step 16) reboot Server

Reference:
How to change Hostname / IP for a Grid Infrastructure Oracle Restart Standalone Configuration (SIHA) (Doc ID 1552810.1)


How to Performing Switchover on Oracle Standby Database

$
0
0

In this post, I want to share Switchover process on Dataguard Setup.

Db version is 11.2  2 node RAC and standby db is standalone

Operation system is  AIX 7.1

Data Guard Physical Standby Switchover Best Practices using SQL*Plus

1)Verify Managed Recovery is running on the standby

The following query at the standby verifies that managed recovery is running:
SQL> SELECT PROCESS FROM V$MANAGED_STANDBY WHERE PROCESS LIKE ‘MRP%’;

If managed standby recovery is not running or not started with real-time apply, restart managed recovery with real-time apply enabled:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

2)Verify there are no large Gaps
Identify the current sequence number for each thread on the primary database
SQL> SELECT THREAD#, SEQUENCE# FROM V$THREAD;

Verify the target physical standby database has applied up to, but not including the logs from the primary query.
On the standby the following query should be within 1 or 2 of the primary query result.

SQL> SELECT THREAD#, MAX(SEQUENCE#) FROM V$ARCHIVED_LOG
WHERE APPLIED = ‘YES’
AND RESETLOGS_CHANGE# = (SELECT RESETLOGS_CHANGE#
FROM V$DATABASE_INCARNATION WHERE STATUS = ‘CURRENT’)
GROUP BY THREAD#;

3)Verify that the primary database can be switched to the standby role
Query the SWITCHOVER_STATUS column of the V$DATABASE view on the primary database:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
—————–
TO STANDBY

4)If The Primary is a RAC, then shutdown all secondary primary instances
Only one instance enough , shut down others

5)Switchover the primary to a standby database

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY WITH SESSION SHUTDOWN;

6)Verify that the standby database can be switched to the primary role

Query the SWITCHOVER_STATUS column of the V$DATABASE view on the standby database:

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
—————–
TO PRIMARY

A value of TO PRIMARY or SESSIONS ACTIVE indicates that the standby database is ready to be switched to the primary role.
If neither of these values is returned, verify that redo apply is active and that redo transport is configured and working properly.
Continue to query this column until the value returned is either TO PRIMARY or SESSIONS ACTIVE.

7)Switchover the standby database to a primary

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;

8)Open the new primary database
SQL> ALTER DATABASE OPEN;

9)Restart the new standby
If the new standby database (former primary database) was not shutdown since switching it to standby, bring it to the mount state and start managed recovery.
This can be done in parallel to the new primary open.

SQL> SHUTDOWN ABORT;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;



Physical Standby Switchover_status Showing Not Allowed

$
0
0

Physical Standby Switchover_status Showing Not Allowed

We try to make some switchover test on our RAC db(2 nodes setup) which has Physical Standby. Do not forget, before start your switchover test, you need to close one of the member of the rac instance.

After close one of instance We checked below query result;

Step 1)Verify Managed Recovery is running on the standby

The following query at the standby verifies that managed recovery is running:
SQL> SELECT PROCESS FROM V$MANAGED_STANDBY WHERE PROCESS LIKE ‘MRP%’;

If managed standby recovery is not running or not started with real-time apply, restart managed recovery with real-time apply enabled:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

Step 2)Verify there are no large Gaps

Identify the current sequence number for each thread on the primary database

SQL> SELECT THREAD#, SEQUENCE# FROM V$THREAD;

Verify the target physical standby database has applied up to, but not including the logs from the primary query.
On the standby the following query should be within 1 or 2 of the primary query result.

SQL> SELECT THREAD#, MAX(SEQUENCE#) FROM V$ARCHIVED_LOG
WHERE APPLIED = ‘YES’
AND RESETLOGS_CHANGE# = (SELECT RESETLOGS_CHANGE#
FROM V$DATABASE_INCARNATION WHERE STATUS = ‘CURRENT’)
GROUP BY THREAD#;

Step 3)Verify that the primary database can be switched to the standby role

Query the SWITCHOVER_STATUS column of the V$DATABASE view on the primary database:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
—————–
TO STANDBY

In that step, Query returned ” NOT ALLOWED “… So We started to investigate why SWITCHOVER_STATUS shows NOT ALLOWED.

In Oracle documentation explain SWITCHOVER_STATUS column of v$database can have the following values:

NOT ALLOWED – Either this is a standby database and the primary database has not been switched first, or this is a primary database and there are no standby databases.

SESSIONS ACTIVE – Indicates that there are active SQL sessions attached to the primary or standby database that need to be disconnected before the switchover operation is permitted.

SWITCHOVER PENDING – This is a standby database and the primary database switchover request has been received but not processed.

SWITCHOVER LATENT – The switchover was in pending mode, but did not complete and went back to the primary database.

TO PRIMARY – This is a standby database, with no active sessions, that is allowed to switch over to a primary database.

TO STANDBY – This is a primary database, with no active sessions, that is allowed to switch over to a standby database.

RECOVERY NEEDED – This is a standby database that has not received the switchover request.

We check the synchronization status between primary and physical standby. They are no gap and any issues on sync. Physical standby has applied the lastly generated archived redo log sequence. But We still keep to get same result from query… v$database switchover_status shows “not allowed”

While We make search at metalink We found this note:  Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1) 
From note:
It is expected to see this status in physical standby.When we are certain that Primary and target standby are in sync,We can then proceed with switchover exercise regardless of “not allowed” status in Physical stand

Switchover always originates from Primary database. On the request of switchover sql statement “alter database commit to switchover to physical standby with session shutdown”, Primary will generate special marker called EOR (end-of-redo) that is placed in the header of online redo log sequence. So this online redo log sequence will be archived locally and sent to all standby databases.

Only upon receiving and applying EOR (end-of-redo), v$database.switchover_status will change from “not allowed” to “to primary” or “sessions active”.

So this is expected value for $database.switchover_status cloumn. We keep going switchover test and it goes so smooth.

You can find How to  Performing Switchover on Oracle Standby Database steps in here

 


Oracle RAC log files locations

$
0
0

If you are using RAC system (doesnt matter how many nodes you have) You need to know where log files are located.

In this post, I share those log files locations.

Here We go;

The Cluster Ready Services Daemon (crsd) Log Files

Log files for the CRSD process (crsd) can be found in the following directories:

                 CRS home/log/hostname/crsd

Oracle Cluster Registry (OCR) Log Files

The Oracle Cluster Registry (OCR) records log information in the following location:

                CRS Home/log/hostname/client

Cluster Synchronization Services (CSS) Log Files

You can find CSS information that the OCSSD generates in log files in the following locations:

                CRS Home/log/hostname/cssd

Event Manager (EVM) Log Files

Event Manager (EVM) information generated by evmd is recorded in log files in the following locations:

                CRS Home/log/hostname/evmd

RACG Log Files

The Oracle RAC high availability trace files are located in the following two locations:

CRS home/log/hostname/racg

$ORACLE_HOME/log/hostname/racg

Core files are in the sub-directories of the log directories. Each RACG executable has a sub-directory assigned exclusively for that executable. The name of the RACG executable sub-directory is the same as the name of the executable.

You can follow below table which define locations of logs files:

Oracle Clusterware log files

Cluster Ready Services Daemon (crsd) Log Files:
$CRS_HOME/log/hostname/crsd

Cluster Synchronization Services (CSS):
$CRS_HOME/log/hostname/cssd

Event Manager (EVM) information generated by evmd:
$CRS_HOME/log/hostname/evmd

Oracle RAC RACG:
$CRS_HOME/log/hostname/racg
$ORACLE_HOME/log/hostname/racg

Oracle RAC 11g Release 2 log files

Clusterware alert log:
$GRID_HOME/log/<host>/alert<host>.log

Disk Monitor daemon:
$GRID_HOME/log/<host>/diskmon

OCRDUMP, OCRCHECK, OCRCONFIG, CRSCTL:
$GRID_HOME/log/<host>/client

Cluster Time Synchronization Service:
$GRID_HOME/log/<host>/ctssd

Grid Interprocess Communication daemon:
$GRID_HOME/log/<host>/gipcd

Oracle High Availability Services daemon:
$GRID_HOME/log/<host>/ohasd

Cluster Ready Services daemon:
$GRID_HOME/log/<host>/crsd

Grid Plug and Play daemon:
$GRID_HOME/log/<host>/gpnpd:

Mulitcast Domain Name Service daemon:
$GRID_HOME/log/<host>/mdnsd

Event Manager daemon:
$GRID_HOME/log/<host>/evmd

RAC RACG (only used if pre-11.1 database is installed):
$GRID_HOME/log/<host>/racg

Cluster Synchronization Service daemon:
$GRID_HOME/log/<host>/cssd

Server Manager:
$GRID_HOME/log/<host>/srvm

HA Service Daemon Agent:
$GRID_HOME/log/<host>/agent/ohasd/oraagent_oracle11

HA Service Daemon CSS Agent:
$GRID_HOME/log/<host>/agent/ohasd/oracssdagent_root

HA Service Daemon ocssd Monitor Agent:
$GRID_HOME/log/<host>/agent/ohasd/oracssdmonitor_root

HA Service Daemon Oracle Root Agent:
$GRID_HOME/log/<host>/agent/ohasd/orarootagent_root

CRS Daemon Oracle Agent:
$GRID_HOME/log/<host>/agent/crsd/oraagent_oracle11

CRS Daemon Oracle Root Agent:
$GRID_HOME/log/<host> agent/crsd/orarootagent_root

Grid Naming Service daemon:
$GRID_HOME/log/<host>/gnsd


DataPump Import (IMPDP) Fails With Errors ORA-39083 & ORA-01861

$
0
0

I face with this error message while I am doing import process on 11g database.

My source db version is 10g( 10.2.0.4.3 ) and OS is AIX 6.1 and my target db version is 11g RAC( 11.2.0.4.6 ) and OS is AIX 7.1.

The errors:
ORA-39083: Object type PASSWORD_HISTORY failed to create with error:
ORA-01861: literal does not match format string

From related MOS document:

The problem is that DBMS_PSWMG_IMPORT.IMPORT_HISTORY expects passwords to be in ‘yyyy/mm/dd’ format.

The issue is discussed in related bugs
Bug 13039027 – IPB01D : IMPDP ORA-39083: OBJECT TYPE PASSWORD_HISTORY FAILED TO CREATE WI
Bug 14521182 – DATAPUMP IMPORT PASSWORD_HISTORY ORA-39083,ORA-01847,ORA-01861
which are both closed with status ‘Not a Bug’.

For your information, because of security reasons I changed my schema name as SCOOT in below logs.

Complete logs here:
Master table “SYS”.”SYS_IMPORT_FULL_04″ successfully loaded/unloaded
Starting “SYS”.”SYS_IMPORT_FULL_04″: “/******** AS SYSDBA” directory=EXPDP_DIR dumpfile=SCOOT%U.dmp PARALLEL=8 logfile=impdp_SCOOT.log cluster=N DATA_OPTIONS=DISABLE_APPEND_HINT
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:”SCOOT” already exists
ORA-31684: Object type USER:”SCOOTUSR1″ already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PASSWORD_HISTORY
ORA-39083: Object type PASSWORD_HISTORY failed to create with error:
ORA-01861: literal does not match format string
Failing sql is:
DECLARE SUBTYPE HIST_RECORD IS SYS.DBMS_PSWMG_IMPORT.ARRAYOFHISTORYRECORDS; HIST_REC HIST_RECORD; i number := 0; BEGIN i := i+1; HIST_REC(i).USERNAME := ‘SCOOT’; HIST_REC(i).PASSWORD := ‘F99CA5C8EC2F8836′; HIST_REC(i).PASSWD_DATE := ’16-03-2015 15:03:34’; i := i+1; HIST_REC(i).USERNAME := ‘SCOOT’; HIST_REC(i).PASSWORD := ’98F7AE6C84E7A2E8′; HIST_REC(i).PASSWD_DATE :=
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA

So here is the solutions:

1. At 10g source environment, first set the NLS_DATE_FORMAT environment variable:

$ export NLS_DATE_FORMAT=YYYY/MM/DD HH24:MI:SS

PS: If you are using AIX than you may hit this error message:
ksh: HH24:MI:SS: is not an identifier

If you hit this message you can use below syntax:

$ export NLS_DATE_FORMAT=”YYYY/MM/DD HH24:MI:SS”

verify:
$ echo $NLS_DATE_FORMAT
YYYY/MM/DD HH24:MI:SS

2. Re-run the Datapump export.

3. Perform the Datapump import into the 11g database using the new dump file.

Reference:
ORA-39083 and ORA-06502 during IMPDP for PASSWORD_HISTORY (Doc ID 1553898.1)
DataPump Import (IMPDP) Fails With Errors ORA-39083 ORA-6550 PLS-00103 On Object Type PASSWORD_HISTORY [ID 1053162.1]


Data Pump Import Fails With ORA-38500: Unsupported operation: Oracle XML DB not present

$
0
0

I face with this error message during export,import process in scheduled crontab job.

Source and Target DB versions are both 11.2.0.4.6 and OS are AIX 7.1

After investigate issue We noticed, you can face this error because of 2 reasons.

1. The XML feature is not installed. Because we are attempting to invoke XML/XDB features during the import, the error is raised.

You need to Query view dba_registry to check if XDB and XML components are installed and valid on both source and target databases:

select comp_id,comp_name,version,status from dba_registry;

If you need to install XML feature you can use this note:
Master Note for Oracle XML Database (XDB) Install / Deinstall [ID 1292089.1]
Data Pump Import Fails With ORA-942 ORA-06512 And ORA-38500 [ID 1350414.1]

2. If the involved table is a standard table and does not use XML DB. So why is the XML DB error reported?

The issue is generated when tables have differences.The error is happening due to the metadata differences of the exported table in the dumpfile and the existing table in the target DB.

In general, whenever there is a difference between metadata of a table from a dumpfile and a pre-existing table in a target DB, the IMPDP code tries to find the difference between the metadata of the table to find the correct metadata. To find the metadata difference, we use metadata code which internally uses the XDB feature to differentiate metadata XML.

If you repeat export&import process than  the DataPump import will be succeeded.

For more details you can refer this note:
Ora-38500 Raised By IMPDP For Table That Does Not Use XML DB (Doc ID 1424643.1)


Automatic SQL Tuning in Oracle Database 10g&11g

$
0
0

As a DBA, We need to tune many sql for performans issue. Its very good option to use SQL Tuning Advisor(also SQL repair advisor) from OEM.

In this post, We will use sqlplus for SQL Tuning

Here is the steps.

1. Create user(If neccessary):

CONN sys/password AS SYSDBA

–create user
GRANT ADVISOR TO scott;

–grant user
GRANT CREATE SESSION TO scoot;
GRANT ADMINISTER SQL MANAGEMENT OBJECT TO scott;

–connect db by scoot
CONN scott/tiger

2. Create Tuning TASK

To create tuning task, We need to use CREATE_TUNING_TASK function. The statements to be analyzed can be retrieved from the Automatic Workload Repository (AWR), the cursor cache, a SQL tuning set or specified manually.

A. By AWR interval

SET SERVEROUTPUT ON

— Tuning task created for specific a statement from the AWR.
DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
begin_snap => 7830,
end_snap => 7832,
sql_id => ‘3c8gs332cuugy’,
scope => DBMS_SQLTUNE.scope_comprehensive,
time_limit => 1800,
task_name => ‘MY_AWR_tuning_task_for_3c8gs332cuugy’,
description => ‘Tuning task for 3c8gs332cuugy’);
DBMS_OUTPUT.put_line(‘l_sql_tune_task_id: ‘ || l_sql_tune_task_id);
END;
/

B. By Cursor cache

— Tuning task created for specific a statement from the cursor cache.
DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
sql_id => ‘3c8gs332cuugy’,
scope => DBMS_SQLTUNE.scope_comprehensive,
time_limit => 1800,
task_name => ‘3c8gs332cuugy_tuning_task’,
description => ‘Tuning task for 3c8gs332cuugy.’);
DBMS_OUTPUT.put_line(‘l_sql_tune_task_id: ‘ || l_sql_tune_task_id);
END;
/

C. By SQL text

DECLARE
my_task_name VARCHAR2(80);
my_sqltext VARCHAR2(80);
BEGIN
my_sqltext := ‘select /*+ no_index(test test_idx) */ * from test where n=1’;
my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
sql_text=> my_sqltext,
time_limit => 60,
task_name => ‘my_sql_tuning_task_gunes’,
description => ‘Task to tune a query on a specified table’);
END;
/

D. By SQL_id

DECLARE
my_task_name VARCHAR2(80);
my_sql_id VARCHAR2(80);
BEGIN
my_sql_id := ’90qyvkh4xb3n6′;
my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
sql_id => my_sql_id,
time_limit => 1800,
task_name => ‘my_sql_tuning_task_gunes’,
description => ‘Task to tune a query on a specified table’);
END;
/

3. Create Task

SQL> exec DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => ‘my_sql_tuning_task_gunes’);

SET LONG 10000;
SET PAGESIZE 1000
SET LINESIZE 200
SELECT DBMS_SQLTUNE.report_tuning_task(‘my_sql_tuning_task_gunes’) AS recommendations FROM dual;
SET PAGESIZE 24
4. Run profile

With NO Force match:
SQL> execute dbms_sqltune.accept_sql_profile(task_name =>’my_sql_tuning_task_gunes’, replace => TRUE);

PL/SQL procedure successfully completed.

With Force match:
SQL> execute dbms_sqltune.accept_sql_profile(task_name =>’my_sql_tuning_task_gunes’, replace => TRUE, force_match=>true);
Referans:
How To Use SQL Profiles for Queries Using Different Literals Using the Force_Match Parameter of DBMS_SQLTUNE.ACCEPT_SQL_PROFILE (Doc ID 1253696.1)


How to Restart Dead Dispatchers Manually

$
0
0

The shared server architecture enables a database server to allow many user processes to share very few server processes, so the number of users that can be supported is increased. With shared server, many user processes connect to a dispatcher. The dispatcher directs multiple incoming network session requests to a common queue. An idle shared server process from a shared pool of server processes picks up a request from the queue. This means a small pool of server processes can serve a large number of clients.

Related views:

select * from v$dispatcher
select * from v$dispatcher_config
select * from v$dispatcher_rate
select * from v$queue


——————–
— Adding DISPATCHER- If you are using RAC than you have to use Virtual Interface!
——————–
# Node 1

SQL> alter system set dispatchers='(address=(protocol=tcp)(host=node1-vip))(dispatchers=2)’ scope=both sid=’racdb1′;
SQL> alter system register;

# Node 2

SQL> alter system set dispatchers='(address=(protocol=tcp)(host=node2-vip)) (dispatchers=2)’ scope=both sid=’racdb2′;
SQL> alter system register;

###########
——————–
— DISPATCHER running or not?
——————–
lsnrctl services

or

lsnrctl services SERVICE_NAME

###########

— ————————————————————————
— Let us assume We have already 1 dispatcher on our system but We want to add 2 more
— If We are on RAC system and If We dont give SID,than dispatcher will be add on 2 notes same times-
— ————————————————————————
alter system set dispatchers=”(protocol=TCP)(dispatchers=3)” SID=’XXXX’

###########
——————–
— How to stop DISPATCHER or Disable
——————–
— Restart dispatcher
——————–
If you need to close dispatcher

SELECT ‘alter system shutdown immediate ”’ || name || ”’;’
FROM v$dispatcher vd, v$process vp
WHERE vd.paddr = vp.addr
ORDER BY name;

alter system shutdown immediate ‘D000’;

If PMON did not restart the dispatchers, you can re-enable dispathers by this:

— Open-
———-
alter system set dispatchers='(address=(protocol=tcp)(host=vip.xx.com))(dispatchers=5)’ scope=both sid=’XXX’;

— Disable permanently-
———————
alter system set dispatchers=”(protocol=TCP)” scope=spfile; << reboot db

— How to check current usage-
———————

SELECT status,count(*) FROM v$circuit group by rollup(status);

STATUS COUNT(*)
EOF 2102
NORMAL 51
OUTBOUND 57
  2210

Outbound number should dicrease-increase..

SELECT SADDR,count(*) FROM v$circuit group by rollup(SADDR);

SADDR COUNT(*)
00 2153
0700010EB0BB5BB0 1
0700010EB0BB8C90 1

Source:
————-

How To Configure Shared Server Dispatchers For RAC Environment (Doc ID 578524.1)

http://docs.oracle.com/cd/B28359_01/server.111/b28310/manproc003.htm

Shared Server Shows High Value for MAX_CONN and Circuits status EOF with SADDR 00 (Doc ID 845757.1)


Step By Step Oracle Database Upgrade from 9i to 11g and 10g to 11g

$
0
0

Oracle Database Upgrade process is the one of the main job for DBAs. I just prepared Manuel Upgrade doc which covers Oracle 9i to Oracle 11g  upgrade steps. Please do not forget, Oracle recommend to use DBUA utility for upgrade process.

Please click here to download pdf.

 



XML-20108: (Fatal Error)

$
0
0

I faced with XML-20108: (Fatal Error) message during 11.2.0.4 installation on RHEL Linux X86-64 platform. Installation screen hangs and installation log has below error messages:

INFO: Stderr Read: org.xml.sax.SAXParseException: <Line 1, Column 1>: XML-20108: (Fatal Error) Start of root element expected.
INFO: Stderr Read: at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
INFO: Stderr Read: at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
INFO: Stderr Read: at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:461)
INFO: Stderr Read: at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:402)
INFO: Stderr Read: at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:244)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiOracleHomeInfoXMLReader.updateHomeProperties(OiiiOracleHomeInfoXMLReader.java:86)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallInventory.updateOracleHomesProperties(OiiiInstallInventory.java:796)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallInventory.updateOracleHomesProperties(OiiiInstallInventory.java:779)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallInventory.readHomes(OiiiInstallInventory.java:735)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadPartialInstallInv(OiiiInstallAreaControl.java:782)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initInstallInv(OiiiInstallAreaControl.java:827)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadInstallInventory(OiiiInstallAreaControl.java:598)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1991)
INFO: Stderr Read: at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1944)

This server is already serve 3 different databases versions. Those ares:
– Oracle 9.2.0.8
– Oracle 10.2.0.5
– Oracle 11.1.0.0

After investigate issue, I canceled installation and perform below steps and start instllation again wihtout any errors.

– Rename the existing oraInventory folder.
– Execute the installer.

Referance:
ATS upgrade installer on linux error : Start of root element expected (Doc ID 1988220.1)


RMAN-03002: RMAN-06561: Error during restore database

$
0
0

I faced with that error message during restore our 10.2.0.5 db on AIX 6.1

My restore database command is simple as follow:

RUN
{
allocate channel restore01 type ‘SB_TAPE’ ;
allocate channel restore02 type ‘SBT_TAPE’ ;
RESTORE DATABASE ;
RELEASE channel restore01;
RELEASE channel restore02;
}

We can restore db without any error message, than We started to recover process.
My recover database command is simple as follow:

RUN
{
allocate channel restore01 type ‘SBT_TAPE’ ;
allocate channel restore02 type ‘SBT_TAPE’ ;
RECOVER DATABASE ;
RELEASE channel restore01;
RELEASE channel restore02;
}

During recover process Rman session end with:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/31/2016 16:00:00
RMAN-06561: available space must be larger than 1421913 kb

After investigate error message, I found this:

Cause: The recovery failed because it requires more disk space. One of the following could have caused this error: 1) The MAXSIZE option is used but is not large enough to restore files. 2) Files should be restored to recovery area, but available disk space is not large enough to restore files.

Action: One of the following: 1) Increase the MAXSIZE parameter and retry the command. 2) Free up disk space in the recovery area.

I also find this information:

Workaround
The workaround is not to set db_recovery_file_dest and
db_recovery_file_dest_size parameters in the init.ora of auxiliary instance
during duplicate.

We set&increased db_recovery_file_dest and db_recovery_file_dest_size but error still persist.

So how I solved issue. Here is the command
RECOVER DATABASE delete archivelog maxsize 150000M;
{
allocate channel restore01 type ‘SBT_TAPE’ ;
allocate channel restore02 type ‘SBT_TAPE’ ;
RECOVER DATABASE delete archivelog maxsize 150000M;;
RELEASE channel restore01;
RELEASE channel restore02;
}

Reference:
Bug 8631293 – RMAN DUPLICATE throws RMAN-6561 after setting recovery area parameter (Doc ID 8631293.8)


List Rman backups

$
0
0

As a DBA We always need to know backup informations for our databases.So I just prepared quick list for some important list backup commands.

– LIST ARCHIVELOG ALL;
– LIST BACKUP OF ARCHIVELOG ALL;
– LIST BACKUP;
– LIST BACKUP OF DATABASE;
– LIST BACKUP SUMMARY;
– LIST BACKUP BY FILE;


– LIST expired Backup of archivelog all summary;
– LIST Backup of tablespace Test summary;
– LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 1437;
– LIST Backup of Controlfile;
– LIST Backup of Spfile;
– LIST expired Backup;
– LIST expired Backup summary;
– LIST expired Backup of Archivelog all;
– LIST recoverable backup;

For more informations, please review:
https://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta036.htm


EXP-00113 & EXP-00006

$
0
0

I faced with that error on 11.2.0.2 db on AIX 6.1 system.

During export an error message EXP-113 is raised:
EXP-00113: Feature New Composite Partitioning Method is unsupported. Table MYTABLE could not be exported
But the export would still complete and also there are some addition error messages are raised:
EXP-00006: internal inconsistency error
EXP-00000: Export terminated unsuccessfully

Complete error is:

. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
. about to export X’s tables via Direct Path …
. about to export X’s tables via Direct Path …
. about to export X’s tables via Direct Path …
. about to export X’s tables via Direct Path …
. about to export X’s tables via Direct Path …
. about to export X’s tables via Direct Path …
. about to export X’s tables via Direct Path …
EXP-00113: Feature New Composite Partitioning Method is unsupported. Table X could not be exported
. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
. . exporting table XX
EXP-00006: internal inconsistency error
EXP-00000: Export terminated unsuccessfully

After make search at metalink, I noticed that; I met one bug.. Bug 7834212

From note:
Bug 7834212 has been filed regarding this problem. However, it should be noted that the new composite partitioning and system partitioning is a 11g feature.
Classic Export does not support this. When a table with this feature is exported, an error message EXP-113 is raised.But if the table partition has split or added a new partition, it will now generate the EXP-6 and EXP-0 errors and fail to complete.

So what is solution? Here is the answer:
Use DataPump to perform exports of composite partitioning and system partitioned tables as this is the recommended method.

Reference:
Exporting System or Composite Partitioned Table Using Classic Export Gives EXP-6 AND EXP-0 (Doc ID 762774.1)


SMON recovery crash with ORA-00607&ORA-00600: internal error code, arguments: [kdBlkCheckError]

$
0
0

We had SMON recovery crash with ORA-00607&ORA-00600: internal error code, arguments: [kdBlkCheckError]on 11.2.0.3.0 db on linux system.

Here is the all related error messages and solution:

Step 1: Check alert log

–Error Message
Block recovery from logseq 46434, block 825 to scn 14782663039152
Recovery of Online Redo Log: Thread 1 Group 50 Seq 46434 Reading mem 0
Mem# 0: +DATA/x<db_sid>/onlinelog/group_50.1918.898308101
Block recovery completed at rba 46434.847.16, scn 3441.3680573617
ORACLE Instance <DB_SID> (pid = 32) – Error 607 encountered while recovering transaction (447, 31) on object 197036643.
Errors in file /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>/trace/<DB_SID>_smon_11855.trc:
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [1092], [339476], [6101], [], [], [], [], [], [], [], []
Dumping diagnostic data in directory=[cdmp_20160728141255], requested by (instance=1, osid=11855 (SMON)), summary=[incident=436122].
Errors in file /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>/trace/<DB_SID>_smon_11855.trc (incident=436123):
ORA-00600: internal error code, arguments: [kdBlkCheckError], [1092], [339476], [6101], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>/incident/incdir_436123/<DB_SID>_smon_11855_i436123.trc
Thu Agu 01 14:12:57 2016
PMON (ospid: 11772): terminating the instance due to error 474
Step 2: See what happens on your system

–login as oracle user and run adrci utulity
$ adrci

ADRCI: Release 11.2.0.3.0 – Production on Fri Aug 01 08:56:27 2016

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

ADR base = “/u01/app/oracle”

–listing home
adrci> show home
ADR Homes:
diag/asmtool/user_oracle/host_2223417381_80
diag/rdbms/<db_sid>/<DB_SID>
diag/clients/user_oracle/host_2223417381_80
diag/clients/user_oracle/host_2223417381_11
diag/tnslsnr/xx/listener_1521
diag/tnslsnr/xx/listener_1522
diag/diagtool/user_oracle/host_2223417381_80
diag/asm/user_oracle/host_2223417381_80

–setting home
adrci> set home diag/rdbms/<db_sid>/<DB_SID>

–check problem
adrci> show problem

ADR Home = /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>:
*************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME
——————– ———————————————————– ——————– —————————————-
1 ORA 600 [kdBlkCheckError] 510335 2016-01-08 17:19:43.204000 +03:00
1 rows fetched
–check errors.In this case:
– problem id –> 1
– error is –> ORA 600 [kdBlkCheckError]
– last_incident –> 510335
– lastinc_time –> 2016-01-08 17:19:43.204000 +03:00

–get details about error
adrci> show incident -p “problem_key=’ORA 600 [kdBlkCheckError]'”

ADR Home = /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
——————– ———————————————————– —————————————-
510335 ORA 600 [kdBlkCheckError] 2016-01-08 17:19:43.204000 +03:00
1 rows fetched

— get details about what happen on this error
adrci>show incident -mode detail -p “incident_id=411533”
ADR Home = /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>:
*************************************************************************

**********************************************************
INCIDENT INFO RECORD 1
**********************************************************
INCIDENT_ID 411533
STATUS ready
CREATE_TIME 2016-08-01 13:39:07.944000 +03:00
PROBLEM_ID 27
CLOSE_TIME <NULL>
FLOOD_CONTROLLED none
ERROR_FACILITY ORA
ERROR_NUMBER 600
ERROR_ARG1 kdBlkCheckError
ERROR_ARG2 1092
ERROR_ARG3 339476
ERROR_ARG4 6101
ERROR_ARG5 <NULL>
ERROR_ARG6 <NULL>
ERROR_ARG7 <NULL>
ERROR_ARG8 <NULL>
ERROR_ARG9 <NULL>
ERROR_ARG10 <NULL>
ERROR_ARG11 <NULL>
ERROR_ARG12 <NULL>
SIGNALLING_COMPONENT <NULL>
SIGNALLING_SUBCOMPONENT <NULL>
SUSPECT_COMPONENT <NULL>
SUSPECT_SUBCOMPONENT <NULL>
ECID <NULL>
IMPACTS 0
PROBLEM_KEY ORA 600 [kdBlkCheckError]
FIRST_INCIDENT 411533
FIRSTINC_TIME 2016-08-01 13:39:07.944000 +03:00
LAST_INCIDENT 510335
LASTINC_TIME 2016-08-01 17:19:43.204000 +03:00
IMPACT1 0
IMPACT2 0
IMPACT3 0
IMPACT4 0
KEY_NAME SID
KEY_VALUE 2017.1
KEY_NAME ProcId
KEY_VALUE 32.1
KEY_NAME Client ProcId
KEY_VALUE oracle11@xx.local 17997_140071949428480
OWNER_ID 1
INCIDENT_FILE /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>/incident/incdir_411533/<DB_SID>_smon_17997_i411533.trc
OWNER_ID 1
INCIDENT_FILE /u01/app/oracle/diag/rdbms/<db_sid>/<DB_SID>/trace/<DB_SID>_smon_17997.trc
1 rows fetched

Step 3: Solve the issue

–in pfile add below lines into pfile
*.event=”10513 trace name context forever, level 2″ ## disable SMON recovery
*.event=”10231 trace name context forever, level 10″ ## skip corrupt blocks during select

–start your database from pfile

–After db up&running find corrupted blocks
select * from v$database_block_corruption;

–Also use this sql
COLUMN owner FORMAT A20
COLUMN segment_name FORMAT A30

SELECT DISTINCT owner, segment_name
FROM v$database_block_corruption dbc
JOIN dba_extents e ON dbc.file# = e.file_id AND dbc.block# BETWEEN e.block_id and e.block_id+e.blocks-1
ORDER BY 1,2;

Select * from dba_object where object_id=’xxx’;

–drop or truncate related  objects
drop index xxx

purge dba_recyclebin;
shu immediate
startup from spfile

–check database files via RMAN
RMAN> BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;

–Also use this sql
SQL->select * from v$database_block_corruption;


Viewing all 52 articles
Browse latest View live