【翻】【待】Startup and Parameter Files 2017-11-30

Startup and Parameter Files

Oracle uses two parameter files when starting the database:

  1. The ORAENV file, the environment definition file, which contains BS2000-specific information. In the ORAENV file you identify the database to be started, or shut down. You can use this file to set configuration variables, which adapt the Oracle Database to the local operating system and application environment.

  2. The initialization file INIT.ORA or the server parameter file SPFILE, which exists in all Oracle Database implementations and contains database-specific parameters.

This section describes the following:

5.2.1 The Environment Definition File ORAENV

The ORAENV file is identified by sid.P.ORAENV, where SID is the system identifier. The same ORAENV file must be used by SQL*Plus in BS2000 and by all background jobs. This is ensured by the installation procedures, which create the basic ORAENV file. Refer to Appendix B, "Oracle Environment Variables," for details of required and optional ORAENV variables.

If you use SQL*Plus in the POSIX shell, then the requested BS2000 parameters set in the ORAENV file must be specified. You can set the variables in the POSIX environment or use the facility to access the BS2000 ORAENV file.

When specifying the SID in the POSIX ORAENV filename, ensure that the SID in the filename and the ORACLE_SID variable use exactly the same case. For example, if you create a POSIX ORAENV file with the SID in the filename in uppercase, then you must set the ORACLE_SID using exactly the same SID.

$ echo '$ORADATA.ORCL.P.ORAENV' > $ORACLE_HOME/dbs/oraenvORCL
$ ORACLE_SID=ORCL
$ export ORACLE_SID
$ sqlplus /nolog
$ SQL> connect / as sysdba

Refer to "Starting Oracle Utilities in the POSIX environment" in Oracle Database User's Guide for Fujitsu BS2000/OSD, for more information about how to set POSIX environment variables.

5.2.2 The Initialization File INIT.ORA

Startup requires the INIT.ORA parameter file, which contains a list of specifications for the Oracle database. These generic, that is, platform independent parameters, are used to setup the instance and the database. Refer to Oracle Database Administrator's Guide and Oracle Database Reference for full descriptions of these parameters.

5.2.3 The Server Parameter File SPFILE

You can choose to maintain initialization parameters in a binary server parameter file. A server parameter file is initially built from a traditional text initialization parameter file using the CREATE SPFILE command. If you enter the following command:

CREATE SPFILE FROM PFILE;

where neither SPFILE name nor PFILE name is specified, then Oracle looks for a text initialization file sid.DBS.INIT.ORA and creates a server parameter file sid.DBS.SPFILE.ORA.

5.2.4 Using the Correct Initialization File

A default initialization file, called $ORAC1120.DEMO.DBS.INIT.ORA, is distributed with Oracle Database. During the database creation procedure, this file is copied to the DBA user ID and renamed, sid.DBS.INIT.ORA, where sid is the 1 to 4 character system ID you specified at the beginning of the database creation procedure.

Oracle determines the value of SID by retrieving the ORASID environment variable defined in the ORAENV file for the database. When you issue the STARTUP command with no PFILE clause, Oracle locates the initialization parameter file by examining file names in the following order:

  1. sid.DBS.SPFILE.ORA

  2. DBS.SPFILE.ORA

  3. sid.DBS.INIT.ORA

If you want to use some other initialization file, then use the argument PFILE. For example, to bring up a previously created database using an initialization file called TEST.INIT.ORA, enter the following:

/START-PROGRAM $ORAC1120.SQLPLUS
* /NOLOG

At the SQL*Plus prompt, enter:

SQL> CONNECT / AS SYSDBA
SQL> STARTUP PFILE=TEST.INIT.ORA

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31470016/viewspace-2148118/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31470016/viewspace-2148118/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值