Home » RDBMS Server » Backup & Recovery » Is there anyway that I can append dbid at the end of a controlfile trace (12.1.0.2 SE2 Oracle Linux 7.3)
Is there anyway that I can append dbid at the end of a controlfile trace [message #667911] Wed, 24 January 2018 02:02 Go to next message
juniordbanewbie
Messages: 223
Registered: April 2014
Senior Member
Dear all,

Is there anyway that I can append dbid at the end of a controlfile trace


ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '&2' || '_' || dbid;

if the original trace file is create_abc_controlfile
it should be become create_abc_controlfile_dbid

many thanks in advance!
Re: Is there anyway that I can append dbid at the end of a controlfile trace [message #667912 is a reply to message #667911] Wed, 24 January 2018 03:16 Go to previous messageGo to next message
Michel Cadot
Messages: 65970
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I assume you execute this in a SQL*Plus session, in this case you can do it in the following way (ignore the "def 2=", it is there just to show the result):
SQL> def 2="create_abc_controlfile"
SQL> col dbid new_value dbid
SQL> select trim(dbid) dbid from v$database;
DBID
----------------------------------------
288523517

1 row selected.

SQL> prompt backing up the control file into file '&2._&dbid'
backing up the control file into file 'create_abc_controlfile_288523517'
If you don't want to see the result of the query in your spool file (if any) then just put it between "set termout off"/"set termout on".


Re: Is there anyway that I can append dbid at the end of a controlfile trace [message #667914 is a reply to message #667911] Wed, 24 January 2018 03:17 Go to previous messageGo to next message
Michel Cadot
Messages: 65970
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And don't forget to feedback.

Re: Is there anyway that I can append dbid at the end of a controlfile trace [message #667939 is a reply to message #667911] Thu, 25 January 2018 03:00 Go to previous messageGo to next message
Michel Cadot
Messages: 65970
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

We are waiting for your feedback (just your last year topics):

http://www.orafaq.com/forum/mv/msg/204324/667912/#msg_667912
http://www.orafaq.com/forum/mv/msg/204184/667090/#msg_667090
http://www.orafaq.com/forum/mv/msg/204125/666776/#msg_666776
http://www.orafaq.com/forum/mv/msg/203944/666014/#msg_666014
http://www.orafaq.com/forum/mv/msg/203882/665746/#msg_665746
http://www.orafaq.com/forum/mv/msg/203866/665654/#msg_665654
http://www.orafaq.com/forum/mv/msg/203849/665552/#msg_665552
http://www.orafaq.com/forum/mv/msg/203788/665251/#msg_665251
http://www.orafaq.com/forum/mv/msg/203742/665067/#msg_665067
http://www.orafaq.com/forum/mv/msg/203686/664791/#msg_664791
http://www.orafaq.com/forum/mv/msg/203649/664712/#msg_664712
http://www.orafaq.com/forum/mv/msg/203411/663462/#msg_663462
http://www.orafaq.com/forum/mv/msg/202834/659636/#msg_659636
http://www.orafaq.com/forum/mv/msg/202793/659370/#msg_659370

Re: Is there anyway that I can append dbid at the end of a controlfile trace [message #667949 is a reply to message #667939] Thu, 25 January 2018 18:08 Go to previous message
juniordbanewbie
Messages: 223
Registered: April 2014
Senior Member
Dear Michel,

this is correct.

I'm now able to append to dbid to the backup controlfile trace.

thanks
Previous Topic: Restore 10.2.0.4 RAC Backup to 11.2.0.4 dbhome
Next Topic: Cannot drop undotbs2 when restoring 10.2.0.4 rac db to 11.2.0.4 single instance db
Goto Forum:
  


Current Time: Sat Nov 17 23:44:48 CST 2018