无法更改Oracle参数

时间:2015-07-10 14:16:44

标签: oracle alter

由于以下参数,我无法在我的数据库中添加超过200个数据文件:

select records_total from v$controlfile_record_section where type = 'DATAFILE';
select value from v$parameter where name = 'db_files';

这两个都给我一个200的输出。我需要将此值增加到400,所以我尝试过:

alter system set records_total = 400 where name = 'db_files';
alter system set value= 400 where type = 'DATAFILE';

但我得到了 小号

QL Error: ORA-02065: illegal option for ALTER SYSTEM
02065. 00000 -  "illegal option for ALTER SYSTEM"
*Cause:    The option specified for ALTER SYSTEM is not supported
*Action:   refer to the user manual for option supported

我可以更改这些参数以及如何更改?

1 个答案:

答案 0 :(得分:1)

你可能想要使用这样的命令:

C:\Users\jonearles>sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 10 13:07:16 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show parameter db_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_files                             integer     200
SQL> alter system set db_files=400 scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1048576000 bytes
Fixed Size                  3053584 bytes
Variable Size             662702064 bytes
Database Buffers          377487360 bytes
Redo Buffers                5332992 bytes
Database mounted.
Database opened.
SQL> show parameter db_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_files                             integer     400
SQL>

这假设您正在使用SPFILE(或者您需要手动编辑init.ora文件并重新启动)并且您没有使用RAC(否则您将需要使用srvctl stop database -d my_sid之类的命令)

正如同样提到的,它可以帮助查看ALTER syntax。它也可能有助于查看Oracle Database Reference,它将告诉您命令是否是动态的(意味着它可以在不重新启动数据库的情况下运行)。