TOP

rac环境数据文件误建到rac节点本地处理(三)
2015-11-21 01:25:36 】 浏览:10394次 本网站的内容取自网络,仅供学习参考之用,绝无侵犯任何人知识产权之意。如有侵犯请您及时与本人取得联系,万分感谢。
Tags:rac 环境 数据 文件 节点 本地 处理

le/temp.1592.886865983




+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

----数据文件迁移到 rac asm 存储上:

这里提供2个方法: rman cp;dbms_file_transfer.copy_file 【plsql 包 直接拷贝

SQL> select file_name, tablespace_name ,bytes/1024/1024/1024 from dba_data_files where tablespace_name='LIXORA';
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME BYTES/1024/1024/1024
------------------------------ --------------------
/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORA.DBF
LIXORA .0390625


SQL> select file_name, tablespace_name ,bytes/1024/1024/1024 from dba_data_files where tablespace_name='LIXORADATA';
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME BYTES/1024/1024/1024
------------------------------ --------------------
/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORADATA.DBF
LIXORADATA .3515625


create directory test1 as '/u01/app/oracle/product/10.2.0/db_1/dbs/';
create directory test2 as '+DATA/lixora/datafile/';

alter tablespace LIXORA offline;
alter tablespace LIXORADATA offline;


exec dbms_file_transfer.copy_file('TEST1','D:oraclefcdataLIXORA.DBF','TEST2','LIXORA.DBF');
exec dbms_file_transfer.copy_file('TEST1','D:oraclefcdataLIXORADATA.DBF','TEST2','LIXORADATA.DBF');


alter database rename file '/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORA.DBF' to '+DATA/lixora/datafile/LIXORA.DBF';
alter database rename file '/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORADATA.DBF' to '+DATA/lixora/datafile/LIXORADATA.DBF';


alter tablespace LIXORA online;
alter tablespace LIXORADATA online;



++++++++++++++++++++++++++++rman copy ++++++++++++++++++++++++++++

RMAN>
sql "alter tablespace LIXORA offline";
sql "alter tablespace LIXORADATA offline";


RMAN>
copy datafile '/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORA.DBF' to '+DATA/lixora/datafile/LIXORA.DBF';
copy datafile '/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORADATA.DBF' to '+DATA/lixora/datafile/LIXORADATA.DBF';


SQL>
alter database rename file '/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORA.DBF' to '+DATA/lixora/datafile/LIXORA.DBF';
alter database rename file '/u01/app/oracle/product/10.2.0/db_1/dbs/D:oraclefcdataLIXORADATA.DBF' to '+DATA/lixora/datafile/LIXORADATA.DBF';


SQL>
alter tablespace LIXORA online;
alter tablespace LIXORADATA online;

总结:

开发人员严重缺乏对oracle 数据库(单机,rac)的了解,当然这个也是管理上的疏忽;

从另一个方面也可以看出,业务用户权限管理太粗狂,过于简单粗暴,需要好好审计,规划下;

具体其他的就不想再多说了。。。。。。。

请关注公众号获取更多资料


rac环境数据文件误建到rac节点本地处理(三) https://www.cppentry.com/bencandy.php?fid=57&id=107823

首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇SQL Server触发器创建、删除、修.. 下一篇myibatis传多个参数

评论

验 证 码:
表  情:
内  容: