Friday, December 10, 2010

ORA-00600: internal error code, arguments: [kzdlk_zt2 err]

I got this while accessing table using db link. Please refer below for more information.

Reason :

I created db link using ‘IDENTIFIED BY VALUES’ instead of PASSWORD (as show in example below ). As per note 456320.1, on Oracle 10.2, dblink passwords are now stored in a special encrypted form to improve database link security. The "IDENTIFIED BY VALUES" clause is only intended for use by Oracle internal utilities.

CREATE DATABASE LINK ABC CONNECT TO EMP IDENTIFIED BY VALUES 'CF979929292' USING 'XYZ';

SQL> select name from v$database@ABC;
select name from v$database@ABC;
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [kzdlk_zt2 err],
[18446744073709551603], [], [], [], [], [], []

What I did :

I created the db links with special encrypted password and it worked for me as one db links was already there on EMP user.

SQL> select PASSWORDX from sys.link$ where USERID='EMP'; -- This will only be available, if there is some existing db link

PASSWORDX
--------------------------------------------------------------------------------
05B661WWWWR121DSDSECCCCCQW1210133B6FFCC

CREATE DATABASE LINK ABC CONNECT TO EMP IDENTIFIED BY VALUES '05B661WWWWR121DSDSECCCCCQW1210133B6FFCC' USING 'XYZ';

select count(*) from GTC_CLAIM_TYPE_DIM@GEND_ECP_USER;
COUNT(*)
----------
242

Compile INVALIDS of any SCHEMA

Earlier to this, I used the following commands to compile INVALID objects of any database

1. @?/rdbms/admin/utlrp
2. exec utl_recomp.recomp_parallel(threads=>5)
3. alter package/ procedure compile ... comand

I found one more utility that will help us to compile the invalids of any particular schema

exec dbms_utility.compile_schema('', FAlSE);

Ex;

exec dbms_utility.compile_schema('SCOTT', FAlSE);

We used “FALSE” as we have to compile invalids only not the whole schema.

Thursday, March 4, 2010

Plan stabilization using stored outlines

Hi ,

I got a chance to use the outlines . For more details please refer to the link mentioned below ..

http://www.scribd.com/doc/27666013/Plan-Stabalization-Using-Outline

Wednesday, January 27, 2010

How to rename a file with junk characters

In our case file name /u42/oradata/ilproddata/a_txn_ind364.dbf; is having the junk character.


Step 1: Find the name of the junk character file.


a) On database


Select name from v$datafile where name like '%/u42/oradata/ilproddata/a_txn_ind364%';

/u42/oradata/ilproddata/a_txn_ind364.dbf;


b) On the mount point


cd /u42/oradata/ilproddata

ls -ltr a_txn_ind364*

a_txn_ind364.dbf;


Step 2:


Now shutdown the database


Step 3:


Now copy the file to the new name. It's better to use copy, always avoid move command in such case.


cd /u42/oradata/ilproddata

cp a_txn_ind364.dbf* a_txn_ind364.dbf


Step 4: Open the database in mount mode and run the rename command

As the file have junk characters. So find the exact name of the file with junk characters.


a) Take the trace of control file using “alter database backup controlfile to trace;”


b) Now open the file trace file in VI mode and search the name "a_txn_ind364.dbf;"


c) Remove all the lines except this and make the changes as mentioned below.


[ilerpdb01: oraprod] /u11/app/ilproddb/9.2.0/admin/ILPROD_ilerpdb01/udump> more ilprod_ora_987810.trc


alter database rename file '/u42/oradata/ilproddata/a_txn_ind364.dbf;^[[1~^[[1' to '/u42/oradata/ilproddata/a_txn_ind364.dbf' ;


d) Now run the scripts "ilprod_ora_987810.trc" on the sql prompt.


e) Now open the database.



Saturday, January 23, 2010

Hi ,

Once we got a tedious job to disable the responsibilities for 500 users. So we decided to use the API. This can be done using the API mentioned below.




Begin
fnd_user_pkg.delresp(
'&User_Name',
'&Responsibility_application_short_name',
'&Responsibility_Key',
'&Security_Group');
commit;
End;

Ex :

exec fnd_user_pkg.DELRESP('A00073','MFG','LGEIL_NOIDA_MFG_RK','STANDARD')

But above mentioned API has a bug also (Bug 4600645 ) i.e. it sets both start_date and end_date to sysdate . This might cause problem during auditing.

So , in this case API mentioned below can also be used . In this you are allowed to give start_date also .


exec fnd_user_resp_groups_api.update_assignment(user_id => 7391,responsibility_id => 20707,responsibility_application_id => 201,start_date => '02-JAN-2008',end_date => sysdate,description => null);


Note : fnd_user_resp_groups_direct can be used to find the end_date . API fnd_user_pkg can also be to disable the users etc

Sunday, January 17, 2010

Abnormal listener behaviour

Problem :


a ) Error message while stopping the listener

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=202.154.175.13)(PORT=1521)))

TNS-12547: TNS:lost contact

TNS-12560: TNS:protocol adapter error

TNS-00517: Lost contact

IBM/AIX RISC System/6000 Error: 73: Connection reset by peer


b ) Listener is running


c ) From the outside , when you're doing "tnsping " .you're getting .


TNS:lost contact OR TNS : Connection closed


d ) sqlnet.ora is also OK . No extra parameter except " NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME) "


Solution :


I searched a lot over net . But didn't found any solution . So I did the following ..


Step 1 : kill the listener

[csnetroiap:oraspx] /orahome/oracle/network/admin # ps -ef |grep lsn

oraspx 692234 762032 0 09:51:43 pts/3 0:00 grep lsn

oraspx 508176 1 0 Jan 07 - 218:56 /orahome/oracle/bin/tnslsnr LISTENER -inherit

[csnetroiap:oraspx] /orahome/oracle/network/admin # kill -9 508176


Step 2 : Restarted the listener

[csnetroiap:oraspx] /orahome/oracle/network/admin # lsnrctl start LISTENER

LSNRCTL for IBM/AIX RISC System/6000: Version 9.2.0.8.0 - Production on 16-JAN-2010 09:52:01

Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.

Starting /orahome/oracle/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 9.2.0.8.0 - Production

System parameter file is /orahome/oracle/network/admin/listener.ora

Log messages written to /orahome/oracle/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=202.154.175.13)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=202.154.175.13)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for IBM/AIX RISC System/6000: Version 9.2.0.8.0 - Production

Start Date 16-JAN-2010 09:52:01

Uptime 0 days 0 hr. 1 min. 15 sec

Trace Level off

Security OFF

SNMP OFF

Listener Parameter File /orahome/oracle/network/admin/listener.ora

Listener Log File /orahome/oracle/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=202.154.175.13)(PORT=1521)))

Services Summary...

Service "lgeil" has 1 instance(s).

Instance "lgeil", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully


And it worked for me .