Chinaunix首页 | 论坛 | 博客
  • 博客访问: 562970
  • 博文数量: 287
  • 博客积分: 27
  • 博客等级: 民兵
  • 技术积分: 547
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-01 20:20
文章分类

全部博文(287)

文章存档

2015年(1)

2014年(95)

2013年(90)

2012年(101)

分类: LINUX

2014-07-15 18:21:08

原文地址:oracle修改数据文件路径 作者:hbhe0316

将/u01/oradata下的icms.dbf文件移动到/u01/oracle/oradata/orcl目录下
操作步骤如下:
[oracle@oracle11g admin]$ export ORACLE_SID=orcl
[oracle@oracle11g admin]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Sun Jul 13 18:49:18 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
将数据库启动到mount状态
SQL> startup mount
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size    2228784 bytes
Variable Size 1140854224 bytes
Database Buffers  452984832 bytes
Redo Buffers    7344128 bytes
Database mounted.
重新启动一个会话,使用Oracle用户登录,移动icms.dbf文件的目录
[oracle@oracle11g orcl]$ mv /u01/oradata/icms.dbf /u01/oracle/oradata/orcl
SQL> alter database rename file '/u01/oradata/icms.dbf' to '/u01/oracle/oradata/orcl/icms.dbf';
Database altered.
SQL> alter database open;
Database altered.
SQL> select file#,ts#,status,name from v$datafile;
     FILE#  TS# STATUS
---------- ---------- -------
NAME
--------------------------------------------------------------------------------
1    0 SYSTEM
/u01/oracle/oradata/orcl/system01.dbf
2    1 ONLINE
/u01/oracle/oradata/orcl/sysaux01.dbf
3    2 ONLINE
/u01/oracle/oradata/orcl/undotbs01.dbf
     FILE#  TS# STATUS
---------- ---------- -------
NAME
--------------------------------------------------------------------------------
4    4 ONLINE
/u01/oracle/oradata/orcl/users01.dbf
5    6 ONLINE
/u01/oracle/oradata/orcl/example01.dbf
6    7 ONLINE
/u01/oracle/oradata/orcl/icms.dbf
6 rows selected.
阅读(1538) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~