- 浏览: 1000325 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (529)
- 服务器 (8)
- jsp (1)
- java (6)
- AIX (1)
- solaris (3)
- linux学习 (53)
- javaScript (2)
- hibernate (1)
- 数据库 (74)
- sql语句 (8)
- oracle 学习 (75)
- oracle 案例 (42)
- oracle 管理 (42)
- Oracle RAC (27)
- oracle data guard (12)
- oracle 参数讲解 (14)
- Oracle 字符集 (8)
- oracle性能调优 (24)
- oracle备份与恢复 (12)
- oracle Tablespace (9)
- oracle性能诊断艺术 (1)
- oracle 11g学习 (5)
- oracle streams (1)
- oracle upgrade and downgrade (4)
- db2学习 (13)
- db2命令学习 (2)
- mysql (28)
- sql server (30)
- sql server 2008 (0)
- 工具 (10)
- 操作系统 (3)
- c++ (1)
- stock (1)
- 生活 (5)
- HADOOP (2)
最新评论
-
massjcy:
...
如何将ubuntu文件夹中文名改为英文 -
skypiea:
谢谢。。。
终于解决了。。。
Oracle 10.2.0.4(5)EM不能启动的解决方案(Patch 8350262) -
qwe_rt:
引用vi /etc/sysconfig/network 请问 ...
Linux操作系统下配置静态IP上网 -
liuqiang:
sudo killall -9 apache2
ps 和 kill 命令详解 -
dazuiba:
引用*绝杀 kill -9 PID 当使用此命令时,一定要通过 ...
ps 和 kill 命令详解
PURPOSE
-------
This article describes how you can recreate your controlfile in RAC.
SCOPE & APPLICATION
-------------------
For DBA's requiring to recreate the controlfile.
WARNING:
--------
You should only need to recreate your control file under very special
circumstances:
- All current copies of the control file have been lost or are corrupted.
- You need to change a "hard" database parameter that was set when the
database was first created, such as MAXDATAFILES, MAXLOGFILES,
MAXLOGHISTORY, etc.
- You are restoring a backup in which the control file is corrupted or
missing.
- Oracle Customer Support advises you to do so.
- If you are moving your database to another machine which is
running the same operating system but the location of the datafiles,
logfiles is not the same.
RECREATING THE CONTROLFILE IN RAC
---------------------------------
If are recreating your controlfile from an existing one, use the following
steps to recreate your controlfiles. If you have lost all copies of the
controlfile, a new one will need to be generated using SQL. The syntax
is available in the SQL Reference manual for all versions but consideration
for Step 4 onward must be taken into account.
1. Connected to an open or mounted RAC instance via sqlplus, issue the
following command to dump a trace file that contains a create controlfile
script. The file will be generated in the user_dump_dest on the local
instance (show parameter dump in server manager to find user_dump_dest):
SQL> alter database backup controlfile to trace;
2. Find the trace file using "ls -ltr" in the user_dump_dest, it will
probably be the last or one of the last files listed as it will be very
recent. At this point you may want to move or rename the file to an easy
to remember name. In my example I use the name "create_control.sql".
3. Once the file is opened, remove all of the header information
up to the "STARTUP NOMOUNT" command. In later versions 10+ for RAC
you can remove the "NORESETLOGS" "CREATE CONTROLFILE" statement and keep
the "RESETLOGS" version.
If your redo logs still exist in the correct locations and the create
controlfile statement contains the appropriate "alter database add logfile"
statements, skip to step 5. If your redo logs have been removed or need to
be recreated, continue:
At this point the controlfile should look something like this:
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "RAC" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/ocfs01/rac/redo01.log' SIZE 50M,
GROUP 2 '/ocfs01/rac/redo02.log' SIZE 50M,
GROUP 3 '/ocfs01/rac/redo03.log' SIZE 50M,
GROUP 4 '/ocfs01/rac/redo04.log' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/ocfs01/rac/system01.dbf',
'/ocfs01/rac/undotbs01.dbf',
'/ocfs01/rac/sysaux01.dbf',
'/ocfs01/rac/undotbs02.dbf',
'/ocfs01/rac/users01.dbf'
CHARACTER SET WE8ISO8859P1
RECOVER DATABASE
ALTER DATABASE OPEN;
ALTER TABLESPACE TEMP ADD TEMPFILE '/ocfs01/rac/temp01.dbf'
SIZE 167772160 REUSE AUTOEXTEND OFF;
4. Now the create controlfile script needs to be altered for RAC.
a. Notice that in the script all of the logfiles are listed together. We
will need to seperate these out by thread. First remove all logfiles listed
that are not from the 1st instance. Once these are removed, after the
create controlfile statement add an "alter database add logfile thread"
statement(s) for each thread of redo to be added (usually 1 per node).
b. Because not all of the logfiles are listed (additional threads added
after the controlfile is created), you will need to use the RESETLOGS
option on the create controlfile statement. This is necessary in RAC
and will reset your scn's back to 0. It is highly recommended to take
a full backup of the database after completing this procedure.
c. We must now set the appropriate recovery commands for the RESETLOGS.
If all datafiles are consistent and no additional recover is required
on the database you can simply place the following commands at the bottom
of the script:
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
CANCEL
ALTER DATABASE ADD LOGFILE...
ALTER DATABASE OPEN RESETLOGS;
If additional datafile recovery is needed, you will need to gather information
from the existing controlfile (mount and query V$log and V$logfile) to get the
full path and file name for each online redo log. You will need to manually
run the recovery (take it out of the create controlfile script) and when recovery
prompts for an archive log that does not exist you will need to type in the full
path and file name for the online log that corresponds with the sequence number
requested. When this is finished you should get a "Media Recovery Complete"
message. For example:
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
# recovery prompts for non-existant logfile arch_123.log
/u01/redo_log_dest/redo123.log
# Should now get "Media Recovery Complete" message after online logs are applied.
ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE ENABLE PUBLIC THREAD 2;
# repeat for other threads if applicable
e. After the alter database open command, add an "alter database enable
public thread #" command(s). Do this for each additional thread to be added.
Now the create controlfile script should look something like the following:
set echo on
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "RAC" RESETLOGS NOARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/ocfs01/rac/redo01.log' SIZE 50M,
GROUP 2 '/ocfs01/rac/redo02.log' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/ocfs01/rac/system01.dbf',
'/ocfs01/rac/undotbs01.dbf',
'/ocfs01/rac/sysaux01.dbf',
'/ocfs01/rac/undotbs02.dbf',
'/ocfs01/rac/users01.dbf'
CHARACTER SET WE8ISO8859P1
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
CANCEL
ALTER DATABASE ADD LOGFILE THREAD 2
GROUP 3 '/ocfs01/rac/redo03.log' SIZE 50M REUSE,
GROUP 4 '/ocfs01/rac/redo04.log' SIZE 50M REUSE;
ALTER DATABASE OPEN RESETLOGS;
ALTER TABLESPACE TEMP ADD TEMPFILE '/ocfs01/rac/temp01.dbf'
SIZE 167772160 REUSE AUTOEXTEND OFF;
5. Shutdown all instances cleanly with shutdown immediate, shutdown
transactional, or shutdown normal.
6. This would be a good time to make backup copies of the current
controlfiles.
7. Verify that you are running from the instance designated for thread 1.
This is because any logfiles designated in the create controlfile statement
will go into thread 1. You will get errors if you are running from another
instance. Make sure that the local init/spfile file states:
instance=1
thread=1
8. Make sure the cluster_database=false parameter is set in the init/spfile
to re-create the controlfile.
9. Now we are ready to run the script. Connect to server manager on Node
1 and as internal or sys and execute the script:
SQL> @create_control.sql
If you get the "Statement processed" message, the database will be
opened with a brand new control file.
10. Make sure the cluster_database=true parameter is set in the init/spfile.
11. Start other instances.
12. At the earliest convenience, take a full backup of the database.
RELATED DOCUMENTS
-----------------
Note 1012929.6 - HOW TO RECREATE THE CONTROL FILE
Note 90321.1 - TFTS: Example Script to Create an OPS Database on UNIX
发表评论
-
11gR2 RAC dbca无法发现ASM磁盘组
2012-07-30 11:28 1415安装好Grid Infrastructure和Database ... -
RAC dbca无法发现ASM磁盘组
2012-07-30 11:20 0查看( 1501 ) / 评论( 10 ) / 评分( 0 / ... -
RAC优化要点
2011-01-19 23:03 1929RAC环境下,DB CACHE的命中率对系统的性能影响 ... -
11gR2 cluvfy tools usage
2011-01-05 03:01 1249Note that the following only s ... -
配置11gR2 RAC SCAN
2011-01-02 21:11 342411G RAC scan即用DNA解析的I ... -
CRS-0215: Could not start resource 'ora..vip' [ID 356535.1]
2010-12-17 17:34 3336Oracle Server - Enterprise Edit ... -
Oracle RAC选件技术的价值何在?
2010-07-14 11:38 1644随着IT技术的发展,网格计算目前已经成为一个热点,它所带来的低 ... -
怎样修改 SCAN信息(来自于metalink)
2010-06-06 00:34 1543Applies to: Oracle Server ... -
Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node [ID 27
2010-05-14 11:28 2334Applies to: Oracle Server ... -
How to Change Interconnect/Public Interface IP or Subnet in Oracle Clusterware [
2010-04-30 12:06 2424Applies to: Oracle Server ... -
10gR2 RAC Install issues on Oracle EL5 or RHEL5 or SLES10 (VIPCA / SRVCTL / OUI
2010-04-30 12:04 1548Applies to: Oracle Server ... -
RAC环境下listener无法启动案例分析
2010-04-26 21:24 2449RAC系统重新配置listener后无法启动: [root@ ... -
CRS-1019: Resource ora.rac02.ons (application) cannot run on rac01 问题解决
2010-04-25 16:15 2633[root@rac01 bin]# ./crs_stat -t ... -
AIX集群修改IP步骤
2010-04-25 01:50 4330集群修改IP步骤 环境: AIX 5L HACMP ... -
关于虚拟 IP
2010-04-23 11:14 1803关于虚拟 IP10g 中为什么使用虚拟 IP (VIP)?为什 ... -
RAC Ocfs2文件系统常见问题解决方法
2010-01-11 14:28 1590现象一:mount -t ocfs2 -o datavolum ... -
启动OCFS2时出错:o2cb_ctl Unable load configuration file
2010-01-11 14:22 2139操作系统版本:RedHat-AS5 ... -
RAC User Equivalence Check Failed
2010-01-11 14:17 1606在使用SSH方式配置RAC时,可能会在检查用户等价时失败。 ... -
ORACLE RAC:监听原理 简介
2010-01-11 14:15 3630RAC1 RAC2 都需需要配置监听,各自监听自己的 实例 ... -
Oracle集群文件系统(OCFS2)用户指南
2010-01-11 14:02 2791http://oss.oracle.com/projects/ ...
相关推荐
Oracle排错 DBCA建库诡异问题处理--rac环境不能创建rac库
一、rac 环境修改spfile位置 1. 从集群的任意一个实例登录,查看spfile信息 2. 重新创建新的spfile 3. 通过ASM命令行,查看spfile,并赋予别名。 4. 修改注册新的spfile文件: 5. 重启数据库 6. 查看结果 7. 查看...
aix下RAC环境巡检, 查看操作系统(AIX 文件系统是否合理) 查看操作系统是否打齐补丁 等
RAC环境下网卡绑定.可以直接修改配置文件,复制进系统目录即可使用
Oracle RAC 文件系统丢失重新安装操作系统情况下集群环境修复
模拟环境下RAC下开启归档详细记录,带图片
RAC 安装维护的 Metalink 必读文档
记录一次在Vmware ESXi6虚拟机环境下搭建oracle的RAC的过程
MetaLink-RMAN RAC Backup and Recovery using RMAN 希望对ORACLE使用者有点作用
【故障处理】BLOG_DBCA建库诡异问题处理--rac环境不能创建rac库.pdf【故障处理】BLOG_DBCA建库诡异问题处理--rac环境不能创建rac库.pdf
RHEL 7环境下19c RAC安装之udev规则配置ASM共享存储 RHEL 7环境下19c RAC安装之udev规则配置ASM共享存储 RHEL 7环境下19c RAC安装之udev规则配置ASM共享存储
浦东机场货运站核心数据库升级至Oracle RAC 11gR2。操作系统采用RedHat Enterprice Linux 6.3 x64,操作系统平台为x86-64。 Oracle网格管理器和数据库安装版本为11.2.0.3.,并且升级GI和DB至PSU 6,数据共享存储采用...
【OGG】RAC环境下配置OGG单向同步 (四).pdf【OGG】RAC环境下配置OGG单向同步 (四).pdf
yum源配置 Oracle RAC部署环境
RAC dbca静默建库所需的响应文件
基于Vmware workstation 环境下oracle 10g RAC测试环境搭建
Oracle12c双节点RAC在Linux7环境下的部署,本文档适用对象为 DBA 或具备一定 Linux/Oracle 基础知识的人员, 对 Oracle Enterprise Linux 操作系统下的 Oracle12.2.0.1 双节点 RAC 在 OEL 7.4 环境下的部署及初始化...
rac部署详解,配置系统环境,实例=SGA+PGA 单点故障问题.
已有文件系统单实例数据库的rman全备份,移植到RAC环境的ASM磁盘组中,删除RAC原有的数据库,完成新数据库在RAC中的注册。本文档中有详细的操作步骤,特别对容易出错的地方,将出错情况也列出来了。操作环境数据库...
Windows Server 2008 R2 X64环境下搭建双网络Oracle 12C R1 RAC+ASM