大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
修改了oracle的sga大小之后,遇到了一系列的报错。
创新互联是一家集网站建设,竹山企业网站建设,竹山品牌网站建设,网站定制,竹山网站建设报价,网络营销,网络优化,竹山网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。
00844和00851报错
SQL> startup;
ORA-00844: Parameter not taking MEMORY_TARGET into account
ORA-00851: SGA_MAX_SIZE 2147483648 cannot be set to more than MEM
SQL>
01078报错
SQL> startup;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.4/db_1/dbs/inittest.ora'
在测试的时候,插入大量数据发现30009错误,我以为是sga小导致的
SQL> insert into t select rownum from dual connect by level<=10000000;
insert into t select rownum from dual connect by level<=10000000
*
ERROR at line 1:
ORA-30009: Not enough memory for CONNECT BY operation
Elapsed: 00:00:13.51
SQL>
查看sga
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 1584M
sga_target big integer 1G
SQL>
查看pga
SQL> show parameter pga
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
pga_aggregate_target big integer 0
SQL>
更改sga
SQL> alter system set sga_max_size=2048M scope=spfile;
System altered.
Elapsed: 00:00:00.06
SQL>
关闭和启动数据库
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORA-00844: Parameter not taking MEMORY_TARGET into account
ORA-00851: SGA_MAX_SIZE 2147483648 cannot be set to more than MEMORY_TARGET 1660944384.
结果出错了。经过查找资料,发现11g
新增了个参数MEMORY_TARGET
,其大小等于PGA+SGA
,当sga
的大小大于MEMORY_TARGET
就会报如上错误。
查看MEMORY_TARGET
大小,发现大小为1584M,与sga不符。
SQL> show parameter memory_target;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
memory_target big integer 1584M
SQL>
修改spfile
文件中的参数
sga_max_size=1653604352
启动数据库
SQL> startup nomount;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.4/db_1/dbs/inittest.ora'
SQL>
启动后遇到了01078
报错。解决办法如下:
将test
(实例名)文件夹下的init.ora.xxx
文件复制到dbs
目录下即可,复制后的名字按照之前报错的提示输入。
[oracle@localhost ~]$ cp /u01/app/oracle/admin/test/pfile/init.ora.922018114616 /u01/app/oracle/product/11.2.4/db_1/dbs/inittest.ora
启动数据库
SQL> startup;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2213896 bytes
Variable Size 956303352 bytes
Database Buffers 687865856 bytes
Redo Buffers 7135232 bytes
Database mounted.
Database opened.
SQL>
归根结底还是对数据库原理不熟导致的,牢记memory_target
值需为sga+pga
内存的和。