Tuesday, 1 October 2013

Performing the switchover in 11gr2 datagurad steps

Performing the switchover in 11gr2 datagurad steps


1) There are few steps we need to check before performing the switchover in dataguard environment
a)If we are using the OEM Enable a blackout for primary database in enterprise manager.
b)check the crontab jobs for Primary database need to disabled.
c)Check for executing backups/exports and cancel.
d)Identify the log gap if gap present resolve the gap
e)From Primary and Standby database check the list of last log should be applied on both database

2)Verify that it is possible to perform a switchover operation On the primary database
On the primary database the switchover_status column of v$database check which is possible to perform a switchover operation

SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
------------------
TO STANDBY
-In order to perform a switchover all sessions to the database need to be disconnected. This process has been automated with the “with session shutdown” clause that has been added to the alter database commit to switchover command.
SWITCHOVER_STATUS
-------------------------------
 SESSIONS ACTIVE
 -Then you should either disconnect all sessions manually (or) when performing step 3 you should append the “with session shutdown” clause.

For example:
 SQL> alter database commit to switchover to standby with session shutdown;
(Note: that the clause "with session shutdown" also works with the switchover to primary command
Ex: alter database commit to switchover to primary with session shutdown;)

SWITCHOVER_STATUS
-----------------------------
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.

SWITCHOVER_STATUS
-----------------------------
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_STATUS
-----------------------------
SWITCHOVER PENDING -
-This is a standby database and the primary database switchover request has been received but not processed.

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

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

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

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

During normal operations it is acceptable to see the following values for

SWITCHOVER_STATUS
-----------------------------
 SESSIONS ACTIVE (or) TO STANDBY. ( on the primary database)
 During normal operations  it is acceptable to see these values

SWITCHOVER_STATUS
-----------------------------
NOT ALLOWED (or) SESSIONS ACTIVE.  (on the standby database)
-During normal operations  it is acceptable to see these values

3. Convert the primary database to the new standby:
SQL> alter database commit to switchover to physical standby ;
Database altered.

4. Shutdown the former primary and mount as a standby database:
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.

SQL> startup nomount
ORACLE instance started.
Total System Global Area  818401280 bytes
Fixed Size                  2217792 bytes
Variable Size             528484544 bytes
Database Buffers          285212672 bytes
Redo Buffers                2486272 bytes

SQL> alter database mount standby database;
Database altered.

5. Defer the remote archive destination on the old primary:
SQL> alter system set log_archive_dest_state_3=defer;

6. Verify that the physical standby can be converted to the new primary:
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
------------------
SWITCHOVER PENDING
(Note that if the status returns SESSIONS ACTIVE then you should append the with session shutdown clause to the command in step 7.

7. Convert the physical standby to the new primary:
SQL> alter database commit to switchover to primary;
Database altered.

8. Shutdown and startup the new primary:
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.

SQL> startup
ORACLE instance started.
Total System Global Area  818401280 bytes
Fixed Size                  2217792 bytes
Variable Size             482347200 bytes
Database Buffers          331350016 bytes
Redo Buffers                2486272 bytes
Database mounted.
Database opened.

9. Enable remote archiving on the new primary to the new standby:
SQL> alter system set log_archive_dest_state_2=enable;

10. Start managed recover on the new standby database:
SQL> recover managed standby database disconnect;
Media recovery complete.

11) There are few steps we need to check after performing the switchover in dataguard environment
a)If we are using the OEM check the status of  primary database in enterprise manager.
b)check the crontab jobs for Primary database need to enabled
c)Check for executing backups/exports and start as per schedule
d)Identify the log gap if gap present resolve the gap
e)From Primary and Standby database check the list of last log should be applied on both database


Perform Failover Operation to a Physical Standby

Use the following steps to perform a failover to a physical standby database.

Identify and resolve any archive log gaps that may exist on the target standby database.

Query the view V$ARCHIVE_GAP on the target standby database to determine if there are gaps in the archive sequence. This view contains the sequence numbers of any archived redo logs that are known to be missing for each thread. The data returned reflects the lowest and highest known gap in the archive sequence.


SQL> select * from v$archive_gap;

no rows selected
If the above query against V$ARCHIVE_GAP returns no rows, there are no known archive log gaps.

If the above query against V$ARCHIVE_GAP returns a record, it will display the sequence numbers of the archived redo logs known to be missing from the standby database as illustrated in the following example:


