我们知道,oracle在启动过程中,需要读取参数文件(pfile/spfile)来创建实例.oracle在启动过程中,寻找参数文件的顺序为:spfile.ora,spfile.ora,init.ora. 而创建实例的过程中,oracle需要的最少参数为一个,即db_name参数. 我们来看一个测试,启动一个任意设置的实例,本例oracle_sid=julia: [oracle@jumper dbs]$ export oracle_sid=julia [oracle@jumper dbs]$ sqlplus "/ as sysdba" sql*plus: release 9.2.0.4.0 - production on mon may 8 11:08:36 2006 copyright (c) 1982, 2002, oracle corporation. all rights reserved. connected to an idle instance. sql> startup nomount. ora-01078: failure in processing system parameters lrm-00109: could not open parameter file ’/opt/oracle/product/9.2.0/dbs/initjulia.ora’
oracle最后检查的文件为initjulia.ora,让我们创建这个文件,然后数据库实例即可创建: sql> ! echo "db_name=julia" > /opt/oracle/product/9.2.0/dbs/initjulia.ora sql> startup nomount. oracle instance started. total system global area 97588504 bytes fixed size 451864 bytes variable size 46137344 bytes database buffers 50331648 bytes redo buffers 667648 bytes