🍍Fix Oracle Service handle not Initialized

ในกรณีที่เราทำการ Query Data บน Oracle Database แล้วไม่สามารถทำการ Query ได้ เนื่องจาก Service Name ทำการ Connect Database ผิด ทำให้เกิด Service Handle not Initialized ส่งผลให้ไม่สามารถทำการ Query Data รวมถึงการ Start Database และ Shutdown Database ได้

SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist

Configuration

  • ทำการตรวจสอบ Process ของ Oracle SID ทั้งหมด

$
ps -ef | grep $ORACLE_SID
  • ทำการ Kill Process ทั้งหมดของ Oracle SID ที่ต้องการ

$
ps -ef | grep $ORACLE_SID | grep -v grep | awk '{print $2}' | xargs -i kill -9 {}
  • ทำการ Restart LISTENER

$
lsnrctl reload LISTENER
  • ทำการ Connect Database ด้วย SQL*Plus

$
sqlplus / as sysdba
  • ทำการ Start Database อีกครั้งหนึ่ง

SQL>
startup

อ่านเพิ่มเติม : https://bit.ly/2ShlPwk

Last updated

Was this helpful?