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
Received on Mon May 15 2000 - 07:15:04 CDT