Database open state, how to modify the data file path (can be used to change the name of the path)

Source: Internet
Author: User


Database open, migrate data under the Users table space to/home/oracle/dsk1 (can be renamed)
Col name for A50
Sql> select file#,name,checkpoint_change# from V$datafile;

file# NAME checkpoint_change#
---------- -------------------------------------------------- ------------------
1/U01/APP/ORACLE/ORADATA/ORA11GR2/SYSTEM01.DBF 1043045
2/U01/APP/ORACLE/ORADATA/ORA11GR2/SYSAUX01.DBF 1043045
3/U01/APP/ORACLE/ORADATA/ORA11GR2/UNDOTBS01.DBF 1043045
4/U01/APP/ORACLE/ORADATA/ORA11GR2/USERS01.DBF 1043045
5/U01/APP/ORACLE/ORADATA/ORA11GR2/EXAMPLE01.DBF 1043045
6/U01/APP/ORACLE/ORADATA/ORA11GR2/USERS02.DBF 1044441
Sql> alter system checkpoint;
Select file#,name,checkpoint_change# from V$datafile;
Alter TABLESPACE users offline;
Select file#,name,checkpoint_change# from V$datafile;
Alter tablespace users rename DataFile '/u01/app/oracle/oradata/ora11gr2/users01.dbf ' to '/home/oracle/dsk1/ USERS01.DBF ';
Alter tablespace users rename DataFile '/u01/app/oracle/oradata/ora11gr2/users02.dbf ' to '/home/oracle/dsk1/ USERS02.DBF '; Modify the contents of the control file
Select name from V$datafile;
sql> alter tablespace users online;
Summary of four steps
1 tablespace offline
2 CP datafile to Dest
3 alter tablespace XXX rename
4 TBS online


Database open state, how to modify the data file path (can be used to change the name of the 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.