Oracle configuration file Introduction

Source: Internet
Author: User

Oracle configuration file Introduction

Profile file or. bash_profile file (system-level environment variable file:/home/Oracle );

Oratab file (oracle self-run file:/etc/oratab );

InitSID. ora or spfileSID. ora file (database instance initialization file: $ ORACLE_HOME/dbs/or $ oracle home \ database );

Listener. ora, sqlnet. ora, and tnsnames. ora (listener Configuration File: $ ORACLE_HOME/network/admin );

Alert. log File (Database warning log: $ ORACLE_BASE/diag/rdbms/db_name/SID/trace );

1. Environment Variable file/etc/profile

System-level environment variables are generally defined in the/etc/profile file, as follows:

Export ORACLE_BASE =/u01/app/oracle

Export ORACLE_HOME = $ ORACLE_BASE/product/8.1.7

Export PATH = $ PATH: $ ORACLE_HOME/bin

Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib

Export ORACLE_SID = topicis

Export ORACLE_TERM = vt100

Export ORA_NLS33 = $ ORACLE_HOME/ocommon/nls/admin/data

Export NLS_LANG = AMERICAN. ZHS16CGB231280

Note:

1. Pay attention to the sequence of definition when configuring the preceding environment variables. For example, if ORACLE_BASE is used for the definition of ORACLE_HOME, the definition of ORACLE_HOME should be after ORACLE_BASE;

2. When the Chinese version is used, the value of the environment variable NLS_LANG should be set to AMERICAN. ZHS16CGB231280; as shown above, when using the English version, you can remove export NLS_LANG = without setting NLS_LANG ...... that line. You can also set the value of NLS_LANG to AMERICAN_AMERICA.US7ASCII.

-------------------------------------- Split line --------------------------------------

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

-------------------------------------- Split line --------------------------------------

Ii. database self-starting file/etc/oratab

The/etc/oratab file describes the database instances created in the system and whether to use dbstart and dbshut to control the startup and shutdown of the instance. Ignore the comments starting with # as follows:

Topicis:/u01/app/oracle/product/8.1.7: Y

Here, topicis is the instance ID,/u01/app/oracle/product/8.1.7 is the ORACLE_HOME directory, and Y indicates that it is allowed, if dbstart and dbshut are set to N, the instance database topicis is not started or closed through dbstart and dbshut, the system requires that this parameter be changed to Y after ORACLE is installed to ensure that the ORACLE database is automatically started and closed;

3. database instance initialization parameter file spfileSID. ora (or spfile. ora or initSID. ora, which can be queried through show parameter pfile)

Each database instance has an initialization parameter file. Its default storage path is $ ORACLE_BASE/admin/<SID>/pfile, and its name is init <SID>. ora. For example, if the parameter file corresponding to the topicis instance is inittopicis. ora, the default storage path is $ ORACLE_BASE/admin/topicis/pfile.

In the first step of startup, oracle first looks for the parameter file, and then creates an Instance based on the settings in the parameter file, allocates memory, and starts the process of the day after tomorrow.

The initialization parameter file is a text file that contains instance configuration parameters. These parameters are set to specific values for initializing most memory and process settings for an Oracle instance.

First, the spfileSID. ora file is used as the initialization parameter file, and then spfile. ora and initSID. ora are selected respectively. If none of them exist, the Instance cannot be created or started.

In the parameter file, at least DB_NAME is required.

The following describes some main parameters:

1. Database Name of the Instance db_name = "topicis"

2. Instance name instance_name = topicis

3. name and location of the Database Control File (you can also use show parameter control_files to query the file)

Control_files = ("/u02/app/oracle/topicis/control01.ctl", "/u02/app/oracle/topicis/control02.ctl ", "/u02/app/oracle/topicis/control03.ctl ")

4. The number of SNP processes in the scheduling job queue and the interval between the awakening time of the SNP process.

JOB_QUEUE_PROCESSES = 2

JOB_QUEUE_INTERVAL = 60

5. Path for storing tracing and alarm files (you can query by show parameter dump_dest)

User_dump_dest specifies the storage path of the file that records the tracking and alarm information generated by the Oracle user process;

Background_dump_dest specifies the storage path of the file that records the tracing and alarm information generated by the Oracle background process;

Core_dump_dest specifies the storage path of the coredump file generated by Oracle running.

Background_dump_dest =/u02/app/oracle/admin/topicis/bdump

Core_dump_dest =/u02/app/oracle/admin/topicis/cdump

User_dump_dest =/u02/app/oracle/admin/topicis/udump

6 UTL_FILE_DIR

UTL_FILE_DIR = *

The UTL_FILE_DIR parameter specifies one or more directories for Oracle application file I/O, such as backing up data to a file, setting this value to * indicates that the directory for Oracle applications to perform file I/O operations is any directory. Therefore, backup data can be stored in any directory as long as space permits.

Iv. Listener Configuration File

To enable external processes, such as the topicis background program, to access the Oracle database, you must configure the Oracle network server environment by configuring listener. ora sqlnet. ora and tnsnames. ora consists of three files.

The storage path of listener. ora is $ ORACLE_HOME/network/admin.

The following is an example
 

LISTENER = # LISTENER name

(DESCRIPTION_LIST =


 

(DESCRIPTION =


 

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC ))

)

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = localhost. localdomain) (PORT = 1521 ))

)

)


 

(DESCRIPTION =

(PROTOCOL_STACK =

(PRESENTATION = GIOP)

(SESSION = RAW)

)


 

(ADDRESS =

(PROTOCOL = TCP) (HOST = localhost. localdomain) (PORT = 2481 ))

)

)


 

SID_LIST_LISTENER =

### Name of the listener defined above in the naming rule SID_LIST _ +, which defines the listener service, that is, which database instances provide the listener service

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc1)

(ORACLE_HOME =/u01/app/oracle/product/8.1.7)

(PROGRAM = extproc)

)


 

(SID_DESC =

(GLOBAL_DBNAME = topicis)

(ORACLE_HOME =/u01/app/oracle/product/8.1.7)

(SID_NAME = topicis)

)


 

(SID_DESC =

(GLOBAL_DBNAME = oid)

(ORACLE_HOME =/u01/app/oracle/product/8.1.7)

(SID_NAME = oid)

)

)


 

1 The listener. ora file defines a LISTENER whose default name is listener. This listener runs with the TCP/IP protocol address and the port number is 1521 by default. This default name is used for the listener defined in the listener file in the CAMS application, use the default protocol TCP/IP and the default port number 1521.

After configuring the listener file and the subsequent sqlnet. ora and tnsnames. ora files, you can start the listener defined in the listener file with the following command: $ lsnrctl start


 

The command to stop the listener is $ lsnrctl stop, and the command to monitor the current status of the listener is $ lsnrctl status.

When the lsnrctl status Command has the following output results:


 

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 8.1.7.4.0-Production

Start Date 17-JAN-2004 19:00:08

Uptime 31 days 15 hr. 27 min. 59 sec


 

The listener is running. Otherwise, the listener is stopped.


 

2. An ipc protocol address, as shown in (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC), is automatically set for external process calls during database installation and does not need to be changed.


 

3. There is also a SID_LIST_LISTENER segment at the end of the listener file to define the listener service, that is, for which database instances provide the listener service. Take the topicis instance as an example. The corresponding service information is:


 

(SID_DESC =

(GLOBAL_DBNAME = topicis) # Database Name

(ORACLE_HOME =/u01/app/oracle/product/8.1.7)

(SID_NAME = topicis) # database instance name

)

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.