日期:2014-05-16 浏览次数:20679 次
最近整理了一篇文章:oracle listener 有网友对数据库是否显式设置了instance_name和service_names提出疑问。
SQL> select * from v$version;
BANNER
--------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string ORCL
db_unique_name string ORCL
global_names boolean FALSE
instance_name string ORCL
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string ORCL
看到这么多参数,但是服务器参数(spfile)中仅仅设置了db_name那么其它的name比如db_unique_name,instance_name,service_names的值是怎么出来的?
官方是这样说的:When an Oracle instance starts, it reads initialization parameters from an initialization parameter file. This file must at a minimum specify the DB_NAME parameter. All otherparameters have default values.
-----------------------------------------------------------------------------------------------
SQL> create pfile='/u01/pfile.ora' from spfile;
File created.
[oracle@resoft u01]$ vi pfile.ora
ORCL.__db_cache_size=243269632
ORCL.__java_pool_size=4194304
ORCL.__large_pool_size=4194304
ORCL.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
ORCL.__pga_aggregate_target=293601280
ORCL.__sga_target=553648128
ORCL.__shared_io_pool_size=0
ORCL.__shared_pool_size=289406976
ORCL.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/ORCL/adump'
*.audit_trail='DB','EXTENDED'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/ORCL/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='ORCL'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
*.memory_target=847249408
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
各种name或者id的解释:--括弧内中文名称是我们一致认为比较合理的翻译,但是如果想准确的表达,请直接说英文名称,不要去翻译,以免造成误解。
Property Description
Parameter type String
Syntax