.ora-code.com

Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
physical standby database managed/non-managed

physical standby database managed/non-managed

2006-01-26       - By Chris Marquez
Reply:     <<     11  

Sandeep,

Like several have said, there is a way to tunnel DG arch log shipment over
ssh.
I was on site where we did it (we did it for compression, not security).
In the end it caused is problems so we dumped it for straight
SQL*Net...Sorry don't remember the details.
I think ssh encryption was making it to slow and the internal (asynchronous)
arch buffer was filling...anyway...

>> Is there any way that standby recover to the last available archived
>> log and comes out cleanly? How can I query the last archived log file
>> applied on the standby database?

I do exactly what you talking about...a poor man's Standby.
I use cron, shell, sql, and RMAN (and a scp or better shared storage area)

During a backup (shell script), I do this to gen recovery variables (for
RMAN) in a new shell script;

[THIS IS SNIPS OF MY SCRIPT]
...
# - Backup archive logs and delete logs after backup is complete,
...
       BACKUP ARCHIVELOG ALL;
..

SET     sqlprompt #
SET     ECHO OFF
SET     FEEDBACK OFF
SET     HEADING OFF
SET     PAGESIZE 0
SET     line 200
SET     RECSEP OFF
SET     SERVEROUTPUT OFF
SET     TRIMSPOOL ON
SET     VERIFY OFF
SET     TERMOUT OFF
spool rman_restore_script_SQL_OUT.sql
select '#!/bin/sh' from dual;
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;
alter system archive log current;
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;
alter system archive log current;
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;
select 'export logseq='||a.SEQUENCE#||'; export thread='||a.THREAD#||';'
from sys.v_$archived_log a, sys.v_$instance i where a.THREAD# =
i.THREAD#and COMPLETION_TIME > SYSDATE - 1/(60*24) order by
COMPLETION_TIME desc;
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;

...
# - Backup archive logs and delete logs after backup is complete,
...
       sql "alter system archive log current";
       BACKUP ARCHIVELOG ALL;
...


I purposely don't attempt to restore to the very last log incase is was not
archived and backed up.
But you see I manually switch logs to try and get everything I need.
This works for me 100% of the time.


I use this SQL out in a new shell (RMAN Recvoery) script to rolls logs;

...
rman nocatalog msglog $log_dir/${log_file}_RMAN.log <<EOF   >> $log_file
2>&1
#connect target $userid/$password;
connect target /;

shutdown abort;
startup nomount;
run {allocate channel c1 type disk; replicate controlfile from
'${bkp_dir}/${date_time}_${DATABASE_NAME}_controlfile.ctl.bkp'; release
channel c1; }
alter database mount;

run {
set until logseq ${logseq} thread ${thread};
allocate channel c2 type disk;
recover database;
sql 'alter database open read only';
release channel c2;
}

exit
EOF


Simply my standby is just restoring from and RMAN backup all the time...well
once per hour right now.
And I use SQL out put, to shell script, to RMAN syntax to make it happen.

hth

Chris Marquez
Oracle DBA

Sandeep,<br>
<br>
Like several have said, there is a way to tunnel DG arch log shipment over ssh.
<br>
I was on site where we did it (we did it for compression, not security).<br>
In the end it caused is problems so we dumped it for straight SQL*Net...Sorry
don't remember the details.<br>
I think ssh encryption was making it to slow and the internal (asynchronous)
arch buffer was filling...anyway...<br>
<br>
&gt;&gt; Is there any way that standby recover to the last available archived
<br>
&gt;&gt; log and comes out cleanly? How can I query the last archived log file
<br>
&gt;&gt; applied on the standby database?<br>
<br>
I do exactly what you talking about...a poor man's Standby.<br>
I use cron, shell, sql, and RMAN (and a scp or better shared storage area)<br>
<br>
During a backup (shell script), I do this to gen recovery variables (for RMAN)
in a new shell script;<br>
<br>
[THIS IS SNIPS OF MY SCRIPT]<br>
...<br>
# - Backup archive logs and delete logs after backup is complete,<br>
...<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BACKUP ARCHIVELOG ALL;<br>
..<br>
<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; sqlprompt #<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; ECHO OFF<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; FEEDBACK OFF<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; HEADING OFF<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; PAGESIZE 0<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; line 200<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; RECSEP OFF<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; SERVEROUTPUT OFF<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; TRIMSPOOL ON<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; VERIFY OFF<br>
SET&nbsp;&nbsp;&nbsp;&nbsp; TERMOUT OFF<br>
spool rman_restore_script_SQL_OUT.sql<br>
select '#!/bin/sh' from dual;<br>
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;<br>
alter system archive log current;<br>
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;<br>
alter system archive log current;<br>
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;<br>
select 'export logseq='||a.SEQUENCE#||'; export
thread='||a.THREAD#||';' from sys.v_$archived_log a, sys.v_$instance i
where a.THREAD# = i.THREAD# and COMPLETION_TIME &gt; SYSDATE -
1/(60*24) order by COMPLETION_TIME desc;<br>
select '# '||to_char(SYSDATE,'DD-MM-YYYY_HH24:MI') from dual;<br>
<br>
...<br>
# - Backup archive logs and delete logs after backup is complete,<br>
...<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sql &quot;alter system archive log
current&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BACKUP ARCHIVELOG ALL;<br>
...<br>
<br>
<br>
I purposely don't attempt to restore to the very last log incase is was not
archived and backed up.<br>
But you see I manually switch logs to try and get everything I need.<br>
This works for me 100% of the time.<br>
<br>
<br>
I use this SQL out in a new shell (RMAN Recvoery) script to rolls logs;<br>
<br>
...<br>
rman nocatalog msglog $log_dir/${log_file}_RMAN.log &lt;&lt;EOF&nbsp;&nbsp; &gt
;&gt; $log_file 2&gt;&amp;1<br>
#connect target $userid/$password;<br>
connect target /;<br>
<br>
shutdown abort;<br>
startup nomount;<br>
run {allocate channel c1 type disk; replicate controlfile from
'${bkp_dir}/${date_time}_${DATABASE_NAME}_controlfile.ctl.bkp'; release
channel c1; }<br>
alter database mount;<br>
<br>
run {<br>
set until logseq ${logseq} thread ${thread};<br>
allocate channel c2 type disk;<br>
recover database;<br>
sql 'alter database open read only';<br>
release channel c2;<br>
}<br>
<br>
exit<br>
EOF<br>
<br>
<br>
Simply my standby is just restoring from and RMAN backup all the time...well
once per hour right now.<br>
And I use SQL out put, to shell script, to RMAN syntax to make it happen.<br>
<br>
hth<br>
<br>
Chris Marquez<br>
Oracle DBA<br>