Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Is DATAFILE order important in CREATE CONTROLFILE?

RE: Is DATAFILE order important in CREATE CONTROLFILE?

From: Molina, Gerardo <Gerardo.Molina_at_schwab.com>
Date: Thu, 11 Apr 2002 15:46:32 -0800
Message-ID: <F001.00442B88.20020411154632@fatcity.com>


I wouldn't rely on a list generated from doing an ls on a directory because there may very well be files in that directory that are not part of the database (like files that used to be part of the db but not any more).

I have a Perl script that queries dba_data_files on both source and target db's to get file info.

I have another Perl script that generates the mappping information for me. This script also reports on differences (very helpful).

I take the trace file from running "alter database backup controlfile to trace;" on the source db and run it through another Perl script that generates the "ready-to-use" sql script that gets the refreshed target db to the "ready-to-be-recovered" state.

So, yes, order doesn't matter.

HTH
Gerardo

-----Original Message-----

Sent: Thursday, April 11, 2002 3:28 PM
To: Multiple recipients of list ORACLE-L

No, the order does not matter. We create control files frequently when we clone from production to test and development. We use this piece of code to generate the listing in Korn Shell:

ls /*/oradata/SID/*.dbf | while read FN; do echo "'"$FN"',"; done

Of course you will have to replace the final comma with a semi-colon.

Good luck.

--Michael

-----Original Message-----

Sent: Thursday, April 11, 2002 4:54 PM
To: Multiple recipients of list ORACLE-L

Rich,

I believe the datafile order in a CREATE CONTROLFILE statement is critical, from lowest FILE# to highest. I'd be reluctant to prove myself wrong by testing our database copy process (I used sed to map the datafiles.), but we are moving 500-600Gb databases around and rerunning it would require another 25hr window ;)

-----Original Message-----

Sent: Thursday, April 11, 2002 3:13 PM
To: Multiple recipients of list ORACLE-L

I'm writing a Perl script to automate the procedure to create a copy of an 8.1.7 production DB to a development server. Both production and dev are HP/UX 11.0.

In doing this, I've created a file that cross-references where the production datafiles are and where they are to be placed in dev. This works fine, but I also wanted to dynamically create the CREATE CONTROLFILE statement for the "new" dev DB.

I've noticed that the DATAFILE clause does not have the SYSTEM tablespace's datafile first, nor are any of the other datafiles in the same order that they are in production (e.g. from the output of an ALTER SYSTEM BACKUP CONTROLFILE TO TRACE). Does this matter? Does the order need to be preserved?

I suppose I'll end up dynamically creating the cross-reference file, which would preserve the order, but now I'm curious.

TIA!

Rich Jesse                           System/Database Administrator
Rich.Jesse_at_qtiworld.com              Quad/Tech International, Sussex, WI USA

--
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Hand, Michael T
  INET: HANDM_at_polaroid.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Jenkins, Michael - EDS
  INET: Michael.Jenkins_at_Nextel.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Molina, Gerardo
  INET: Gerardo.Molina_at_schwab.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Apr 11 2002 - 18:46:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US