Currently Being Moderated

Hi All,

 

This is neto from Brazil

 

How are you?

 

My friend Leighton Nelson (https://twitter.com/@leight0nn) had asked me (https://twitter.com/@netofrombrazil) to help him with a very interesting challenge.

 

AUTO for Oracle RAC database recovery does not work well, and we will need to execute some queries to find out the exactly change for the recovery.

 

select name, thread#, sequence#, first_change#, next_change# from v$archived_log where thread#=1 and 7728330471997 between first_change# and next_change#;

 

With the exactly change number, we will pass it as the STDIN for the sqlplus process (dynamically).

 

Procedure:

 

Terminal 1: As Oracle user run:

 

mkfifo sql

cat > sql &

sqlplus / as sysdba < sql > output

 

NOTE: sql is the pipe for STDIN and output is for STDOUT

 

Terminal 2: As Oracle user run:

 

tail -f output

 

NOTE: To check all output from sqlplus process.

 

Terminal 3: As Oracle user run:

 

echo "select * from v\$instance;" > sql

 

NOTE: Sending "select * from v$instance" to pipe sql - where it will be redirected to STDIN for sqlplus process


Now, it will be easier to execute queries to find out the change number (check STDOUT) and create dynamic queries to send to sqlplus process (STDIN).

 

echo "recover database using backup controlfile until cancel;" > sql

echo "+DG_ARCH/prod/archivelog/2014_01_06/thread_1_seq_27236.1832.836139501" > sql


Screen Shot 2014-01-10 at 5.04.39 PM.png

 

Love you my friend,

 

All the best

 

neto

NetApp - I love this company!

Comments

Filter Blog

By date:
By tag: