Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the data file path in the database open state (can be used to rename and change the path)

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Under the database open, migrate the data under the users tablespace to / home/oracle/dsk1 (can be used as a rename)

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 alter tablespace users rename datafile'/ u01qqappActionoradataPlacement ORA11GR2 / home/oracle/dsk1/users01.dbf'

Alter tablespace users rename datafile'/ u01 to to'/ home/oracle/dsk1/users02.dbf'; modify the contents of control file

Select name from v$datafile

SQL > alter tablespace users online

Summed up in four steps

1 tablespace offline

2 cp datafile to dest

3 alter tablespace xxx rename

4 tbs online

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report