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: renaming all database files will this work

Re: renaming all database files will this work

From: Rachel Carmichael <carmichr_at_hotmail.com>
Date: Mon, 15 May 2000 13:38:43 GMT
Message-Id: <10498.105643@fatcity.com>


For safety's sake, after the shutdown immediate, I would probably do a startup restrict then a shutdown normal. And I would backup the database as well.

finally, after the rename, I would open the database :)

Rachel

>From: "Jack van Zanen" <nlzanen1_at_ey.nl>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: renaming all database files will this work
>Date: Mon, 15 May 2000 04:24:09 -0800
>
>
>
>HI All,
>
>
>I have to move a small production database to a new location on the same
>machine.
>
>This must be done outside office hours so I prepared the following script.
>
>Does anybody see where it might go wrong?
>
>I like to have as little problems during the move so Ihave to spend as
>little
>time here as possible.
>
>
>***************************************SCRIPT*****************************
>
># shutdown databases SPIRIT
>#
>ORACLE_SID=SPIRIT
>export ORACLE_SID
>svrmgrl <<EOF
>connect internal
>shutdown immediate
>exit
>EOF
>clear
># Copy datafiles SPIRIT to new Location
>#
>cp /data/oracle8/disk20/SPIRIT/prod/systemSPIRIT01.dbf
>/data/SPIRIT/Production/systemSPIRIT01.dbf
>cp /data/oracle8/disk16/SPIRIT/prod/AXIOS_0.dbf
>/data/SPIRIT/Production/AXIOS_0.dbf
>cp /data/oracle8/disk10/SPIRIT/prod/AXIOS_1.dbf
>/data/SPIRIT/Production/AXIOS_1.dbf
>cp /data/oracle8/disk11/SPIRIT/prod/AXIOS_2.dbf
>/data/SPIRIT/Production/AXIOS_2.dbf
>cp /data/oracle8/disk12/SPIRIT/prod/AXIOS_3.dbf
>/data/SPIRIT/Production/AXIOS_3.dbf
>cp /data/oracle8/disk10/SPIRIT/prod/AXIOS_4.dbf
>/data/SPIRIT/Production/AXIOS_4.dbf
>cp /data/oracle8/disk11/SPIRIT/prod/AXIOS_5.dbf
>/data/SPIRIT/Production/AXIOS_5.dbf
>cp /data/oracle8/disk12/SPIRIT/prod/AXIOS_6.dbf
>/data/SPIRIT/Production/AXIOS_6.dbf
>cp /data/oracle8/disk19/SPIRIT/prod/rbsSPIRIT01.dbf
>/data/SPIRIT/Production/rbsSPIRIT01.dbf
>cp /data/oracle8/disk22/SPIRIT/prod/tempSPIRIT01.dbf
>/data/SPIRIT/Production/tempSPIRIT01.dbf
>cp /data/oracle8/disk21/SPIRIT/prod/toolsSPIRIT01.dbf
>/data/SPIRIT/Production/toolsSPIRIT01.dbf
>cp /data/oracle8/disk25/SPIRIT/prod/userSPIRIT01.dbf
>/data/SPIRIT/Production/userSPIRIT01.dbf
>ORACLE_SID=SPIRIT
>export ORACLE_SID
># Startup Server manager
>#
># Statement which renames datafiles
>#
>svrmgrl <<EOF
>connect internal
>Startup mount ;
>alter database rename file
>'/data/oracle8/disk20/SPIRIT/prod/systemSPIRIT01.dbf' to
>'/data/SPIRIT/Production/systemSPIRIT01.dbf';
>alter database rename file
>'/data/oracle8/disk16/SPIRIT/prod/AXIOS_0.dbf' to
>'/data/SPIRIT/Production/AXIOS_0.dbf';
>alter database rename file
>'/data/oracle8/disk10/SPIRIT/prod/AXIOS_1.dbf' to
>'/data/SPIRIT/Production/AXIOS_1.dbf';
>alter database rename file
>'/data/oracle8/disk11/SPIRIT/prod/AXIOS_2.dbf' to
>'/data/SPIRIT/Production/AXIOS_2.dbf';
>alter database rename file
>'/data/oracle8/disk12/SPIRIT/prod/AXIOS_3.dbf' to
>'/data/SPIRIT/Production/AXIOS_3.dbf';
>alter database rename file
>'/data/oracle8/disk10/SPIRIT/prod/AXIOS_4.dbf' to
>'/data/SPIRIT/Production/AXIOS_4.dbf';
>alter database rename file
>'/data/oracle8/disk11/SPIRIT/prod/AXIOS_5.dbf' to
>'/data/SPIRIT/Production/AXIOS_5.dbf';
>alter database rename file
>'/data/oracle8/disk12/SPIRIT/prod/AXIOS_6.dbf' to
>'/data/SPIRIT/Production/AXIOS_6.dbf';
>alter database rename file
>'/data/oracle8/disk19/SPIRIT/prod/rbsSPIRIT01.dbf' to
>'/data/SPIRIT/Production/rbsSPIRIT01.dbf';
>alter database rename file
>'/data/oracle8/disk22/SPIRIT/prod/tempSPIRIT01.dbf' to
>'/data/SPIRIT/Production/tempSPIRIT01.dbf';
>alter database rename file
>'/data/oracle8/disk21/SPIRIT/prod/toolsSPIRIT01.dbf' to
>'/data/SPIRIT/Production/toolsSPIRIT01.dbf';
>alter database rename file
>'/data/oracle8/disk25/SPIRIT/prod/userSPIRIT01.dbf' to
>'/data/SPIRIT/Production/userSPIRIT01.dbf';
>alter database SPIRIT open resetlogs
>;
>exit
>EOF
>
>****************************************************************************************
>
>
>TIA
>
>
>Jack
>
>
>===================================================================
>De informatie verzonden met dit E-mail bericht is uitsluitend bestemd voor
>de geadresseerde. Gebruik van deze informatie door anderen dan de
>geadresseerde is verboden. Openbaarmaking, vermenigvuldiging, verspreiding
>en/of verstrekking van deze informatie aan derden is niet toegestaan.
>Ernst & Young staat niet in voor de juiste en volledige overbrenging van de
>inhoud van een verzonden E-mail, noch voor tijdige ontvangst daarvan.
>===================================================================
>The information contained in this communication is confidential and may be
>legally privileged. It is intended solely for the use of the individual or
>entity to whom it is addressed and others authorised to receive it. If you
>are not the intended recipient you are hereby notified that any disclosure,
>copying, distribution or taking any action in reliance on the contents of
>this information is strictly prohibited and may be unlawful. Ernst &
>Young is neither liable for the proper and complete transmission of the
>information contained in this communication nor for any delay in its
>receipt.
>===================================================================
>
>
>
>--
>Author: Jack van Zanen
> INET: nlzanen1_at_ey.nl
>
>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 Mon May 15 2000 - 08:38:43 CDT

Original text of this message

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