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

Migration Control File method (2)

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Oracle database file migration steps

(1) first confirm the database files that need to be migrated

SQL > select name from v$controlfile

NAME

-

D:\ ORACLE\ ORADATA\ XSFREE\ CONTROL01.CTL

D:\ ORACLE\ ORADATA\ XSFREE\ CONTROL02.CTL

SQL > select name from v$datafile

NAME

-

D:\ ORACLE\ ORADATA\ XSFREE\ SYSTEM01.DBF

D:\ ORACLE\ ORADATA\ XSFREE\ SYSAUX01.DBF

D:\ ORACLE\ ORADATA\ XSFREE\ UNDOTBS01.DBF

D:\ ORACLE\ ORADATA\ XSFREE\ USERS01.DBF

SQL > select member from v$logfile

MEMBER

-

D:\ ORACLE\ ORADATA\ XSFREE\ REDO01.LOG

D:\ ORACLE\ ORADATA\ XSFREE\ REDO02.LOG

D:\ ORACLE\ ORADATA\ XSFREE\ REDO03.LOG

SQL > select name from v$tempfile

NAME

-

D:\ ORACLE\ ORADATA\ XSFREE\ TEMP01.DBF

(2) create pfile and back up spfile

SQL > create pfile from spfile

Move SPFILEXSFREE.ORA SPFILEXSFREE.ORA_bak

(3) close the database

SQL > shutdown immediate

(4) migrate database files

Copy the files under D:\ oracle\ oradata to D:\ oracle\ oradata_bak (this test is to migrate the database files under the oradata directory to oradata_bak)

(5) modify the control file path in pfile

* .control_files='D:\ oracle\ oradata_bak\ xsfree\ control01.ctl','D:\ oracle\ oradata_bak\ xsfree\ control02.ctl'

(6) rename file

SQL > startup mount pfile='D:\ oracle\ product\ 11.2.0\ dbhome_1\ database\ INITxsfree.ORA'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ SYSTEM01.DBF' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ SYSTEM01.DBF'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ SYSAUX01.DBF' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ SYSAUX01.DBF'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ UNDOTBS01.DBF' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ UNDOTBS01.DBF'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ USERS01.DBF' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ USERS01.DBF'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ REDO01.LOG' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ REDO01.LOG'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ REDO02.LOG' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ REDO02.LOG'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ REDO03.LOG' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ REDO03.LOG'

SQL > alter database rename file'D:\ ORACLE\ ORADATA\ XSFREE\ TEMP01.DBF' to'D:\ ORACLE\ ORADATA_BAK\ XSFREE\ TEMP01.DBF'

(7) when you open the database, you can execute either open or the following creation spfile without sequence.

SQL > alter database open

SQL > create spfile from pfile='D:\ oracle\ product\ 11.2.0\ dbhome_1\ database\ INITxsfree.ORA'

Create pfile='e:\ b.txt' from spfile;-- verify that the new spfile content has been modified

(8) restart the library with the new spfile

Shutdown immediate

Startup

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

  • J2ee distributed architecture dubbo + springmvc + mybatis + ehcache + redis distributed architecture

    Introduce

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

    12
    Report