Oracle modifies table space storage paths

Source: Internet
Author: User

[Email protected] ~]# more/etc/oracle-release
Oracle Linux Server Release 5.7

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
PL/SQL Release 11.2.0.3.0-production
CORE 11.2.0.3.0 Production
TNS for Linux:version 11.2.0.3.0-production
Nlsrtl Version 11.2.0.3.0-production

1. View the storage path for the data file:

Sql> select name from V$datafile;

NAME
--------------------------------------------------------------------------------
/u01/oracle/oradata/yoon/system01.dbf
/u01/oracle/oradata/yoon/sysaux01.dbf
/u01/oracle/oradata/yoon/undotbs01.dbf
/u01/oracle/oradata/yoon/users01.dbf

2. Modify the tablespace to offline:

Sql> alter tablespace users offline;

Tablespace altered.

3. Copying data files

[email protected] yoon]$ CP users01.dbf/u01/oracle/oradata/yoondata/

4. Modify Tablespace Storage Path

sql> alter tablespace users rename DataFile '/u01/oracle/oradata/yoon/users01.dbf ' to '/u01/oracle/oradata/yoondata /USERS01.DBF ';

Tablespace altered.

5. Modify the table space to online

sql> alter tablespace users online;

Tablespace altered.

6. Re-view the data file path

Sql> select name from V$datafile;

NAME
--------------------------------------------------------------------------------
/u01/oracle/oradata/yoon/system01.dbf
/u01/oracle/oradata/yoon/sysaux01.dbf
/u01/oracle/oradata/yoon/undotbs01.dbf
/u01/oracle/oradata/yoondata/users01.dbf

Oracle modifies table space storage paths

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.