- 浏览: 1019661 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (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 命令详解
Checked for relevance on 06-DEC-2007
PURPOSE
This article describes how you can recreate your controlfile.
SCOPE & APPLICATION
For DBAs who need 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.
Instructions:
=============
I. CREATING A NEW CONTROL FILE FROM THE EXISTING CONTROL FILE:
--------------------------------------------------------------
1. If you are running Oracle7 or higher you can get Oracle to generate
a script for you that enables you to recreate the controlfile. Run the
following command while the database is mounted or open and connected
as a user with DBA privileges:
% svrmgrl
SVRMGR> connect internal
SVRMGR> startup mount
SVRMGR> alter database backup controlfile to trace;
If you are running Oracle9i or higher you need to use sqlplus instead of
svrmgrl.
Oracle6 does not have this feature and therefore you will need to build
the CREATE CONTROLFILE statement yourself. The syntax is discussed in
detail in the Oracle SQL Reference Guide.
2. The trace file will be stored in the USER_DUMP_DEST destination,
which is set to "$ORACLE_HOME/rdbms/log" by default on Unix platforms.
To find out what USER_DUMP_DEST is set to, follow one of the following:
a) Look in the parameter file (init<SID>.ora on UNIX and Windows NT,
<node>_<ora_sid>_init.ora on VMS) for the parameter:
USER_DUMP_DEST = d:/oradata/orcl/trce/udump
b) Using SQL*PLus you can issue the following command:
SQL> SELECT value
2> FROM v$parameter
3> WHERE name = 'user_dump_dest';
VALUE
------------------------------------------------
d:/oradata/orcl/trace/udump
c) Using Server Manager you can issue the following command:
SVRMGR> show parameter <string>
SVRMGR> show parameter user_dump_dest;
The easiest way to locate the correct trace is to look at its date.
A file will exist with the current date and time. The naming
convention for these files is operating system specific.
Example:
--------
% cd $ORACLE_HOME/rdbms/log
% ls -l
-rw-r--r-- 1 osupport dba 2315 Oct 3 16:39 alert_p716.log
-rw-r--r-- 1 osupport dba 1827 Oct3 16:39 p716_ora_26220.trc
In this example, the file "p716_ora_26220.trc" is the trace file
produced that contains a script to create the control file.
NOTE: The trace file is handled a bit differently when issuing this
command from a connection to the database using shared server. The
shared server connection is created by PMON and the connection inherits
its environment, meaning the trace file will be created in the directory
referenced by the initialization parameter BACKGROUND_DUMP_DEST
instead of the USER_DUMP_DEST.
Use similar commands as given above to locate the directory
referenced in the BACKGROUND_DUMP_DEST.
3. Modify the trace file and use it as a script to create the control
file. Copy the trace file to a script file, such as "new_control.sql",
delete the header information prior to the words STARTUP NOMOUNT,
and make any other desired changes, such as increasing MAXDATAFILES,
MAXLOGFILES, etc.
Sample:
-------------------------- <start trace> -----------------------------
Dump file /u01/oracle/7.1.6/rdbms/log/p716_ora_26220.trc
Oracle7 Server Release 7.1.6.2.0 - Production Release
With the distributed and replication options
PL/SQL Release 2.1.6.2.0 - Production
ORACLE_HOME = /u01/oracle/7.1.6
ORACLE_SID = p716
Oracle process number: 9 Unix process id: 26220
System name: SunOS
Node name: tcsun2
Release: 5.4
Version: Generic_101945-27
Machine: sun4m
Tue Oct 3 16:39:13 1995
*** SESSION ID:(6.61)
# The following commands will create a new control file and use it
# to open the database.
# No data other than log history will be lost. Additional logs may
# be required for media recovery of offline data files. Use this
# only if the current version of all online logs are available.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "P716" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 8
MAXLOGHISTORY 800
LOGFILE
GROUP 1 '/u01/oracle/7.1.6/dbs/log1p716.dbf' SIZE 500K,
GROUP 2 '/u01/oracle/7.1.6/dbs/log2p716.dbf' SIZE 500K,
GROUP 3 '/u01/oracle/7.1.6/dbs/log3p716.dbf' SIZE 500K
DATAFILE
'/u01/oracle/7.1.6/dbs/systp716.dbf' SIZE 40M,
'/u01/oracle/7.1.6/dbs/tempp716.dbf' SIZE 550K,
'/u01/oracle/7.1.6/dbs/toolp716.dbf' SIZE 15M
;
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN;
---------------------- <end trace> ----------------------------------
4. Shutdown the database (NORMAL, IMMEDIATE, TRANSACTIONAL (Oracle8 only)
but not ABORT).
SVRMGR> shutdown immediate
If you are running Oracle9i or higher you need to use sqlplus instead of
svrmgrl.
5. Take a full database backup.
6. Rename/move the existing database controlfiles to a backup (The REUSE
option will overwrite the original files). The size of the controlfile
will be increased by increasing the value of MAXDATAFILES,
MAXLOGMEMBERS, etc.
Example:
--------
% cd $ORACLE_HOME/dbs
% mv ctrlV716.ctl ctrlV716.bak
7. Create the controlfile within Server Manager
SVRMGR> connect internal
SVRMGR> @new_control.sql
If you get the "Statement processed" message, the database will
be opened with a brand new control file.
If you are running Oracle9i or higher you need to use sqlplus instead of
svrmgrl.
8. At the first opportunity, shut the database down (normal, immediate or
transactional oracle8 only) and take a full backup.
II. CREATING A NEW CONTROL FILE WITHOUT AN EXISTING CONTROL FILE:
-----------------------------------------------------------------
CREATE CONTROLFILE SYNTAX:
The following is information on the create control file syntax. This
information is fully documented in the Oracle SQL Reference Manual.
CREATE CONTROLFILE [REUSE]
DATABASE name
[LOGFILE filespec [, filespec] ...]
RESETLOGS | NORESETLOGS
[MAXLOGFILES integer]
[DATAFILE filespec [, filespec] ...]
[MAXDATAFILES integer]
[MAXINSTANCES integer]
[ARCHIVELOG | NOARCHIVELOG]
[SHARED | EXCLUSIVE]
The complete procedure follows:
1. Take a full backup of the database, including all datafiles and redo
log files.
2. Go into SQL*DBA or Server Manager and do a STARTUP NOMOUNT.
3. Issue the CREATE CONTROLFILE statement.
Example:
--------
CREATE CONTROLFILE REUSE DATABASE "P716" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 50
MAXLOGMEMBERS 3
MAXDATAFILES 300
MAXINSTANCES 8
MAXLOGHISTORY 500
LOGFILE
GROUP 1 '/u01/oracle/7.1.6/dbs/log1p716.dbf' SIZE 1M,
GROUP 2 '/u01/oracle/7.1.6/dbs/log2p716.dbf' SIZE 1M,
GROUP 3 '/u01/oracle/7.1.6/dbs/log3p716.dbf' SIZE 1M
DATAFILE
'/u01/oracle/7.1.6/dbs/systp716.dbf' SIZE 40M,
'/u01/oracle/7.1.6/dbs/tempp716.dbf' SIZE 1M,
'/u01/oracle/7.1.6/dbs/toolp716.dbf' SIZE 15M ;
4. Perform media recovery on the database.
SVRMGR> recover database;
If you are running Oracle9i or higher you need to use sqlplus instead of
svrmgrl.
5. Open the database.
SVRMGR> alter database open;
If you are running Oracle9i or higher you need to use sqlplus instead of
svrmgrl.
6. At the first opportunity, shut the database down and take a full cold
backup.
Additional Errors:
------------------
ORA-205 ORA-7360 ORA-376 ORA-1110 ORA-1111
发表评论
-
sqlldr总结参数介绍
2012-06-28 14:29 22819有效的关键字: userid -- ORACLE use ... -
11gR2新特性:STANDBY_MAX_DATA_DELAY
2011-12-27 11:18 1210Active Data Guard 是 Oracle 11g ... -
Linux下用OCCI或OCI连接Oracle
2011-07-26 12:00 2898首先,去oracle官网下载C ... -
Oracle Mutex实现机制
2011-05-18 23:43 1064我们都知道Latch是Oracle ... -
local_listener参数作用
2011-05-10 17:19 1924pmon只会动态注册port等于1521的监听,否则 ... -
oracle伪列 rowid和rownum
2011-03-23 10:00 3531整理ROWID一 一,什么是伪列RowID?1,首先是一种数 ... -
Oracle10gR2 主备自动切换之客户端Failover配置
2011-01-20 10:32 9501. 主库检查和设置假设新增的服务名为ORCL_TAF.LK. ... -
Oracle10g配置Dataguard的相关参数解释
2011-01-20 10:24 1264参考自 http://space.itpub.ne ... -
wrap加密oracle包
2011-01-19 11:52 1296大家都知道oracle的很多系统包是没法看它的源码的,orac ... -
利用hcheck检查数据字典一致性状态
2011-01-17 17:42 1812利用hcheck可以检查oracle数据字典的一致性状态,主要 ... -
插入相同的数据量普通表和临时表产生的redo对比
2011-01-17 16:08 985往临时表里插入相同量 ... -
Database Link与GLOBAL_NAMES参数
2011-01-12 13:36 1027当GLOBAL_NAMES参数设置为TRUE时,使用DATAB ... -
Oracle Streams学习二(清除流配置)
2011-01-09 23:34 1179在完成streams部署之后,如果需要重新配置或舍弃配置,可以 ... -
red hat enterprise 下完全删除oracle 数据库
2011-01-05 01:28 1755步骤 1 以oracle用户登录主、备节点。步骤 2 ... -
Oracle常用dump命令
2010-12-20 00:31 831Oracle常用dump命令,记录一下备查。 一.M ... -
oracle执行DML(事物过程)的深入研究(二)
2010-12-14 15:02 1535接上一节的 oracle执行DML(事物过程)的深入研究(一) ... -
oracle执行DML(事物过程)的深入研究(一)
2010-12-14 10:26 2802用户所执行 DML (即执行事务)操作在 Oracle 内部按 ... -
Oracle基本数据类型存储格式研究(二)—数字类型
2010-12-14 00:35 1471数字类型包含number,intege ... -
Oracle基本数据类型存储格式研究(一)—字符类型
2010-12-13 23:32 11701.char char是定长字符型,内部代码是:96,最多可 ... -
关于oracle rowid的一些内容 -- 转载
2010-12-13 15:47 779本文讨论的是关于oracle ...
相关推荐
资源分类:Python库 所属语言:Python 资源全名:docker-recreate-1.4.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
How To Drop, Create And Recreate DB Control In A 10g Database [ID 278100.1] Metalink上下载
look forward to the next day when I could recreate the world.” 41 pau l a sch er “ I wanted to make wonderful things, things that other people liked, things that were important and mattered.”...
资源分类:Python库 所属语言:Python 资源全名:docker-recreate-1.4.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
Advanced This example shows how to create a proxy server to redirect the calls to another server without having to recreate the RODL file, thus allowing the use of the same types of the original ...
After learning how to set up a Raspberry Pi, you will begin by creating your own version of Flappy Bird and a clone of the classic game Pong in the Scratch programming language. You will also be ...
This feature provides more flexibility in modifying graph configurations without the need to recreate the entire graph. 10. **New Functionalities for Cooperative Groups** - Additional features for ...
• The user should be able to control how applications use the tablet. The user interface must be ef-ficient, consistent, and customizable. 2 DESIGN GOALS While the tablet interface design must ...
IMPORTANT : Version 0.6.x users and 0.7.0 users, please upgrade to 0.7.4 and RECREATE the database. News/Updates NEW version 0.7.5 available (28 May 2011) Fixes critical bugs about wrong line count,...
Additionally, do not attempt to recreate the logo or apply effects like drop shadows, outlines, or filters. The logo should retain its original typography, colors, and proportions. Incorrect usage ...
To add the RTC SDK paths to FPC, you will need to modify the file "xcode/<ProjectName>.xcodeproj/project.pbxproj". The path to the RTC SDK 揕ib?folder needs to be added as two new ?Fu?parameters. ...
After learning how to set up a Raspberry Pi, you will begin by creating your own version of Flappy Bird and a clone of the classic game Pong in the Scratch programming language. You will also be ...
WAMP5 is the unique utilities creation atmosphere which allows recreate the server where the elaborate content will be used. From a special section of this tool official website is offered to ...
Thanks to the unique tagging system, the asset can understand what type of components you are using in the layout and recreate them in your project scene. The asset includes a detailed guide to the ...
Ken Merriam, a visitor who grew up on a farm in Honduras, brings his children to Butler's Orchard to recreate the nostalgic feelings of his childhood and expose them to the rural life they might ...
also includes the OpenSSL binaries needed to support SSL. ICS V8 supports Delphi 64-bit and Mac OS-X projects. Note that latest C++ Builder version supported is XE3 (lack of spare time, sorry). ICS ...
Recovery Partition Creator 4.0.4 is used to recreate the "Recovery Partition" of macOS system on MBP,iMac and Mac Mini etc. It is compatible with the macOS10.9 or greater. It can work on the last ...
Moving focus to TcxDBSpinEdit placed in TdxBarControlContainerItem does not fire the OnExit and OnEnter events and, as a result, does not fire the OnGetText event of a dataset field bound to the ...
Today's filmmakers often want to recreate the idiosyncrasies of older recording methods, or are looking for something completely new, to differentiate the look of a given project. Furthermore, end-to...
2. **Please delete it and recreate it with the MUI Generator.警告** - **错误解释**:该警告指出流的多语言用户界面(MUI)信息未正确生成。 - **解决方法**:检查BD reauthor的MUI Generator路径是否正确设置...