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
RMAN Duplicate Command and Skip Tablespaces

RMAN Duplicate Command and Skip Tablespaces

2005-07-07       - By Sam Bootsma


Oracle 9.2.0.6, AIX 5.



I ran the following RMAN script to create a new database for ourselves:



$ cat dup_FAST.rcv

run {

set until time "7-JUL-2005 06:00:00";

allocate auxiliary channel ch1 type disk;

allocate auxiliary channel ch2 type disk;

duplicate target database to 'FAST' skip tablespace
development,development_big,help,indexes,indexes_big,evisions,mercury,ha
rvestblob,harvestindex,harvestmeta,tools,users,xdb;

release channel ch1;

release channel ch2;

}



Most of the script ran fine.  Database files were restored, appropriate
data files were skipped, archived logs were restored and applied to data
files, the database was stopped, then opened with resetlogs.  This was
all successful.  Then RMAN issued commands to drop skipped tablespaces,
including contents.  The drop of the first tablespace, XDB, was
successful.  However, the drop of the second tablespaces, USERS, failed
with an error as follows:



executing script: Memory Script



sql statement: drop tablespace  XDB including contents



sql statement: drop tablespace  USERS including contents

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of Duplicate Db command at 07/07/2005 08:37:16

RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of sql command on clone_default channel at
07/07/2005 08:37:16

RMAN-11003: failure during parse/execution of SQL statement: drop
tablespace  USERS including contents

ORA-00604 (See ORA-00604.ora-code.com): error occurred at recursive SQL level 1

ORA-02429 (See ORA-02429.ora-code.com): cannot drop index used for enforcement of unique/primary key



RMAN> **end-of-file**



Later, I manually ran all the RMAN commands to drop tablespaces (eg. sql
clone "drop tablespace  DEVELOPMENT including contents";).  This worked,
but I discovered that sequence of dropping tablespaces is important.
When I dropped tablespaces in the sequence RMAN wrote to the screen
(reverse alphabetical) I sometimes encountered an error similar to the
one above.  But if I dropped index tablespaces first, then I could
successfully drop the other tablespaces.  Is this normal RMAN behaviour?
Is there a workaround to this RMAN limitation?  In my situation, RMAN
would have encountered this problem even if USERS was the last
tablespace to be dropped - because a table in SYSTEM had an index in
USERS (bad, I know).  But would RMAN have crashed anyway because of the
sequence in which it drops tablespaces?  Is there a way around this?
Does Oracle consider this to be a RMAN bug?  I have manually issued RMAN
commands to drop tablespaces, including contents, but have I missed any
important RMAN steps?



Thanks so much for your help ...







Sam Bootsma

George Brown College

sbootsma@(protected) <mailto:sbootsma@(protected)>

416-415-5000 x4933




<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0cm;
  margin-bottom:.0001pt;
  font-size:12.0pt;
  font-family:"Times New Roman";}
a:link, span.MsoHyperlink
  {color:blue;
  text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
  {color:purple;
  text-decoration:underline;}
span.EmailStyle17
  {font-family:Arial;
  color:windowtext;}
@(protected) Section1
  {size:612.0pt 792.0pt;
  margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
  {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Oracle 9.2.0.6, AIX 5.</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I ran the following RMAN script to create a new database for
ourselves:</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>$ cat dup_FAST.rcv</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>run {</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>set until time &quot;</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>7-JUL-2005<
/span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
06:00:00&quot;;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>allocate auxiliary channel ch1 type disk;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>allocate auxiliary channel ch2 type disk;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>duplicate target database to 'FAST' skip tablespace
development,development_big,help,indexes,indexes_big,evisions,mercury
,harvestblob,harvestindex,harvestmeta,tools,users,xdb;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>release channel ch1;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>release channel ch2;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>}</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Most of the script ran fine.&nbsp; Database files were
restored, appropriate data files were skipped, archived logs were restored and
applied to data files, the database was stopped, then opened with resetlogs.
&nbsp;
This was all successful.&nbsp; Then RMAN issued commands to drop skipped
tablespaces,
including contents.&nbsp; The drop of the first tablespace, XDB, was
successful.&nbsp; However, the drop of the second tablespaces, USERS, failed
with an error as follows:</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>executing script: Memory Script</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>sql statement: drop tablespace&nbsp; XDB including contents<
/span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>sql statement: drop tablespace&nbsp; USERS including
contents</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN-00571: ================================================
===========</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
===============</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN-00571:
===========================================================</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN-03002: failure of Duplicate Db command at 07/07/2005
08:37:16</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN-03015: error occurred in stored script Memory Script<
/span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN-03009: failure of sql command on clone_default channel
at 07/07/2005 08:37:16</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN-11003: failure during parse/execution of SQL statement:
drop tablespace&nbsp; USERS including contents</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>ORA-00604 (See ORA-00604.ora-code.com): error occurred at recursive SQL level 1</span><
/font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>ORA-02429 (See ORA-02429.ora-code.com): cannot drop index used for enforcement of
unique/primary key</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>RMAN&gt; **end-of-file**</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Later, I manually ran all the RMAN commands to drop
tablespaces
(eg. sql clone &quot;drop tablespace&nbsp; DEVELOPMENT including
contents&quot;;).&nbsp; This worked, but I discovered that sequence of dropping
tablespaces is important.&nbsp; When I dropped tablespaces in the sequence RMAN
wrote to the screen (reverse alphabetical) I sometimes encountered an error
similar to the one above.&nbsp; But if I dropped index tablespaces first, then
I could successfully drop the other tablespaces. &nbsp;Is this normal RMAN
behaviour?&nbsp;
Is there a workaround to this RMAN limitation?&nbsp; In my situation, RMAN
would have encountered this problem even if USERS was the last tablespace to be
dropped &#8211; because a table in SYSTEM had an index in USERS (bad, I know).
&nbsp;But
would RMAN have crashed anyway because of the sequence in which it drops
tablespaces?
&nbsp;Is there a way around this?&nbsp; Does Oracle consider this to be a RMAN
bug?&nbsp; I have manually issued RMAN commands to drop tablespaces, including
contents, but have I missed any important RMAN steps?</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks so much for your help &#8230;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sam Bootsma</span></font></p>

<p class=MsoNormal><st1:place><st1:PlaceName><font size=2 color=navy
 face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>George
</span></font></st1:PlaceName><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font><font size=2 color=navy face=Arial><span
 style='font-size:10.0pt;font-family:Arial;color:navy'><st1:PlaceName>Brown<
/span></font></st1:PlaceName><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font><font size=2 color=navy face=Arial><span
 style='font-size:10.0pt;font-family:Arial;color:navy'><st1:PlaceType>College<
/span></font></st1:PlaceType></st1:place></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><a href="mailto:sbootsma@(protected)"><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>sbootsma@(protected)</span></font>
</a></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>416-415-5000 x4933</span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>