再谈oracle配置文件

oracle中几个基本的配置文件:
init.ora
initsid.ora
spfile.ora
spfilesid.ora
listener.ora--服务器端监听器的配置文件
sqlnet.ora
tnsnames.ora--客户端Net Service的配置文件

数据库启动时加载配置文件的顺序:
spfilesid.ora(编译过的文件)-->spfile.ora(编译过的文件)--〉pfile(文本)->initsid.ora(text)

改变spfile*.ora的内容使用alter system set...命令,不能手工使用文本编辑器进行修改
改变init*.ora可以直接使用文件编辑器进行修改
----------------------------------------------------------------------------------------------------
The tnsnames.ora is used to find a Net8 listener and connect to it and pass to
it the details of the database instance you would like to connect to.  It will
be found on the client side.  Note that a SERVER can be a client of another
database so it is typical to find it on the SERVER as well.
-----------------------------------------------------------------------------------------------------
The listener.ora is used to setup the configuration of the net8 listener.  to
specify the port it will listen on, give it the details of the databases it can
connect to and so on.  This file is on the SERVER only.
------------------------------------------------------------------------------------------------------
The sqlnet.ora is an optional file expressing more parameters about the
connection (eg: the trace level for debugging, the types of authentication you
would like to support and so on).  It may be found on the client or the server.
------------------------------------------------------------------------------------------------------
init.ora
        
The init.ora file stores the initialization parameters of Oracle. The values that
are currently in effect can be viewed through v$parameter.
The init.ora file is read when an instance (for example using startup in SQL*Plus).
Default location and name
The default location of init.ora is $ORACLE_HOME/dbs> on unix and %ORACLE_HOME%/database on Windows.
On Windows, the location can be changed by changing ORA_%ORACLE_SID%_PFILE.
The default name for the file is init$ORACLE_SID.ora (unix) or init%ORACLE_SID%.ora (windows)
However, it is possible to start the database with another init.ora file than the default one.
In this case, there is no way to determine which init.ora was used when the database is running (at least up to Oracle 9i).
Creating a PFILE from an SPFILE

create pfile='/some/path/init.ora' from spfile;

In order to execute create pfile one needs the sysdba role.
init.ora.55200519329
When the database is created with DBCA (Database creation assistant), DBCA will create an init.ora file to create the database.
Then it will create an spfile from that init.ora. Then it will rename the init.ora file into something like init.ora.55200519329
where 55200519329 is a timestamp of a sort. This init.ora.55200519329 will not be used by Oracle afterwards,
so modifiying it will not change the init parameters.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值