chengjun1989

Oracle表空间数据文件迁移

/**第一步:登陆数据库**/

C:\>sqlplus /nolog

SQL> conn / as sysdba

/**第二步:停止数据库**/

SQL> shutdown immediate

/**第三步:在open模式下启动数据库**/

SQL> startup open

/**第四步:将表空间(tablespacename )脱机**/

SQL> alter tablespace tablespacename offline;

/**第五步:手工将表空间所使用的数据库文件(D:\tablespace01.ORA),复制到你要转移的目录(E:\tablespace01.ORA)**/

/**手工拷贝数据库文件到你想到达的目录下。**/

/**第六步:将表空间与新目录下的数据库文件关联,操作前后可以用SQL来查询表空间所使用的数据库文件的变化情况:select name from v$datafile;**/

SQL> alter tablespace tablespacename rename datafile \'D:\tablespace01.ORA\' to \'E:\tablespace01.ORA\';

/**第七步:将表空间联机,提交,OK,完成。**/

SQL> alter tablespace tablespacename online;

SQL>commit;

SQL>exit;

/**注意:表空间数据文件时,确保不要对该表空间执行任何写操作**/

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-05-20
  • 2022-12-23
  • 2021-10-23
  • 2022-02-25
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-07-01
  • 2022-01-30
相关资源
相似解决方案