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;