更改数据文件名字或者路径

1 数据文件的状态设置为offline状态
表空间置为offline
SQL> select file_name,tablespace_name from dba_data_files;
SQL> alter tablespace users offline;
SQL> select name,status from v$datafile;

NAME                                               STATUS
-------------------------------------------------- -------
/u01/app/oracle/oradata/ORA11GR2/system01.dbf      SYSTEM
/u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf      ONLINE
/u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf     ONLINE
/u01/app/oracle/oradata/ORA11GR2/users01.dbf       OFFLINE
/u01/app/oracle/oradata/ORA11GR2/example01.dbf     ONLINE
2 操作系统层面完成真正的改名操作
3 数据库层面修改数据文件名
 alter database rename file '/u01/app/oracle/oradata/ORA11GR2/users01.dbf' to  '/u01/app/oracle/oradata/ORA11GR2/users01.dbf.bk';
4 表空间重新置为online状态
 alter tablespace users online;
SQL> select name,status from v$datafile;

成都创新互联公司主营扶绥网站建设的网络公司,主营网站建设方案,成都app软件开发,扶绥h5微信小程序定制开发搭建,扶绥网站营销推广欢迎扶绥等地区企业咨询

文章名称:更改数据文件名字或者路径
文章网址:https://www.cdcxhl.com/article8/gshhip.html

成都网站建设公司_创新互联,为您提供移动网站建设全网营销推广网站营销Google虚拟主机域名注册

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都app开发公司