Sunday, November 28, 2010

Resolving tempdb log file is full in SQL2000

In SQL 2000, if you have the error,

"The log file for database 'tempdb' is full. Back up the transaction log for the database to free up some log space."

To resolve this you need to truncate the log file by using

dump log tempdb with truncate_only

the normal backup log command won't work in this case

Wednesday, September 29, 2010

Logical Standby with Apply Process Fails With ORA-308

Recently, we encounter the Logical Standby Apply Process Fails With ORA-308 while testing the logical standby. Due to the archive log in Logical is automatically delete after a while.

To solve it, we first stop the automatically delete archivelog
exec dbms_logstdby.apply_set('LOG_AUTO_DELETE', 'FALSE');


Then, We check the ASM diskspace for the archivelog that is needed by standby.
Then we copy the archive log to the local folder for transfering it to standby by issuing below . The FLASH_DIR and EXPORT_DUMP_DIR is oracle directory, FLASH_DIR is the ASM disk space like +FLASHGRP/TESTDB/archivelog/

dbms_file_Transfer.copy_file('FLASH_DIR','1_3470_694714878.dbf','EXPORT_DUMP_DIR','1_3470_694714878.dbf');


After copying the file to standby, then we need to register the archivelog using below method.

Register the log file in standby

SQL> alter database register logfile '/TESTDB/archive/1_3470_694714878.dbf';

alter database register logfile '/TESTDB/archive/1_3470_694714878.dbf'

*

ERROR at line 1:

ORA-01289: cannot add duplicate logfile



If failed , then we have to update the logmnr table manually,

Stopped the logical standby.


SQL> alter database stop logical standby apply;

SQL> select file_name from system.logmnr_log$ where sequence#=3470;

FILE_NAME

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

+FLASHGRP/testdb/archivelog/2010_09_22/thread_1_seq_3470.3572.730402825

SQL> UPDATE SYSTEM.LOGMNR_LOG$ SET

FILE_NAME= 2 '/TESTDB/archive/1_3470_694714878.dbf' where sequence#=3470;

1 row updated.

SQL> commit;

Commit complete.


SQL> alter database start logical standby apply;

Database altered.




References:-
Logical Standby Apply Process Fails With ORA-308 [ID 274676.1]

Thursday, September 16, 2010

Oracle Error : ORA-21779 duration not active

Recently we encounter the error ORA-21779 duration not active, in the alert log. This error keeps repeating.

ORA-21779: duration not active
Cause: User is trying to use a duration that has been terminated.
Action: User should avoid performing such operation.


In the trace file , you will notice the below.

Errors in file ora_smon_610346.trc:
ORA-21779: duration not active
Fri Sep 17 14:25:54 2010


There are few problem that cause this, in below url show other issues. In our case this error keep repeating after few seconds. To solve this we do this.

After flushing the share pool , the error is no longer appeared

alter system flush shared_pool;

References:-

http://oraclequirks.blogspot.com/2006/07/ora-21779-brain-teaser.html

Friday, August 27, 2010

Oracle Listener on windows failed with faulting module oran110.dll

Recently we encounter the failing of listener, in our oracle XE , the error is due to a bug in the oracle. which is fixed in •9.2.0.8 Patch 1 ,•10.2.0.2 Patch 6 onwards , •10.2.0.3 Patch 2 onwards .

To workaround this issue,

in the Services, set the oracle listener to auto restart after few minutes if it encounter the failing of this services.

Metalink note:-
Windows TNS Listener Crash with Faulting Module ORANL10.DLL / ORANL9.DLL [ID 388017.1]



Event Viewer,
Faulting application TNSLSNR.EXE, version 0.0.0.0, faulting module oranl10.dll, version 10.2.0.1, fault address 0x000227ed.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Monday, August 16, 2010

Oracle IAS 10.1.3 how to change oc4jadmin password

If you encounter the below error, please follow the link below to solve the problem.
javascript:void(0)
Unable to make a connection to OC4J instance instance_name on Application
Server application_server_name. A common cause for this failure is an
authentication error. The administrator password for each OC4J instance in the
Cluster must be the same as the administrator password for the OC4J instance on
which Application Server Control is running.



http://oraclefunda.wordpress.com/2008/05/16/how-to-change-oc4jadmin-password-for-application-server-10gr3/

Tuesday, July 13, 2010

Unwrapping Oracle PLSQL

To unwrap the oracle 10g and 11g source code , you can see the blog below with the source code to do that.

http://blog.teusink.net/2010/04/unwrapping-oracle-plsql-with-unwrappy.html
=== Oracle 10g/11g PL/SQL unwrapper - by Niels Teusink - blog.teusink.net ===

If you dont' have the perl then can use this website that provide the unwrap

http://hz.codecheck.ch/UnwrapIt/Unwrapped.jsp



Requirement: -
Python 2.6 from http://www.python.org/