Wednesday, July 27, 2011

what is locking the oracle account


steps:-

1.       Login to sqlplus as sysdba
2.       enable trace, using
                   alter system set events ‘1017 trace name errorstack level 10’;
3.       Show parameter dump
4.       Goto the udump location
5.       grep ORA – 01017 *
6.       get the timestamp and related information  from trace generated
7.       When trace is no more needed , set it off using:
              alter system set events ‘1017 trace name errorstack off’

8.       Goto the listener.log file location
9.       Get the connectivity information for the selected time from listener log file.

Hope this help. Regards Rupam

Thursday, July 21, 2011

Rman: Ora-01008 When Connecting To Target in 11.2.0.2




Metalink note : [ID 1280447.1]

symptons

DBGSQL:     TARGET> select  nvl(max(al.recid), '0'),nvl(max(al.recid), 0)   into  :txtparmvalue, :parmvalue   from  v$archived_log al  where  al.status in ('X', 'A')    and  al.is_recovery_dest_file = 'YES'    and  al.creator = 'RMAN'
DBGSQL:        sqlcode = 1008


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 04/26/2011 19:00:15
RMAN-03014: implicit resync of recovery catalog failed
ORA-01008: not all variables bound

Cause
It's a bug with a patch


Solution
It's a bug with a patch. Workaround is to :

SQL> alter system flush shared_pool;

Hope this helps! Rupam

Tuesday, July 19, 2011

How to remove control characters from text file

tr -d '\015\032' < dosformatfile.txt > unixformatfile.txt
The above command deletes all ^M and ^Z

Using Perl:
perl -i -ep 's/\015//g' filename
perl -pi.bak -0777 -e 's#\r##gi' filename

using sed:
sed -e "s/^M/" filename > newfilename
press ctrl them V & M

Using vi:
vi filename
:s/^M//g
press control then V & M


with:
:%s/^M/\r/g
works perfectly !!!

Heres another little script
#!/bin/sh
FILE="$1"
# Use sed with the -i command line for inline interpreting.
sed -i '' "s/\r//g" $FILE


# the end

Hope this helps. Rupam