当oracle实例启动时,需要读取初始化参数文件,参数文件至少要指定DB_NAME参数。其它参数均为默认值。官方文档提到这样一句话:The initialization parameter file can be either a read-only text file, a PFILE, or a read/write binary file.The binary file is called a server parameter file. A server parameter file enables you to change initialization parameters with ALTER SYSTEM commands and to persist the changes across a shutdown and startup. It also provides a basis for self-tuning by Oracle Database. For these reasons, it is recommended that you use a server parameter file. You can create one manually from your edited text initialization file, or automatically by using Database Configuration Assistant (DBCA) to create your database.初始化文件既可以是只读的文本文件,也可以使PFILE参数文件,或者是可读写的二进制文件。二进制文件为server parameter file 即我们常说的spfile,该文件中的参数需要通过ALTER SYSTEM修改,并且重启后生效。the Oracle instance first searches for a server parameter file in a default location, and if it does not find one, searches for a text initialization parameter fileoracle启动的时候会自动去默认目录下查找SPFILE,找不到的时候再找pfileYou can also override an existing server parameter file by naming a text initialization parameter file as an argument of the STARTUP command.也可以在使用startup命令时指定读取pfile的来覆盖spfile中定义的参数。默认目录是在ORACLE_HOME/dbs下,命名规则为initORACLE_SID.ora参数的格式为parameter_name=(value[,value]....)Parameter values of type string must be enclosed in single quotes ('). Case (upper or lower) in filenames is significant only if case is significant on the host operating system.参数值如果为字符串的必须用单引号引用。大小写区别取决于系统。If you repeat a parameter that does not accept multiple values, then only the last value specified takes effect.对于不允许重复的参数,仅以最后一条给定的值为准。全局数据库名可以是主机名加域名如: ts.cn.example.comDB_NAME='ts'DB_DOMAIN='cn.example.com'DB_NAME必须是字符串且不能大于8个字符。数据库创建过程中,DB_NAME被写入数据文件,重做日志文件和控制文件中,所以当数据库启动时如果DB_NAME与数据文件中的名字不同,数据库将无法启动。
oracle创建参数文件,ORACLE初始化参数文件介绍
最新推荐文章于 2024-02-17 21:36:33 发布