search
HomeDatabaseMysql TutorialOracle 缺失INITORCL及Oracle启动过程

该文件在数据库启动时创建,用于操作系统对数据库的锁定。当数据库启动时获得锁定,数 据库关闭时释放。在系统出现异常时,可能数

现象
 
C:\Users\陈>sqlplus "/as sysdba"
 
SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 10 13:31:28 2012
 
Copyright (c) 1982, 2010, Oracle. All rights reserved.
 
Connected to:
 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 -Production
 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> shutdown immediate
 
Database closed.
 
Database dismounted.
 
ORACLE instance shut down.
 
SQL> startup nomount
 
ORA-01078: failure in processing system parameters
 
LRM-00109: could not open parameter file 'E:\APP\CSWGGOD\PRODUCT\11.2.0\DBHOME_1
 
\DATABASE\INITORCL.ORA'
 
原因:缺失INITORCL.ORA
 
解决方法:
 
1.复制INITORCL.ORA文件
 
C:\Users\陈>E:
 
--------复制INITORCL.ORA备份文件
 
E:\app\cswggod\product\11.2.0\dbhome_1\database>copy E:\app\cswggod\admin\orcl\p
 
file\init.ora.7182012101127 INITORCL.ORA
 
已复制1 个文件。
 
E:\app\cswggod\product\11.2.0\dbhome_1\database>dir
 
驱动器E 中的卷是Workware
 
卷的序列号是027B-A992
 
E:\app\cswggod\product\11.2.0\dbhome_1\database 的目录
 
2012/10/10 13:34

.
 
2012/10/10 13:34 ..
 
2012/08/18 10:02 archive
 
2012/08/18 10:04 2,048 hc_orcl.dat
 
2012/10/08 15:51 1,973 INITORCL.ORA
 
2.启动数据库
 
C: \Users\陈>sqlplus "/as sysdba"
 
SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 10 13:31:28 2012
 
Copyright (c) 1982, 2010, Oracle. All rights reserved.
 
Connected to:
 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> startup nomount
 
ORACLE instance started.
 
Total System Global Area 1071333376 bytes Fixed Size 1375792 bytes Variable Size 528482768 bytes Database Buffers 536870912 bytes Redo Buffers 4603904 bytes SQL> shutdown immediate
 
ORA-01507: database not mounted
 
ORACLE instance shut down. SQL>
 
SQL> startup
 
ORACLE instance started.
 
Total System Global Area 1071333376 bytes Fixed Size 1375792 bytes Variable Size 528482768 bytes Database Buffers 536870912 bytes Redo Buffers 4603904 bytes Database mounted.
 
Database opened.
 
 
 
3.附录-数据库启动过程
 
1)NOMOUNT
 
这一步只和参数文件有关,如果在这一步就出现问题,那么通常可能是系统配置(如内核参 数等)存在问题,需要检查是否分配了足够的系统资源。
 
2)MOUNT
 
这一步需要从参数文件中获得控制文件位置,读取其中内容,校验数据文件的存在性。除此之外还会去校验口令文件。Oracle 缺省查找 orapw文件,如果该文件找不 到,则继续查找 orapw 文件,如果两者都不存在,数据库将出现错误。但数据为仍可以打 开。从 Oracle10g 开始,,当口令文件丢失后,Oracle 将不再提示错误,只是和口令文件相关 的部分功能将无法使用。
 
--------------------------------------------文件及作用---------------------------------------
 
该文件在数据库启动时创建,用于操作系统对数据库的锁定。当数据库启动时获得锁定,数 据库关闭时释放。在系统出现异常时,可能数据库已经关闭,但锁定并未释放,或者因为后 台进程未正常停止等原因,会导致下次数据库无法启动。解决办法就是重启服务器,或者手工释放共享内存段。
 
3)OPEN
 
这一步将进行检查点和完整性的检查。如果检查全部通过,则打开数据库,否则给出错误警 告,停止打开数据库。
 
-------------------------------------------------------数据库的启动验证--------------------------------------
 
○1 . 第一次检查数据文件头中的 Checkpoint CNT 是否与对应控制文件中的 Checkpoint CNT
 
一致。此步骤检查用以确认数据文件是否来自同一版本,而不是从备份中恢复而来
 
(在热备份模式下,数据文件检查点被冻结,但检查点计数不会被冻结,会一直修改) 在 Oracle10g 中用 8 级转储获得控制文件信息。
 
SQL> alter session set events 'immediate trace name controlf level 8';
 
在 Oracle9i 中用 10 级转储。
 
----------------------------------------------------------------------------------------------------------------------------
 
○2 . 第二次检查数据文件头的开始 SCN 和控制文件中记录的该文件的的结束 SCN 是否一致。如果一致,则不需要对那个文件进行恢复。
 
部分控制文件转储内容:
 
222 DATA FILE RECORDS
 
223 ***************************************************************************
 
224 (size = 428, compat size = 428, section max = 100, section in-use = 5,
 
225 last-recid= 8, old-recno = 0, last-recno = 0)
 
226 (extent = 1, blkno = 11, numrecs = 100)
 
227 DATA FILE #1:
 
228 (name #7) /u01/app/oracle/oradata/orcl/system01.dbf
 
229 creation size=0 block size=8192 status=0xe head=7 tail=7 dup=1
 
230 tablespace 0, index=1 krfil=1 prev_file=0
 
231 unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
 
232 Checkpoint cnt:52 scn: 0x0000.0007ba16 02/18/2011 16:30:22
 
233 Stop scn: 0xffff.ffffffff 02/16/2011 11:07:26
 
234 Creation Checkpointed at scn: 0x0000.00000009 06/30/2005 19:10:11
 
235 thread:0 rba:(0x0.0.0)
 
236 enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
 
----------------------------------------------------------------------------------------------------------------------------
 
在数据库出现问题时,提示中给出的可能是不完整的信息,而告警日志中则记录了完整的错 误过程和错误号。
 
说明:
 
控制文件中记录的 SCN 指最后一次成功完成的检查点 SCN; 数据文件头中的记录的 SCN 指数据文件最后一次成功完成的检查点 SCN;
 
此外,在控制文件和数据文件头都记录一个检查点计数(chkpt cnt),而且数据文件头还记录了一个 控制文件检查点计数(ctl cnt)。但这个 ctl cnt 要比控制文件中的 ctl cnt 小 1。这是因为,当检查
 
点更新控制文件和数据文件头上的 chkpt cnt 信息时,在更新控制文件之前,可以
 
获得当前的 ctl cnt
 
,这个信息被记入了数据文件。之所以这么做,是因为不能保证更新控制文件上的 chkpt cnt 一定 会成功,记录之前的 ctl cnt 可以确保上一次的 chkpt cnt 是成功 完成的。

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools