- 浏览: 1019621 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (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 1447安装好Grid Infrastructure和Database ... -
RAC dbca无法发现ASM磁盘组
2012-07-30 11:20 0查看( 1501 ) / 评论( 10 ) / 评分( 0 / ... -
RAC优化要点
2011-01-19 23:03 1959RAC环境下,DB CACHE的命中率对系统的性能影响 ... -
11gR2 cluvfy tools usage
2011-01-05 03:01 1283Note that the following only s ... -
配置11gR2 RAC SCAN
2011-01-02 21:11 347411G RAC scan即用DNA解析的I ... -
CRS-0215: Could not start resource 'ora..vip' [ID 356535.1]
2010-12-17 17:34 3378Oracle Server - Enterprise Edit ... -
Oracle RAC选件技术的价值何在?
2010-07-14 11:38 1670随着IT技术的发展,网格计算目前已经成为一个热点,它所带来的低 ... -
怎样修改 SCAN信息(来自于metalink)
2010-06-06 00:34 1569Applies to: Oracle Server ... -
Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node [ID 27
2010-05-14 11:28 2360Applies to: Oracle Server ... -
How to Change Interconnect/Public Interface IP or Subnet in Oracle Clusterware [
2010-04-30 12:06 2455Applies to: Oracle Server ... -
10gR2 RAC Install issues on Oracle EL5 or RHEL5 or SLES10 (VIPCA / SRVCTL / OUI
2010-04-30 12:04 1581Applies to: Oracle Server ... -
RAC环境下listener无法启动案例分析
2010-04-26 21:24 2477RAC系统重新配置listener后无法启动: [root@ ... -
CRS-1019: Resource ora.rac02.ons (application) cannot run on rac01 问题解决
2010-04-25 16:15 2673[root@rac01 bin]# ./crs_stat -t ... -
AIX集群修改IP步骤
2010-04-25 01:50 4398集群修改IP步骤 环境: AIX 5L HACMP ... -
关于虚拟 IP
2010-04-23 11:14 1835关于虚拟 IP10g 中为什么使用虚拟 IP (VIP)?为什 ... -
RAC Ocfs2文件系统常见问题解决方法
2010-01-11 14:28 1613现象一:mount -t ocfs2 -o datavolum ... -
启动OCFS2时出错:o2cb_ctl Unable load configuration file
2010-01-11 14:22 2195操作系统版本:RedHat-AS5 ... -
RAC User Equivalence Check Failed
2010-01-11 14:17 1653在使用SSH方式配置RAC时,可能会在检查用户等价时失败。 ... -
ORACLE RAC:监听原理 简介
2010-01-11 14:15 3665RAC1 RAC2 都需需要配置监听,各自监听自己的 实例 ... -
Oracle集群文件系统(OCFS2)用户指南
2010-01-11 14:02 2814http://oss.oracle.com/projects/ ...
相关推荐
1. **查看控制文件路径**:通过SQL查询`v$controlfile`视图或`SHOW PARAMETER control_files`命令获取当前控制文件的位置。 2. **备份控制文件**:关闭所有实例,启动一个实例到NOMOUNT状态,使用RMAN进行控制文件的...
### Oracle排错 DBCA建库诡异问题处理--rac环境不能创建rac库 #### 故障处理概述 本文主要探讨了在Oracle RAC环境中利用DBCA(Database Configuration Assistant)工具进行数据库创建时遇到的一个特殊问题——无法...
本文将重点讨论在AIX操作系统下进行RAC环境巡检的关键点,包括检查文件系统合理性、操作系统补丁更新以及rootvg镜像状态。 首先,我们需要关注的是AIX文件系统的合理性。在巡检过程中,应使用`df -m`命令查看所有...
在Oracle Real Application Clusters (RAC)环境中,网卡绑定是一...在提供的压缩包文件中,可能包含了具体的配置示例或指导文档,帮助用户更直观地了解如何在RAC环境下设置网卡绑定。请根据文件内容进一步学习和应用。
Vmware ESXi6虚拟机环境下搭建Oracle RAC的过程 在本文中,我们将记录一次在Vmware ESXi6虚拟机环境下搭建Oracle RAC的过程。Oracle RAC(Real Application Clusters)是一种高可用性解决方案,能够提供高性能和高...
与传统的单实例数据库不同,在RAC中,数据库实例可能使用ASM(Automatic Storage Management)来管理数据文件、日志文件和控制文件。因此,spfile也可能存储在ASM磁盘组中。 创建spfile的过程通常遵循以下步骤: 1...
对于RAC的安装与维护,Oracle官方的Metalink(现称My Oracle Support)提供了丰富的文档和技术支持,是进行RAC相关操作时不可或缺的资源。 ### 1. Patch Set Updates for Oracle Products (ID 854428.1) 这个文档...
Oracle 11GR2 RAC (Real Application Clusters) 和 RAC-DG (Data Guard) 环境的部署是一项复杂而关键的任务,涉及到多个层面的技术集成和配置。以下是根据提供的信息,对整个部署过程的详细说明: 1. **Oracle RAC ...
本文将详细介绍 RAC 环境中的 RMAN 备份与恢复,包括备份、恢复的区别、ASM 环境下的备份、恢复、裸设备上的备份、恢复等。 一、RAC 环境中的备份与恢复 在 RAC 环境中,备份和恢复的操作需要考虑到 RAC 环境的...
根据提供的文件内容,这是一份关于在AIX7.1操作系统下安装Oracle 11g RAC(Real Application Clusters)数据库,并包含补丁安装过程的详细指南。以下是从标题、描述、标签以及部分内容中提炼的知识点: ### Oracle ...
Oracle RAC数据库环境安装配置手册 For RHEL Oracle RAC(Real Application Clusters)是一种高可用性的数据库解决方案,能提供高性能和高可用性数据库服务。 Oracle RAC环境的安装配置是整个解决方案的关键步骤,...
ASM 盘是 Oracle RAC 中的一个关键组件,用于存储数据库的数据文件、日志文件和控制文件等。 在本文中,我们将介绍如何在 Oracle RAC 中增加 ASM 盘,并创建表空间。实验环境为虚拟机软件 Oracle VirtualBox 4.3.8...
在部署Oracle RAC环境时,操作系统的选择和配置是至关重要的第一步。以下将详细阐述Oracle RAC操作系统安装及部署的关键步骤。 1. **操作系统选择** Oracle RAC支持多种操作系统,如Red Hat Enterprise Linux ...
配置ASM实例时,需要指定存储盘组、控制文件位置等参数。同时,还需要创建并配置OCR和Voting Disk。 **2.5 安装Oracle数据库软件** 在安装Oracle数据库软件时,需要指定数据库实例的名称、监听器端口等关键参数。...
4. **资源池化**:所有节点共享同一个数据文件和控制文件,实现了资源的有效利用。 #### 二、单实例数据库与RAC集群数据库对比 **单实例数据库:** - **优势**:简单易用,管理成本低。 - **劣势**:难以满足高...
在本篇文档中,我们将探讨如何在Oracle RAC环境下,当其中一个节点的操作系统重新安装或文件系统损坏时,如何修复集群环境。这个问题涉及到的关键技术点包括Oracle RAC、操作系统恢复、集群资源管理以及数据库实例的...
接下来是数据库实例的创建,包括设置数据库参数,创建控制文件,初始化参数文件(SPFILE)。在部署过程中,还要注意权限设置,如Oracle用户和组的权限,以及文件系统的权限。安装完成后,需要进行性能调优,包括SQL...