alter system set | reset

alter system set|reset

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.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22779291/viewspace-670663/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22779291/viewspace-670663/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值