Chinaunix首页 | 论坛 | 博客
  • 博客访问: 621455
  • 博文数量: 28
  • 博客积分: 6060
  • 博客等级: 准将
  • 技术积分: 1948
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-03 08:55
文章分类

全部博文(28)

文章存档

2011年(3)

2009年(9)

2008年(16)

我的朋友

分类: Oracle

2008-04-22 21:08:57

最近在折腾asm,所以有些小小的心得,记录下来做个印象,与大家分享。
 
由于使用asm之后,不像以前,对于asm中文件不能以直接拷贝的方式来进行,所以中间有些小小的区别。
 
以下就是示范过程:
 
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+TEST_ASM/test_asm/controlfile/backup.261.652739057
SQL> select * from v$version;  
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1218292 bytes
Variable Size              79694092 bytes
Database Buffers           79691776 bytes
Redo Buffers                7168000 bytes
SQL> exit  
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@jusdoi dbs]$ rman
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 22 21:03:27 2008
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
RMAN> connect target
connected to target database: test_asm (not mounted)
RMAN> restore controlfile to '+TEST_ASM/test_asm/controlfile/control01.ctl' from '+TEST_ASM/test_asm/controlfile/backup.261.652739057';
Starting restore at 22-APR-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 22-APR-08
 
RMAN> exit
Recovery Manager complete.
 
[oracle@jusdoi dbs]$ sqlplus /"As sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 22 21:05:31 2008
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter system set control_files='+TEST_ASM/test_asm/controlfile/control01.ctl','+TEST_ASM/test_asm/controlfile/backup.261.652739057' scope=spfile;
System altered.
SQL> shutdown immediate;
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1218292 bytes
Variable Size              79694092 bytes
Database Buffers           79691776 bytes
Redo Buffers                7168000 bytes
Database mounted.
Database opened.
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+TEST_ASM/test_asm/controlfile/control01.ctl
+TEST_ASM/test_asm/controlfile/backup.261.652739057
 
其实也就是充分使用rman的功能。
阅读(2183) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~