Search

Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Tuesday, 20 March 2012

Changing Datafiles Location in Oracle 9i Windows Env.


Move EDSS from F:\ to G:\ on Oracle 9i Windows 2003 platform.
Step1. Shutdown the database
sqlplus /nolog
SQL> connect sys/*** as sysdba
SQL>shutdown immediate;

Step2. Move the datafiles physically
F:\>oracle>sadhan> COPY SDH_EDSS01.DBF G:\ORA_DBF_EXTENDED
OR JUST COPY AND PASTE THRUOGH WINDOWS
Note: Before Copy must check the size on destination drive

Step3: Now Start the database in mount phase..
SQL> Startup mount;

Step4: Alter the database and specify the new location for each datafiles

ALTER DATABASE RENAME FILE 'F:\ORACLE\SADHAN\SDH_EDSS01.DBF' TO 'G:\ORA_DBF_EXTENDED\SDH_EDSS01.DBF';
ALTER DATABASE RENAME FILE 'F:\ORACLE\SADHAN\SDH_EDSS02.DBF' TO 'G:\ORA_DBF_EXTENDED\SDH_EDSS02.DBF';

Step5: Once you finish giving the location of datafiles then
SQL>Shutdown immediate;
sql>Startup;

Note: After testing the DB do not forget to delete the old location DBF file. for that no need to shutdown the database.

0 comments:

Post a Comment