SQL> select * from v$archive_gap;

   THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
         1           854            859
From the output above, the physical standby database is currently missing archived redo logs from sequence 854 to sequence 859 for thread 1. If possible locate and copy all of the identified missing archived redo logs to the target standby database from either the primary database (if available) or from other standbys. If working in a RAC environment, this would need to include missing archived redo logs from all threads. Once copied over, the missing archived redo logs will need to be registered with the target standby database:


SQL> alter database register logfile '/u03/flash_recovery_area/PRODDB/archive/2010_12_16/o1_mf_1_854_6jmc5ngd_.arc';

Database altered.

SQL> alter database register logfile '/u03/flash_recovery_area/PRODDB/archive/2010_12_16/o1_mf_1_855_6jmc5pht_.arc';

Database altered.

SQL> alter database register logfile '/u03/flash_recovery_area/PRODDB/archive/2010_12_16/o1_mf_1_856_6jmc5t4t_.arc';

Database altered.

SQL> alter database register logfile '/u03/flash_recovery_area/PRODDB/archive/2010_12_16/o1_mf_1_857_6jmc6jq9_.arc';

Database altered.

SQL> alter database register logfile '/u03/flash_recovery_area/PRODDB/archive/2010_12_16/o1_mf_1_858_6jmc7z5o_.arc';

Database altered.

SQL> alter database register logfile '/u03/flash_recovery_area/PRODDB/archive/2010_12_16/o1_mf_1_859_6jmcb9m0_.arc';

Database altered.
Copy and register any other missing archived redo logs. Query the V$ARCHIVED_LOG view on all other available standby databases in the configuration (if any others exist) to obtain the highest log sequence number for each thread.


