alter system reset

Clearing Initialization Parameter Values

You can use the ALTER SYSTEM RESET command to clear (remove) the setting of any initialization parameter in the SPFILE that was used to start the instance. Neither SCOPE=MEMORY nor SCOPE=BOTH are allowed. The SCOPE = SPFILE clause is not required, but can be included.

You may want to clear a parameter in the SPFILE so that upon the next database startup a default value is used.

清除spfile 文件中的参数,不能使用scope=memory 和 scope=both,  下次启动数据库的时生效。


SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

SQL> show parameter db_create_file_dest 

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
db_create_file_dest                  string

SQL> alter system set db_create_file_dest='/home/oracle';

System altered.

SQL> alter system reset db_create_file_dest;

System altered.

SQL> show parameter db_create_file_dest 

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
db_create_file_dest                  string
/home/oracle
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  417546240 bytes
Fixed Size                  2213936 bytes
Variable Size             377489360 bytes
Database Buffers           33554432 bytes
Redo Buffers                4288512 bytes
Database mounted.
Database opened.
SQL> show parameter db_create_file_dest 

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
db_create_file_dest                  string

SQL> 


连接到: 
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

SQL> alter system set db_create_file_dest='/home/oracle';

系统已更改。

SQL> alter system reset db_create_file_dest;
alter system reset db_create_file_dest
                                     *
第 1 行出现错误:
ORA-00905: 缺失关键字


SQL> alter system reset db_create_file_dest scope=spfile;
alter system reset db_create_file_dest scope=spfile
                                                  *
第 1 行出现错误:
ORA-00905: 缺失关键字


SQL> alter system reset db_create_file_dest sid=oratest1 scope=spfile;
alter system reset db_create_file_dest sid=oratest1 scope=spfile
                                           *
第 1 行出现错误:
ORA-01780: 要求文字字符串


SQL> alter system reset db_create_file_dest sid='oratest1' scope=spfile;
alter system reset db_create_file_dest sid='oratest1' scope=spfile
                                                      *
第 1 行出现错误:
ORA-00933: SQL 命令未正确结束


SQL> alter system reset db_create_file_dest scope=spfile sid='oratest1';
alter system reset db_create_file_dest scope=spfile sid='oratest1'
*
第 1 行出现错误:
ORA-32010: 无法在 SPFILE 中找到要删除的条目


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

系统已更改。

在10g 里面 alter system reset 命令必须跟 scope 和 sid ,scope 在 sid 前面


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

huangliang0703

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值