|
背景:12c RAC强制安装mgmtdb,默认sga设置为1g,对于虚拟机测试来说,是很消耗内存的。
[grid@rac02 ~]$ export ORACLE_SID=-MGMTDB
[grid@rac02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 29 16:25:53 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
allow_group_access_to_sga boolean FALSE
lock_sga boolean FALSE
pre_page_sga boolean TRUE
sga_max_size big integer 1G
sga_min_size big integer 0
sga_target big integer 1G
unified_audit_sga_queue_size integer 1048576
SQL>
修改sga为400m
SQL>alter system set sga_target=400m scope=spfile;
重启数据库
[grid@rac02 ~]$ export ORACLE_SID=-MGMTDB
[grid@rac02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 29 16:25:53 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
SQL> startup;
ORA-00821: Specified value of sga_target 400M is too small, needs to be at least 508M
ORA-01078: failure in processing system parameters
SQL> exit
提示至少需要508M,那么重新修改下
SQL> create pfile='/home/grid/mgmtdb.ora' from spfile='+dgmgmt/_mgmtdb/parameterfile/spfile.270.947945345';
file create
启动mgmt数据库的时候报错,提示mgmtdb依赖于MGMTLSNR,而MGMTLSNR已经在运行状态
SQL> startup nomount pfile='/home/grid/mgmtdb.ora';
ORA-39510: CRS error performing start on instance '-MGMTDB' on '_mgmtdb'
CRS-2527: Unable to start 'ora.mgmtdb' because it has a 'hard' dependency on 'ora.MGMTLSNR'
CRS-2525: All instances of the resource 'ora.MGMTLSNR' are already running; relocate is not allowed because the force option was not specified
CRS-0222: Resource 'ora.mgmtdb' has dependency error.
clsr_start_resource:260 status:222
clsrapi_start_db:start_asmdbs status:222
SQL>
停止mgmtlsnr
[grid@rac01 ~]$ srvctl stop mgmtlsnr
[grid@rac01 ~]$
再次启动mgmt数据库提示无法创建审计文件
SQL> startup nomount pfile='/home/grid/mgmtdb.ora';
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
手工创建审计文件后重启数据库成功
SQL> startup nomount pfile='/home/grid/mgmtdb.ora';
ORACLE instance started.
Total System Global Area 536870912 bytes
Fixed Size 8794848 bytes
Variable Size 411045152 bytes
Database Buffers 113246208 bytes
Redo Buffers 3784704 bytes
SQL>
SQL> create spfile='+DGMGMT' from pfile='/home/grid/mgmtdb.ora';
File created.
|
|