How to move system, temporary or rollback datafiles on an eHealth server

Document ID : KB000029800
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How to move system, temporary or rollback datafiles on an eHealth server

 

Answer:

You cannot use the nhManageDbSpace utility to move system, temporary or rollback datafiles because moving these datafiles require shutting down the database, then bringing the database up in a mount state to allow the control file to be updated while the database is not in use. Below is an example procedure used to move d:/ca/oradata/EHEALTH/SYSTEM01.dbf from d drive to e drive.

    Start sqlplus

    sqlplus $NH_USER/$NH_USER
    Stop the database, then start in a mount state

    Shutdown immediate;

    Startup mount;
    Exit the sql session

    exit
    Move the file from its current location to a new location.

    Solaris/Linux:
    mv d:/ca/oradata/EHEALTH/SYSTEM01.dbf e:/ca/oradata/EHEALTH

    Windows:
    Use Windows Explorer
    Sign into sql session, as in step 1.
    Change the database location of the datafile

    alter database rename file 'd:/ca/oradata/EHEALTH/SYSTEM01.dbf' to 'e:/ca/oradata/EHEALTH/SYSTEM01.dbf';
    alter database open;

Now you can start the server that will use the system01.dbf file in the new location.