一、ORACLE_SID:
1.文档链接:
http://docs.oracle.com/cd/E11882_01/win.112/e10845/registry.htm
http://docs.oracle.com/cd/E11882_01/server.112/e25494/dba.htm
2. 文档解释:
ORACLE_SID: Specifies the name of the Oracle Database instance on the host computer. The value of this parameter is the SID for the instance. The default value is specified by the entry in the Database Identification window of Oracle Universal Installer.
3.个人 理解:
第一:ORACLE_SID参数的值为实例的SID,其主要的作用就是协助client process找到将要启动的数据库实例的参数文件spfile.ora或init.ora.大多数情况下我们都会设置这个值,若该值未设定,将报如下错误:
ORA-12162: TNS:net service name is incorrectly specified
第二:若client process远程访问数据库,通过监听器的静态监听,也将获得SID值,即也能确定参数文件spfile.ora或init.ora.
综上,client process可以通过上述两种方式来获取将要启动的实例SID值,为接下来的实例启动做好准备。
二、DB_NAME:
1.文档链接:
http://docs.oracle.com/database/121/REFRN/refrn10041.htm#i1126530
2.文档解释
DB_NAME specifies a database identifier of up to 8 characters. This parameter must be specified and must correspond to the name specified in the CREATE DATABASE statement.
If you have multiple databases, the value of this parameter should match the Oracle instance identifier of each one to avoid confusion with other databases running on the system. The value of DB_NAME should be the same in both the standby and production initialization parameter files.
The database name specified in either the STARTUP command or the ALTER DATABASE ... MOUNT statement for each instance of the cluster database must correspond to the DB_NAME initialization parameter setting.
3.个人理解:
第一:参数文件里含有DB_NAME信息和控制文件信息,创建参数文件时指定俩参数值,当启动实例时,读入到实例中。
第二:控制文件里含有DB_NAME信息,是在创建数据库执行CREATE DATABASE时写入的。
第三:当实例将控制文件里的DB_NAME拿出来和启动过程中从参数文件里读取到的DB_NAME做对比,发现俩值一致,则可以到达mount状态,若不一致,则报错。
综上:ORACLE参数文件里写的DB_NAME需要和参数文件里写的控制文件里的DB_NAME一致。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30167136/viewspace-1482377/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30167136/viewspace-1482377/