Oracle configuration file introduction:
Profile file, oratab file, database instance initialization file initsid. ora, Listener Configuration File, sqlnet. ora file, tnsnames. ora File
1.2 introduction to major Oracle configuration files
1.2.1/etc/profile file
System-level environment variables are generally defined in the/etc/profile file in the cams system and database
The related environment variables are 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 = Cams
Export oracle_term = VT100
Export ora_nls33 = $ ORACLE_HOME/ocommon/NLS/admin/Data
Export nls_lang = American. zhs16cgb231280
& Description
1. When configuring the preceding environment variables, pay attention to the sequence defined, for example, ORACLE_HOME.
When oracle_base is used, the definition of ORACLE_HOME should be in
After oracle_base
2 when the Chinese version of cams is used, the value of the environment variable nls_lang should be set
American. zhs16cgb231280 can be
Remove the export nls_lang =... line without setting nls_lang.
Set the value of nls_lang to american_america.us7ascii.
1.2.2/etc/oratab File
The/etc/oratab file describes the database instances created in the current system and whether the database instances are created through dbstart and
Dbshut is used to control the startup and shutdown of the instance. The comments starting with # are ignored as follows:
Cams:/u01/APP/Oracle/product/8.1.7: Y
Cams is the instance id/u01/APP/Oracle/product/8.1.7, which is the ORACLE_HOME object.
You can use dbstart and dbshut to start and close the instance database.
N indicates that the cams System of the Instance database is not started or closed through dbstart and dbshut.
After installing Oracle, you must change this parameter to Y to ensure that the Oracle database is automatically started.
And disable
1.2.3 database instance initialization file initsid. ora
Each database instance has an initialization parameter file. Its default storage path is
$ Oracle_base/admin/<Sid>/pfile whose name is INIT <Sid>. ora such as Cams
In this example, the parameter file is initcams. ora and the path is
$ Oracle_base/admin/CAMS/pfile:/u01/APP/Oracle/admin/CAMS/pfile
However, in cams, The initcams. ora storage path is
/U02/APP/Oracle/admin/CAMS/pfile this is based on data and separate the application for better storage
Data Consistency can be guaranteed, especially in the cams dual-Host application mode.
For specific modification operations, refer to the Linux and Oracle Installation manuals.
The initialization parameter file is a text file that contains instance configuration parameters. These parameters are set to special
The fixed value is used to initialize the majority of memory and process settings of the Oracle instance. The following are some main parameters:
Number Description
1. Database Name of the Instance
Db_name = "cams"
2. Instance name
Instance_name = Cams
3. name and location of the Database Control File
Control_files = ("/u02/APP/Oracle/oradata/CAMS/control01.ctl ",
"/U02/APP/Oracle/oradata/CAMS/control02.ctl ",
"/U02/APP/Oracle/oradata/CAMS/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
User_dump_dest specifies the file that records the tracking and alarm information generated by the Oracle user process
The storage path background_dump_dest specifies to record the tracing and
The file storage path of the alarm information is core_dump_dest, which specifies the core generated by the Oracle operation.
Dump File Storage path
Background_dump_dest =/u02/APP/Oracle/admin/CAMS/bdump
Core_dump_dest =/u02/APP/Oracle/admin/CAMS/cdump
User_dump_dest =/u02/APP/Oracle/admin/CAMS/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 backup
Set this value to * in the cams system to indicate that the data is available to Oracle
The directory used for file I/O operations is any directory, so as long as the space permits the number of backups
Store data in any directory
1.2.4 Listener Configuration File
To enable external processes such as the cams background program to access the Oracle database
Set the Oracle network server environment to configure the Oracle network server environment through the configuration
Listener. ora sqlnet. ora and tnsnames. ora
That is, the Listener Configuration File. In this section, the other two files are described in the following two sections.
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 _ +
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc1)
(ORACLE_HOME =/u01/APP/Oracle/product/8.1.7)
(Program = EXTPROC)
)
(Sid_desc =
(Global_dbname = CAMs)
(ORACLE_HOME =/u01/APP/Oracle/product/8.1.7)
(Sid_name = CAMs)
)
(Sid_desc =
(Global_dbname = OID)
(ORACLE_HOME =/u01/APP/Oracle/product/8.1.7)
(Sid_name = OID)
)
)
& Description
1 listener. the ora file defines a listener whose default name is listener, by default, this listener uses the TCP/IP protocol address and the port number is 1521. This default name is used for the listener defined in the listening file of the cams application, and the default protocol TCP/IP is used.
And the default port number. 1521 after the listener file is configured and the subsequent sqlnet. ora and tnsnames. ora files are described, you can use the following command to start the listener defined in the listener file.
$ LSNRCTL start
The command to stop the listener is
$ LSNRCTL stop
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
It indicates that the listener is running. Otherwise, it indicates that the listener has stopped. the normal operation of the background program of the cams system depends not only on the running of the database instance, but also on the running of the Database Listener. If the listener is not started, the cams background program still cannot work even if the database is started.
2. An IPC Protocol address listener (address = (Protocol = IPC) (Key = EXTPROC) is used for external process calls, it is automatically set during database installation and does not need to be changed.
3. There is also a sid_list_listener segment at the back of the listener file, which defines the listener service, that is, which database instances provide the listener service. Taking the cams instance as an example, the corresponding service information is:
(Sid_desc =
(Global_dbname = CAMs) # Database Name
(ORACLE_HOME =/u01/APP/Oracle/product/8.1.7)
(Sid_name = CAMs) # database instance name
)
1.2.5 sqlnet. ora File
The path for storing the sqlnet. ora file is $ ORACLE_HOME/Network/admin.
Examples
Names. default_domain = localdomain
Names. directory_path = (tnsnames, onames, hostname)
& Description
Names. default_domain specifies the network domain name, names. directory_path specifies the naming method when the client connection identifier is parsed. Naming metthods adopts the priority order, which is descending from left to right. In CAMs applications, these two parameters use the system default values shown above.
1.2.6 tnsnames. ora File
The storage path of the tnsnames. ora file is below $ ORACLE_HOME/Network/admin.
Is an example
Oid. localdomain =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = localhost. localdomain) (Port =
1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = OID)
)
)
Cams. localdomain =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = localhost. localdomain) (Port =
1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = CAMs)
)
)
Instanchttp.localdomain =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = localhost. localdomain) (Port =
1521 ))
)
(CONNECT_DATA =
(Server = shared)
(SERVICE_NAME = modose)
(Presentation = http: // admin)
)
)
Extproc_connection_data.localdomain =
(Description =
(Address_list =
(Address = (Protocol = IPC) (Key = EXTPROC ))
)
(CONNECT_DATA =
(SID = plsextproc1)
(Presentation = Ro)
)
)
& Description
The tnsnames. ora file defines one or more network services for the net service and cams instances as follows:
Cams. localdomain =
(Description =
(Address_list =
(Address =
(Protocol = TCP)
(Host = localhost. localdomain)
(Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = CAMs)
)
)
Note that the address item contains three sub-parameters.
Protocol: default protocol TCP
HOST: IP Address
Port: port. The default value is 1521.
Cams. localdomain is the data name
Make sure that there is a corresponding address item in the listening file that also contains the same three sub-parameters, and the values of the sub-parameters are equal, here, the value of SERVICE_NAME must be equal to the value of sid_name under the sid_desc item in the listening file.
Original post http://www.4vava.cn/html/database/oracle/20070530/62859.html