Moving data files from already existing databases, The link method to move data files – HP StorageWorks 8000 NAS User Manual

Page 10

Advertising
background image

choose the placement of the alert logs and trace files (see above), although the default location will place

these files on the Oracle server.

moving data files from already existing databases

the link method to move data files

It may be necessary/desirable to move existing Oracle database data files off of an Oracle server and onto

the NAS 8000. There are two ways to accomplish this. The first way is similar to the above-described

method of creating a link on the NAS 8000 that points to a directory on the Oracle server that holds the

alert logs and trace files. However, in this case, the links are on the Oracle server, pointing to the

directories/data files that have been moved onto the NAS 8000. Please note that in order for this method

to function as expected, it is important that the database be shutdown, or the individual tablespaces be

taken offline prior to the attempt to copy or move them. Failure to do either of these may result in data

corruption and/or an unusable database. Care must be taken in creating links where the database data

files and directories were originally located, pointing to the NAS 8000. Whether the links should point to

data files, or to directories, depends on specific implementation details for each database. As well, if the

database is ever deleted by the DBA, be sure to verify both the data file(s) and the link(s) to the directories

and data file(s) are removed.
database administrative method for moving data files

The preferred method for moving a database and/or data files is to have the DBA move the data files

through the Oracle utilities srvmgrl or sqlplus. Please refer to Oracle documentation for more information.

The first method described below is specifically for moving the data files associated with any tablespace

except the for SYSTEM tablespace.

1) Take the tablespace(s) offline ( SQL> alter tablespace tablespace_name offline; )

2) Copy or move (via operating system commands) the data files to the NAS 8000.

3) Rename the data file(s) associated with the tablespace that have moved ( SQL> alter

database rename file ‘old_file_path_1’,’old_file_path_2’ to ‘new_file_path_1’, ‘new_file_path_2’;

)

4) Bring the tablespace(s) back online ( SQL> alter tablespace tablespace_name online; )

To move all of the data files associated with a database (including the SYSTEM tablespace) from the Oracle

server onto the NAS 8000, perform the following steps. NOTE: When moving the SYSTEM tablespace, the

database must be shutdown because it is not possible to take the SYSTEM tablespace offline.

1) Shut the database down ( SQL> shutdown normal; )

2) A full backup is recommended as an extra safety measure.

3) Copy or move (via operating system commands) the database data files to the NAS 8000.

4) Start up and mount the database ( SQL> startup mount pfile=”path”; )

5) Rename all of the data files associated with the database that have moved ( SQL>

alter database rename file ‘old_file_path’ to ‘new_file_path’;

)

6) Open the database for use ( SQL> alter database open; ).

database administrative method for moving control files

1) Shutdown the database ( SQL> shutdown normal; )

2) Copy/move the control file(s) using operating system commands.

3) Edit the init.ora and change the locations of the control files via the control_file parameter.

4) Restart the database ( SQL> startup; )

database administrative method for moving active redo log files

1) Shutdown the database ( SQL> shutdown normal; )

2) A complete backup is recommended.

3) Copy/move the active redo log file(s) using operating system commands.

4) Startup the database instance and mount the database ( SQL> startup mount pfile=”path”; )

5) Rename the redo log files in the control file. ( SQL> alter database rename file ‘old_redo_file_name’ to

new_redo_file_name;

)

6) Open the database for use ( SQL> alter database open; ).

10

Advertising