How to move data files in Oracle database?
When your system works using the ORACLE database as the repository, you might want to transfer one or more file dates from one file system to another. This could be done in the following way:
- Create a backup copy of the database. For example, SAP tools (Brbackup, DB13).
- Stop the SAP application server, the ORACLE database.
- Migrate the date-files at the OS level from the source file system to the target. If you have a Unix-like system, be careful with your rights/permissions on the data files.
- Run Sqlplus, connect to the DBMS, and open the ORACLE database in the Mount mode:
# Sqlplus /nolog
SQL > connect /as SYSDBA
SQL > startup Mount - Runs the following command in SQLPlus for each migrated file date:
SQL > ALTER DATABASE Rename file ' full source path to date-file ' to ' full target path to date-file '; - Close the database and open in normal mode:
SQL > shutdown
SQL > startup Open - Run the SAP application server.
Then, if it's normal, and in DB02 you've checked that the database refers to the date files that lie on the new file system, you can delete the data files from the original OS-level file system. Try to make a complete backup of the database in the near future, especially if you have deleted the entire old file system.
In the same way, you can rename a datafile, for example, if you create it in a file name or directory name.
No comments:
Post a Comment