eygle.com   eygle.com
eygle.com  
 

« May 8, 2006 | Blog首页 | May 11, 2006 »



May 9, 2006

使用RMAN启动Oracle默认实例

作者:eygle

出处:http://blog.eygle.com

昨天在Oracle创建实例的最少参数需求中,我提到,启动一个实例需要的最少参数仅为db_name.

实际上,我们可以通过rman,在不存在参数文件的情况下,启动一个默认DUMMY实例.

请看如下测试:

[oracle@jumper dbs]$ rman target /

Recovery Manager: Release 9.2.0.4.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database (not started)

RMAN> startup nomount;

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/opt/oracle/product/9.2.0/dbs/initconner.ora'

trying to start the Oracle instance without parameter files ...
Oracle instance started

Total System Global Area 97588504 bytes

Fixed Size 451864 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes

此时Oracle使用的db_name为DUMMY:

SQL> show parameter db_name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string DUMMY

如果我们丢失了所有的参数文件,那么用这种方法可以对自动备份的spfile进行恢复:

[oracle@jumper log]$ rman target /

Recovery Manager: Release 9.2.0.4.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database: DUMMY (not mounted)

RMAN> restore spfile to '/tmp/spfile.ora' from 'c-3152029224-20060509-00';

Starting restore at 09-MAY-06

using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: autobackup found: c-3152029224-20060509-00
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 09-MAY-06

RMAN>

Posted by eygle at 10:26 AM | Comments (2)



CopyRight © 2004-2008 eygle.com, All rights reserved.