【文章內(nèi)容簡(jiǎn)介】
但oradim沒提供這個(gè)選項(xiàng),于是啟動(dòng)sqlplus。C:\sqlplus /nologSQL*Plus: Release Production on 星期三 4月 11 10:49:13 2007Copyright (c) 1982, 2004, Oracle. All rights reserved.SQL connect /as sysdbaERROR:ORA12560: TNS:protocol adapter errorSQL connect sys/mydb as sysdbaERROR:ORA12560: TNS:protocol adapter errorSQL exitC:\set oracle_sid=mydbC:\sqlplus /nologSQL*Plus: Release Production on 星期三 4月 11 10:50:21 2007Copyright (c) 1982, 2004, Oracle. All rights reserved.SQL conn sys/mydb as sysdbaConnected. SQL startup nomountORA01078: failure in processing system parametersLRM00109: could not open parameter file 39。D:\Oracle\product\\admin\mydb\pfile39。SQL startup nomount pfile=d:\oracle\product\\admin\mydb\pfile\ORA01081: cannot start alreadyrunning ORACLE shut it down firstSQL shutdownORA01507: database not mountedORACLE instance shut down.SQL startup nomount pfile=d:\oracle\product\\admin\mydb\pfile\ORACLE instance started.Total System Global Area 171966464 bytesFixed Size 787988 bytesVariable Size 145750508 bytesDatabase Buffers 25165824 bytesRedo Buffers 262144 bytes》因?yàn)槊看味家付╬file不方便,可以創(chuàng)建一個(gè)C:\sqlplus /nologSQL*Plus: Release Production on 星期三 4月 11 11:02:57 2007Copyright (c) 1982, 2004, Oracle. All rights reserved.SQL conn sys/mydb as sysdbaConnected to an idle instance.SQL create spfile from pfile。create spfile from pfile*ERROR at line 1:ORA01078: failure in processing system parametersLRM00113: error when processing file39。D:\Oracle\product\\admin\mydb\pfile39。LRM00109: could not open parameter file39。D:\Oracle\product\\admin\mydb\pfile39?!飞厦娴腻e(cuò)誤原因是第二步造成的,其中IFILE=....\才行。SQL create spfile from pfile。File created.》再啟動(dòng),不用指定pfile了SQL startup nomountORACLE instance started.......SQL shutdown immediateORA01507: database not mountedORACLE instance shut down.》重新啟動(dòng)機(jī)器后,orcl數(shù)據(jù)庫(kù)總是顯示為已啟動(dòng),mydb為未啟動(dòng)狀態(tài)這種情況下orcl其實(shí)是一個(gè)空閑進(jìn)程,數(shù)據(jù)庫(kù)nomount階段,mydb則沒啟動(dòng)進(jìn)程,所要連接到mydb會(huì)出現(xiàn)如下錯(cuò)誤:SQL conn sys/mydb as sysdbaERROR:ORA12560: TNS:protocol adapter error可從服務(wù)管理器中啟動(dòng)OracleServicemydb則可以連接了。