[20121207]实例与参数设置.txt

[20121207]实例与参数设置.txt

SQL> select * from v$version where rownum

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

SQL> show parameter 32k

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------
db_32k_cache_size                    big integer 0

SQL> host echo $ORACLE_SID
test

SQL> alter system set db_32k_cache_size=64M scope=spfile;
System altered.

$ strings spfiletest.ora| grep  32k
*.db_32k_cache_size=67108864

SQL> alter system set db_32k_cache_size=64M scope=spfile sid='test1';
System altered.

SQL> alter system set db_32k_cache_size=64M scope=spfile sid='xxx';
System altered.

$ strings spfiletest.ora| grep  32k
*.db_32k_cache_size=67108864
test1.db_32k_cache_size=67108864
xxx.db_32k_cache_size=67108864

--可以发现,我们可以建立任何实例的参数。

--删除不需要的参数:
SQL> alter system reset db_32k_cache_size  sid='*';
System altered.

$ strings spfiletest.ora| grep  32k
test1.db_32k_cache_size=67108864
xxx.db_32k_cache_size=67108864
--sid='*'参数并不删除其他实例的参数。

SQL> alter system reset db_32k_cache_size  sid='*';
alter system reset db_32k_cache_size  sid='*'
*
ERROR at line 1:
ORA-32010: cannot find entry to delete in SPFILE

SQL> alter system reset db_32k_cache_size  sid='xxx';
System altered.

SQL> alter system reset db_32k_cache_size  sid='test1';
System altered.


上一篇:ZooKeeper源码研究系列(5)集群版建立连接过程


下一篇:线程池源码分析-FutureTask