Change the data file name or path

Source: Internet
Author: User

1 The status of the data file is set to offline state
Table space set to offline
Sql> select File_name,tablespace_name from Dba_data_files;
Sql> alter tablespace users offline;
Sql> select Name,status from V$datafile;

NAME STATUS
-------------------------------------------------- -------
/U01/APP/ORACLE/ORADATA/ORA11GR2/SYSTEM01.DBF SYSTEM
/U01/APP/ORACLE/ORADATA/ORA11GR2/SYSAUX01.DBF ONLINE
/U01/APP/ORACLE/ORADATA/ORA11GR2/UNDOTBS01.DBF ONLINE
/U01/APP/ORACLE/ORADATA/ORA11GR2/USERS01.DBF OFFLINE
/U01/APP/ORACLE/ORADATA/ORA11GR2/EXAMPLE01.DBF ONLINE
2 operating system level to complete the real renaming operation
3 database level modify data file name
Alter DATABASE rename file '/u01/app/oracle/oradata/ora11gr2/users01.dbf ' to '/u01/app/oracle/oradata/ora11gr2/ USERS01.DBF.BK ';
4 table space Reset to online status
Alter tablespace users online;
Sql> select Name,status from V$datafile;

Change the data file name or path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.