[20121207]例項與引數設定.txt

lfree發表於2012-12-07
[20121207]例項與引數設定.txt

SQL> select * from v$version where rownum<=1;

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.


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-750726/,如需轉載,請註明出處,否則將追究法律責任。

相關文章