oracle 中 alter system set|reset____oracle

來源:互聯網
上載者:User


1。 在set和reset 的時候先指定scope,在指定sid參數前面,否則會出錯。

SQL> show parameter open_cursors;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_cursors                         integer     300

SQL> alter system set open_cursors=400 sid='*' scope=both;
alter system set open_cursors=400 sid='*' scope=both
                                          *
ERROR at line 1:
ORA-02065: illegal option for ALTER SYSTEM


SQL> alter system set open_cursors=400 scope=both sid='*';

System altered.


SQL> alter system reset open_cursors;
alter system reset open_cursors
                              *
ERROR at line 1:
ORA-00905: missing keyword


SQL> alter system reset open_cursors scope=both;
alter system reset open_cursors scope=both
                                         *
ERROR at line 1:
ORA-00905: missing keyword


SQL> alter system reset open_cursors sid='*' scope=both;
alter system reset open_cursors sid='*' scope=both
                                        *
ERROR at line 1:
ORA-00933: SQL command not properly ended


SQL> alter system reset open_cursors scope=both sid='*';
alter system reset open_cursors scope=both sid='*'
*
ERROR at line 1:
ORA-32009: cannot reset the memory value for instance * from instance orcl


SQL> alter system reset open_cursor sid='*' scope=spfile;
alter system reset open_cursor sid='*' scope=spfile
*
ERROR at line 1:
ORA-00922: missing or invalid option

SQL> alter system reset open_cursors scope=spfile sid='*';

System altered.

2。 使用reset時必須指定sid,否則會出錯

SQL> alter system set open_cursors=1000 scope=both;

System altered.

SQL> show parameter open_cursors;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_cursors                         integer     1000
SQL> alter system reset open_cursors scop=spfile;
alter system reset open_cursors scop=spfile
                                *
ERROR at line 1:
ORA-00905: missing keyword


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


SQL> alter system reset open_cursors scope=spfile sid='*';

System altered.

SQL> alter system reset open_cursors scope=memory sid='orcl';

System altered.

3。在使用reset的時候如如果scope為memory,both的時候sid不能使用*


SQL> alter system set open_cursors=500 scope=both;

System altered.

SQL> show parameter open_cursors

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_cursors                         integer     500
SQL> alter system reset open_cursors scope=both sid='*';
alter system reset open_cursors scope=both sid='*'
*
ERROR at line 1:
ORA-32009: cannot reset the memory value for instance * from instance orcl


SQL> alter system reset open_cursors scope=memory sid='*';
alter system reset open_cursors scope=memory sid='*'
*
ERROR at line 1:
ORA-32009: cannot reset the memory value for instance * from instance orcl


SQL> alter system reset open_cursors scope=memory sid='orcl'; System altered.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.