免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3564 | 回复: 0
打印 上一主题 下一主题

oracle 更改datafile路径 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-20 09:48 |只看该作者 |倒序浏览

SQL> shut abort                              停止数据库
ORACLE instance shut down.

SQL> startup mount                           启动数据库mount模式
ORACLE instance started.

Total System Global Area 2304909312 bytes
Fixed Size                  2215464 bytes
Variable Size            2214592984 bytes
Database Buffers           67108864 bytes
Redo Buffers               20992000 bytes
Database mounted.

 
SQL> select name from v$datafile;              查看datafile文件

[root@DB-Oracle-01 /]# chown -R oracle:oinstall /ora_new_data_dir/                       创建oracle权限目录

[root@DB-Oracle-01 /]# su - oracle
[oracle@DB-Oracle-01 ~]$ cp /old_data/system01.dbf /ora_new_data_dir/            拷贝到新的目录

SQL> alter database rename file '/old_data/system01.dbf' to '/ora_new_data_dir/ system01.dbf';   datafile重定向

Database altered.

SQL> alter database open;   打开数据库

Database altered.


SQL> select username,DEFAULT_TABLESPACE from dba_users;  查看用户名对应tablespace

SQL> desc dba_users;
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP