/////////////////
// 3、启动数据库实例
/////////////////
###将参数文件创建到dg的spfile
***initajxbcv1.ora内容
sga_target=500M
db_block_size=8192
db_name=shajx
instance_name=ajxbcv1
control_files='+AJXDG1/sys/control01.ctl','+AJXDG2/sys/control02.ctl'
cluster_database=FALSE
***create spfile from pfile
sqlplus '/as sysdba'
startup mount;
create spfile='+SPDG' from pfile='$ORACLE_HOME/dbs/initajxbcv1.ora'
###找到spfile的存放路径,将此路径放到初始化参数文件
ASMCMD> pwd
+spdg/SHAJX/PARAMETERFILE
ASMCMD> ls -l
Type Redund Striped Time Sys Name
PARAMETERFILE UNPROT COARSE JUL 22 19:00:00 Y spfile.257.885757443
###初始化参数文件initajxbcv1.ora调整为只包含如下内容
spfile='+spdg/SHAJX/PARAMETERFILE/spfile.257.885757443'
###将数据库资源添加到oracle restart环境,启动数据库
srvctl add database -d shajx -o $ORACLE_HOME -i ajxbcv1
srvctl start database -d shajx
###检查db资源已经online
grid@qc26702a:/home/grid>crsctl status res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.AJXDG1.dg
ONLINE ONLINE qc26702a
ora.AJXDG2.dg
ONLINE ONLINE qc26702a
ora.SPDG.dg
ONLINE ONLINE qc26702a
ora.asm
ONLINE ONLINE qc26702a Started
ora.ons
OFFLINE OFFLINE qc26702a
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE qc26702a
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE qc26702a
ora.shajx.db
1 ONLINE ONLINE qc26702a Open