2015-07-10 40 views
0

我無法在我的數據庫中添加,因爲這些參數的200個多名數據文件:無法改變的Oracle參數

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 

我是否能夠改變這些參數,以及如何?

+3

閱讀文檔:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_2014.htm#SQLRF00902 ALTER SYSTEM命令中沒有「WHERE」選項..你的意思是「SCOPE 「?也許......但認真:如果你不是DBA,你應該和你的DBA交談......這是DBA的東西......如果你是DBA ......你需要更多的閱讀文檔並做好功課; ) 大聲笑 – Ditto

回答

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,它會告訴您命令是否是動態的(意味着它可以在不重新啓動數據庫的情況下運行)。