SQL> select unique thread# as "Thread", max(sequence#)
  2  over (partition by thread#) as "Last" from v$archived_log;

    Thread       Last
---------- ----------
         1        900
If you find any archived redo logs that contain sequence numbers higher than the highest sequence number available on the target standby database, copy and register them to the target standby database. If the standby database is in managed recovery mode (and why wouldn't it be), the newly registered archived redo logs will be automatically applied to the standby. If the standby database is not in managed recovery mode, then manually recover the newly registered archived redo logs. This must be done for all threads if you are in a RAC environment.


SQL> alter database register logfile '';
 
About Partial Archived Redo Logs

It is possible to copy over and register what is known as a partial archived redo log file. A partial archived redo log file contains all of the primary database redo data received by the standby database when the primary database fails, but the archived redo log is not automatically registered in the standby database.

When you register a partial archived redo log, it prevents the recovery of the standby redo logs (if they exist). Therefore, whether or not you have registered a partial archived redo log determines which failover command will be necessary to run (next step).

You will know if you registered a partial archived redo log if you get receive the following message when attempting to register the archived redo log:

Register archivelog 'filespec1' was created due to a network disconnect;
archivelog contents are valid but missing subsequent data
Perform terminal recovery on the target standby by issuing managed recovery mode with the FINISH keyword. If the physical standby database is configured with active standby redo logs AND you have not registered any partial archived redo log files, issue the following command to initiate the failover operation:


SQL> alter database recover managed standby database finish;

Database altered.
If the standby database was not configured with standby redo logs, or they are not active, you must enter the following command instead:


SQL> alter database recover managed standby database finish skip standby logfile;

Database altered.
The above SQL statement performs incomplete recovery until the last SCN included in the latest archived redo log available at the physical standby database.

Once the terminal recovery command completes, convert the physical standby into a primary database using the following command:


SQL> alter database commit to switchover to primary;

Database altered.
After the "COMMIT TO SWITCHOVER" command completes, you can no longer use this database as a standby database. Also, subsequent redo logs from the original primary database cannot be applied.

 
The above SQL statement will only succeed if the correct "ALTER DATABASE RECOVER MANAGED STANDBY DATABASE ... FINISH;" statement was issued in the previous step. If you forgot the "... SKIP STANDBY LOGFILE" clause although you have no standby redo log files, the "COMMIT TO SWITCHOVER" will fail with the error that more media recovery is required.

If the "COMMIT TO SWITCHOVER" fails for any reason, you have to use the "ACTIVATE STANDBY DATABASE" SQL statement which forces the failover operation:

SQL> alter database activate standby database;
To complete the failover operation, restart the new primary database in read/write mode using the appropriate initialization parameter file (or SPFILE) for the primary role:


SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.


SQL> startup;
ORACLE instance started.

Total System Global Area 1241513984 bytes
Fixed Size                  1273420 bytes
Variable Size             318767540 bytes
Database Buffers          905969664 bytes
Redo Buffers               15503360 bytes
Database mounted.
Database opened.
Perform a full backup of the new primary database!

Keep in mind that if this was the only standby database in the Data Guard configuration, then the database environment will be running unprotected until a new standby database can be setup and synchronized with the current primary. If Flashback Database was enabled on the original primary database before the failover and the original primary database is still available after the original primary machine comes back online,

Wednesday, 11 September 2013

CRS-0215: Could not start resource 'ora.sample.sample1.inst'

PRKP-1001 : Error starting instance sample1 on node server01
CRS-0215: Could not start resource 'ora.sample.sample1.inst'.

$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.sample.db  application    OFFLINE   OFFLINE
ora....e1.inst application    ONLINE    UNKNOWN   server01
ora....e2.inst application    ONLINE    UNKNOWN  server02
ora....02.lsnr application    ONLINE    ONLINE    server01
ora....c02.gsd application    ONLINE    ONLINE    server01
ora....c02.ons application    ONLINE    ONLINE    server01
ora....c02.vip application    ONLINE    ONLINE    server01
ora....04.lsnr application    ONLINE    ONLINE    server02
ora....c04.gsd application    ONLINE    ONLINE    server02
ora....c04.ons application    ONLINE    ONLINE    server02
ora....c04.vip application    ONLINE    ONLINE    server02

SRVCTL has problems while starting the database (SRVCTL STOP DATABASE works ok).
Also, the database can be started and stopped fine using SQL*Plus. No problems there.

I encountered this issue in my cluster. May be this also one of the reason. 

$ ./srvctl start database -d sample
PRKP-1001 : Error starting instance sample1 on node server01
CRS-0215: Could not start resource 'ora.sample.sample1.inst'.
PRKP-1001 : Error starting instance sample2 on node server02
CRS-0215: Could not start resource 'ora.sample.sample2.inst'.

check the logs 
/u001/app/oracle/product/10.2.0/db_1/log/server01/racg 
view imonsample.log

Oracle Database 10g RACG Release 10.2.0.5.0 Production Copyright 1996, 2005, Oracle.  All rights reserved.
2013-09-10 20:08:47   : Could not make directory /u001/app/oracle/product/10.2.0/db_1/racg/init/server01/ reason: Permission denied
Oracle Database 10g RACG Release 10.2.0.5.0 Production Copyright 1996, 2005, Oracle.  All rights reserved.
2013-09-10 20:08:59   : Could not make directory /u001/app/oracle/product/10.2.0/db_1/racg/init/server01/ reason: Permission denied
Oracle Database 10g RACG Release 10.2.0.5.0 Production Copyright 1996, 2005, Oracle.  All rights reserved.
2013-09-10 20:09:47   : Could not make directory /u001/app/oracle/product/10.2.0/db_1/racg/init/server01/ reason: Permission denied
Oracle Database 10g RACG Release 10.2.0.5.0 Production Copyright 1996, 2005, Oracle.  All rights reserved.
2013-09-10 20:10:52   : Could not make directory /u001/app/oracle/product/10.2.0/db_1/racg/init/server01/ reason: Permission denied

now check the permission for the required directory.
root@server01 # cd /u001/app/oracle/product/10.2.0/db_1/racg

root@server01 # ls -tlr
total 12
drwxr-x---   2 ora102   oinstall    1024 Sep 10 09:32 mesg
drwxr-x---   2 ora102   oinstall     512 Sep 10 09:34 log
drwxr-x---   2 ora102   oinstall     512 Sep 10 09:34 tmp
drwxr-x---   2 ora102   oinstall     512 Sep 10 09:34 dump
drwxr-x---   2 ora102   oinstall     512 Sep 10 13:47 lib
drwxr-----   3 root     root       512 Sep 10 15:47 init

if the init directory owned by root user,
change into oracle user.
root@server01 # chown -R ora102:oinstall init
root@server01 # ls -ltr
total 12
drwxr-x---   2 ora102   oinstall    1024 Sep 10 09:32 mesg
drwxr-x---   2 ora102   oinstall     512 Sep 10 09:34 log
drwxr-x---   2 ora102   oinstall     512 Sep 10 09:34 tmp
drwxr-x---   2 ora102   oinstall     512 Sep 10 09:34 dump
drwxr-x---   2 ora102   oinstall     512 Sep 10 13:47 lib
drwxr-----   3 ora102   oinstall     512 Sep 10 15:47 init

$ ./crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.sample.db  application    ONLINE    ONLINE    server02
ora....e1.inst application    ONLINE    ONLINE    server01
ora....e2.inst application    ONLINE    ONLINE    server02
ora....02.lsnr application    ONLINE    ONLINE    server01
ora....c02.gsd application    ONLINE    ONLINE    server01
ora....c02.ons application    ONLINE    ONLINE    server01
ora....c02.vip application    ONLINE    ONLINE    server01
ora....04.lsnr application    ONLINE    ONLINE    server02
ora....c04.gsd application    ONLINE    ONLINE    server02
ora....c04.ons application    ONLINE    ONLINE    server02
ora....c04.vip application    ONLINE    ONLINE    server02

Friday, 30 August 2013

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

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

oracle_orcl$ ./emctl upload agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..

The first thing that should be done is checking the log file. Switch to the following directory and tail the log file:

cd /agent_home/sysman/log
tail -f emagent.trc

Here’s the output from the log file:
2013-08-30 01:20:31,892 Thread-1092000352 ERROR pingManager: nmepm_pingReposURL: Error in request response. code = 400. text =
2013-08-30 01:21:25,238 Thread-1092000352 ERROR pingManager: nmepm_pingReposURL: Did not receive a response header from repository
2013-08-30 01:21:45,434 Thread-1092000352 ERROR pingManager: nmepm_pingReposURL: Did not receive a response header from repository
2013-08-30 01:22:39,723 Thread-1092000352 ERROR pingManager: nmepm_pingReposURL: Did not receive a response header from repository

I checked the status of the agent and saw that it’s running :

oracle_orcl$ ./emctl status agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.4.3
OMS Version       : 10.2.0.4.3
Protocol Version  : 10.2.0.4.3
Agent Home        : /u001/app/oracle/product/11.2.0/db_1/ORCL
Agent binaries    : /u001/app/oracle/product/11.2.0/db_1
Agent Process ID  : 4797
Parent Process ID : 4636
Agent URL         : https://hostname:3938/emd/main
Repository URL    : https://hostname:1158/em/upload/
Started at        : 2013-08-29 10:44:35
Started by user   : oracle
Last Reload       : 2013-08-29 11:07:39
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far :     0.00
Number of XML files pending upload           :      367
Size of XML files pending upload(MB)         :    10.54
Available disk space on upload filesystem    :    21.50%
Data channel upload directory                : /u001/app/oracle/product/11.2.0/db_1/ORCL/sysman/recv
Last attempted heartbeat to OMS              : 2013-08-30 02:39:27
Last successful heartbeat to OMS             : unknown
---------------------------------------------------------------
Agent is Running and Ready

Then I decided to clear unnecessary files that can’t be uploaded to the Grid Control under the following directories:

$AGENT_HOME/sysman/emd/collection
$AGENT_HOME/sysman/emd/state
$AGENT_HOME/sysman/emd/recv
$AGENT_HOME/sysman/emd/upload
$AGENT_HOME/sysman/emd/lastupld.xml

[oracle_orcl bin]$ ./emctl stop agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Stopping agent …. stopped.

[oracle_orcl bin]$ ./emctl clearstate agent (this should delete all state files but sometimes it is not enough, but I experienced that it is better to use this command after deletion of the files)

[oracle_orcl bin]$ ./emctl clearstate agent 
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
EMD clearstate completed successfully

[oracle_orcl bin]$ ./emctl secure agent   (and specify the password on demand)
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Enter Agent Registration password :
Agent is already stopped… Done.
Securing agent… Started.
Requesting an HTTPS Upload URL from the OMS… Done.
Requesting an Oracle Wallet and Agent Key from the OMS…
Done.
Check if HTTPS Upload URL is accessible from the agent… Done.
Configuring Agent for HTTPS in CENTRAL_AGENT mode… Done.
EMD_URL set in /u001/app/oracle/product/11.2.0/db_1/ORCL/sysman/config/emd.properties
Securing agent… Successful.
[oracle_orcl bin]$

[oracle_orcl bin]$ ./emctl start agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Starting agent ….. started.

[oracle_orcl bin]$ ./emctl upload agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
—————————————————————
EMD upload completed successfully

[oracle_orcl bin]$ ./emctl upload agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
—————————————————————
EMD upload completed successfully
[oracle_orcl bin]$


Then I checked Grid Control and made sure that the agent is working

Wednesday, 28 August 2013

ORA-19501 ORA-27070 OSD-04016 O/S-Error: (OS 1450) Insufficient system resources exist to complete the requested service

ORA-19501 ORA-27070 OSD-04016 O/S-Error: (OS 1450) Insufficient system resources exist to complete the requested service


SYMPTOMS

RMAN-03009: failure of crosscheck command on ORA_MAINT_DISK_1 channel at 08/27/2013 23:03:46
ORA-19501: read error on file "F:\ORADATA\TEST\TEST01.DBF", blockno 3905 (blocksize=8192)
ORA-27070: async read/write failed
OSD-04016: Error queuing an asynchronous I/O request.
O/S-Error: (OS 1450) Insufficient system resources exist to complete the requested service

find out the error message for OS Errors.

D:\>net helpmsg 1450

Insufficient system resources exist to complete the requested service.


CAUSE

There are many causes for the OS-error OS-1450

The main error is the Windows OSD 1450 which basically means that the system is running out of
memory.

OSD-04016: Error queuing an asynchronous I/O request.
O/S-Error: (OS 1450) Insufficient system resources exist to complete the requested service.

This is a Microsoft Windows O.S. issue. 

http://support.microsoft.com/support/kb/articles/Q236/9/64.ASP


SOLUTION

Set disk_asynch_io on FALSE.

for more details find the document(Doc ID 297498.1) from Metalink.

Thursday, 22 August 2013

ORA-12638: credential retrieval failed

ORA-12638: credential retrieval failed


The Oracle docs note this on the ora-12638 error:
ORA-12638: Credential retrieval failed

Cause: The authentication service failed to retrieve the credentials of a user.

Action: Enable tracing to determine the exact error.

I found following line in sqlnet.ora file from $ORACLE_HOME/network/admin

SQLNET.AUTHENTICATION_SERVICES= (NTS)
Then i modified the above line as below and it started working
SQLNET.AUTHENTICATION_SERVICES= (NONE)
Reason : 
Oracle client attempt to use your current Windows domain credentials to authenticate you with the Oracle server. This could fail for a couple of reasons:
- The Oracle server is not configured to support Windows authentication
- The credentials you use to login to your local machine are not sufficient to allow you to login to the server.
In my case, it was the later. This failed because I was logged on to my local machine using my normal domain credentials rather than my administrator account. 

Thursday, 8 August 2013

ORA-39123 + ORA-29341: The transportable set is not self-contained

ORA-39123: Data Pump transportable tablespace job aborted

ORA-29341: The transportable set is not self-contained

Error: 

Export: Release 10.2.0.4.0 - 64bit Production on Monday, 05 August, 2013 11:30:55

Copyright (c) 2003, 2007, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TRANSPORTABLE_01":  '/******** AS SYSDBA' directory=Dir_1 dumpfile=.dmp logfile=.log TRANSPORT_TABLESPACES=TBS_1 TRANSPORT_FULL_CHECK=Y
ORA-39123: Data Pump transportable tablespace job aborted
ORA-29341: The transportable set is not self-contained
Job "SYS"."SYS_EXPORT_TRANSPORTABLE_01" stopped due to fatal error at 11:30:58

Cause: Here, The transportable set is not self-contained for your tablespace.
some of objects(table, index, constraints ... ) which is owned by sys is pointing to other tablespace.. 

your output may be like this....

EXEC SYS.DBMS_TTS.TRANSPORT_SET_CHECK(ts_list => 'tbs_1', incl_constraints => TRUE);

PL/SQL procedure successfully completed.

SQL> select * from sys.transport_set_violations;

VIOLATIONS
--------------------------------------------------------------------------------
Index SYS.SYS_C00261262 in tablespace SYSTEM enforces primary constriants  of table   SYS.QUERY_PARSING_DATA in tablespace tbs_1
Sys owned object   in tablespace tbs_1 not allowed in pluggable set
Sys owned object   in tablespace tbs_1 not allowed in pluggable set
Sys owned object   in tablespace tbs_1 not allowed in pluggable set
Sys owned object   in tablespace tbs_1 not allowed in pluggable set
Table in tablespace tbs_3 points to lob segment owner.SUPPLIER in tablespace tbs_1
Table  in tablespace tbs_2 points to lob segment owner.SUBSTANCE in tablespace tbs_1
Table in tablespace tbs_3 points to lob segment owner.MSDX in tablespace tbs_1

8 rows selected.

Solutions:

if possible drop the objects after taking backups, and then try to take expdp backups.

(or)

first check your schema objects are pointing to the same tablespace or other tablespace also.


SQL> select OWNER, OBJECT_NAME, OBJECT_TYPE STATUS from dba_objects where OBJECT_NAME='objectnam';
OWNER                                  OBJECT_NAME                                        STATUS
------------------------------ -------------------------------------------------- -------------------
SYS                                          objectnam                                                            INDEX
SCHEMA1                              objectnam                                                            INDEX

SQL> select OWNER, OBJECT_NAME, OBJECT_TYPE STATUS from dba_objects where OBJECT_NAME='obj2';
OWNER                          OBJECT_NAME                                        STATUS
------------------------------ -------------------------------------------------- -------------------
SYS                                           obj2                                                     TABLE
SCHEMA1                               obj2                                                     TABLE

SQL> select OWNER, OBJECT_NAME, OBJECT_TYPE STATUS from dba_objects where OBJECT_NAME='QUERY_PARSING_DATA';

OWNER                          OBJECT_NAME                                        STATUS
------------------------------ -------------------------------------------------- -------------------
SYS                                         QUERY_PARSING_DATA                                 TABLE
SCHEMA1                             QUERY_PARSING_DATA                                 TABLE

select OWNER, OBJECT_NAME, OBJECT_TYPE STATUS from dba_objects where OBJECT_NAME like 'SYS_C00261262';

OWNER                          OBJECT_NAME                                        STATUS
------------------------------ -------------------------------------------------- -------------------
SYS                                   SYS_C00261262                                           INDEX

find the nos tablespace used by the schema1 user.

SQL> select TABLESPACE_NAME,sum(bytes/1024/1024/1024) from dba_segments where OWNER='SCHEMA1' group by TABLESPACE_NAME;

TABLESPACE_NAME                SUM(BYTES/1024/1024/1024)
------------------------------ -------------------------
tbs_2                                            3.9921875
tbs_1                                            1.6640625
tbs_3                                             .959472656
tbs_4                                            1.40625

now, change all the tablespaces as read only mode like this,

alter tablespace tbs_1 read only:


alter tablespace tbs_2 read only:
alter tablespace tbs_3 read only:
alter tablespace tbs_4 read only:

SQL> EXEC SYS.DBMS_TTS.TRANSPORT_SET_CHECK(ts_list => 'tbs_1,tbs_2,tbs_3,tbs_4', incl_constraints => TRUE);
PL/SQL procedure successfully completed.

SQL> select * from sys.transport_set_violations;

No row selected

now connect to Recovery Manager

rman target /

Recovery Manager Release 10.2.0.4.0 64-Bit

connected to target database : orcl2 (dbid =3287908659)

RMAN> convert tablespace 'tbs_1'
to platform="Linux IA (32-bit)"
db_file_name_convert='datafiile01.DBF', '/tmp/datafile01.DBF','datafiel02.DBF', '/tmp/datafile02.DBF';

Starting backup at 07-AUG-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00074 name=datafile01.DBF
converted datafile=/tmp/datafile01.DBF
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00193 name=datafile02.DBF
converted datafile=/tmp/datafile02.DBF
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:07
Finished backup at 07-AUG-12

RMAN> convert tablespace 'tbs_2'
to platform="Linux IA (32-bit)"
db_file_name_convert='datafile001.DBF', '/tmp/datafile001.DBF';

Starting backup at 07-AUG-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00072 name=datafiile001.DBF
converted datafile=/tmp/datafile001.DBF
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:55
Finished backup at 07-AUG-12

RMAN> convert tablespace 'tbs_3'
    ....  .....

RMAN> convert tablespace 'tbs_4'
    ..... .....

now try expdp;

your backup will be completed successfully.

expdp \'/ as sysdba\' directory=DIR_1 dumpfile=name.dmp logfile=name.log 
TRANSPORT_TABLESPACES=tbs_1,tbs_2,tbs_3, tbs_4 TRANSPORT_FULL_CHECK=TRUE

dont forget to change the tbs mode to read write;

alter tablespace tbs_1 read write;


alter tablespace tbs_2 read write;
alter tablespace tbs_3 read write;
alter tablespace tbs_4 read write;