视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
Oracle10gASM控制文件多路复用
2020-11-09 10:58:24 责编:小采
文档


1gt; 检查数据库,查看控制文件存放路径 SQLgt; startup Oracle instance started. Total System Global Area 230686720 byte

1> 检查数据库,查看控制文件存放路径
SQL> startup
Oracle instance started.

Total System Global Area 230686720 bytes
Fixed Size 1218676 bytes
Variable Size 71305100 bytes
Database Buffers 1551248 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> show parameter control;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/oradb/controlfile/backup
.259.762002877 //控制文件名

SQL> shutdown immediate; //关闭数据库
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount; //打开数据库至nomount状态
ORACLE instance started.

Total System Global Area 230686720 bytes
Fixed Size 1218676 bytes
Variable Size 71305100 bytes
Database Buffers 1551248 bytes
Redo Buffers 2973696 bytes
SQL>
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@node1 ~]$ rman target / //进入RMAN

Recovery Manager: Release 10.2.0.1.0 - Production on Fri Sep 16 16:36:09 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: oradb (not mounted)
RMAN> restore controlfile to '+data/oradb/controlfile/backup.259.762002875' from '+data/oradb/controlfile/backup.259.762002877'; //利用数据库当前的控制文件,创建一个新的控制文件

Starting restore at 16-SEP-11
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 16-SEP-11
Recovery Manager complete.
RMAN> exit
[oracle@node1 ~]$ export ORACLE_SID=+ASM
[oracle@node1 ~]$ asmcmd //进入ASM实例命令
ASMCMD> +data/oradb/controlfile
ASMCMD> ls -ltr //查看新创建的控制文件名
Type Redund Striped Time Sys Name
CONTROLFILE HIGH FINE SEP 16 16:00:00 Y backup.259.762002877
CONTROLFILE HIGH FINE SEP 16 16:00:00 Y backup.265.762021421
ASMCMD> exit

[oracle@node1 ~]$ export ORACLE_SID=oradb
[oracle@node1 ~]$ sqlplus / as sysdba //进入数据库

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Sep 16 16:38:30 2011
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> create pfile='/u01/oracle/product/10g/dbs/oradb.ora' from spfile; //创建数据库的pfile 参数文件
File created.

SQL> shutdown immediate; //关闭数据库
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit

下载本文
显示全文
专题