[20170120]db_unique_name与大小写.txt
--通过例子说明:
1.环境:
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> alter system set db_unique_name=book ;
alter system set db_unique_name=book
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
--这个参数仅仅修改spfile,重启才生效.
SYS@book> show parameter db_unique_name
NAME TYPE VALUE
-------------- ------ ------
db_unique_name string book
--//可以发现我设置是小写,缺省你不设置好像也是小写.
2.测试:
SYS@book> alter system set db_unique_name=book scope=spfile;
System altered.
$ strings spfilebook.ora| grep -i db_unique_name=
*.db_unique_name='BOOK'
--//可以发现现在是大写.
--//要设置小写,必须这样写引号.
SYS@book> alter system set db_unique_name='book' scope=spfile;
*.db_unique_name='book'
--//取消设置.
SYS@book> alter system reset db_unique_name;
3.重启数据库:
SYS@book> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
Database opened.
--// 设置大写.重启数据库看看.
-------------- ------ -------
db_unique_name string BOOK
--//不过一些参数并没有这个改变而发生变化:
SYS@book> show parameter dump
NAME TYPE VALUE
-------------------- ------- -------------------------------------------
background_core_dump string partial
background_dump_dest string /u01/app/oracle/diag/rdbms/book/book/trace
core_dump_dest string /u01/app/oracle/diag/rdbms/book/book/cdump
max_dump_file_size string unlimited
shadow_core_dump string partial
user_dump_dest string /u01/app/oracle/diag/rdbms/book/book/trace
--//我个人估计对dg应该也没有什么影响.
--//instance_name也是一样的效果,大家可以自己测试.