更改oracle+表空间,Oracle 更改表空间位置的具体步骤

[oracle]> sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 03:46:29 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn /as sysdba

Connected.

SQL> shutdown immediate

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 167772160 bytes

Fixed Size 1977208 bytes

Variable Size 104862856 bytes

Database Buffers 58720256 bytes

Redo Buffers 2211840 bytes

Database mounted.

Database opened.

SQL> alter tablespace users offline;

Tablespace altered.

SQL> host mv /opt/oracle/oradata/ora10g/users01.dbf /opt/oracle/oradata_bak/

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production

With the Partitioning, OLAP and Data Mining options

[oracle]> ls

control01.ctl control03.ctl redo01.log redo03.log system01.dbf undotbs01.dbf

control02.ctl example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf

[oracle]> mv /opt/oracle/oradata/ora10g/users01.dbf /opt/oracle/oradata_bak/

[oracle]> sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 03:52:19 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn /as sysdba

Connected.

SQL> alter tablespace users

2 rename datafile ‘/opt/oracle/oradata/ora10g/users01.dbf’ to ‘/opt/oracle/oradata_bak/users01.dbf’;

Tablespace altered.

SQL> alter tablespace users online;

Tablespace altered.

见效果

=============================================

RMAN> report schema

2> ;

Report of database schema

List of Permanent Datafiles

===========================

File S

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值