本实验是将ASM文件利用cp命令拷贝到操纵系统文件系统后,如何注册到database,打开数据库
环境是linux5.7+oracle11.2.0.4
RMAN> catalog datafilecopy '/s01/oracle/USERS.268.962900225';
cataloged datafile copy
datafile copy file name=/s01/oracle/USERS.268.962900225 RECID=2 STAMP=963047096
RMAN> run
2> {
3> set newname for datafile '+DATA/DAVID/DATAFILE/USERS.268.962900225' to '/s01/oracle/USERS.268.962900225';
4> switch datafile all;
5> }
executing command: SET NEWNAME
datafile 4 switched to datafile copy
input datafile copy RECID=2 STAMP=963047096 file name=/s01/oracle/USERS.268.962900225
RMAN> recover datafile 4;
Starting recover at 18-DEC-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 18-DEC-17
RMAN> exit
Recovery Manager complete.
[oracle@rac1 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 18 09:06:09 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> alter database open;
Database altered.
SQL> select file_name
2 from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/s01/oracle/USERS.268.962900225
+DATA/david/datafile/undotbs1.261.962900225
+DATA/david/datafile/sysaux.260.962900225
+DATA/david/datafile/system.270.962900225
+DATA/david/datafile/example.262.962900447
SQL> select *
2 from scott.dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。