Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การแก้ไขปัญหา >> ข้อผิดพลาด Windows

วิธีแก้ไข 'IO Error: The Network Adapter Could not Establish the Connection' บน Oracle SQL

Oracle SQL เป็น Integrated Development Environment สำหรับทำงานกับ Oracle Databases ด้วย SQL พัฒนาและจัดจำหน่ายโดย Oracle Corporation ฟรี และพัฒนาบน Java Development Kit เมื่อเร็วๆ นี้ มีรายงานมากมายเกี่ยวกับข้อผิดพลาด “IO Error: The Network Adapter Could Not Establish The Connection” ขณะทดสอบการเชื่อมต่อฐานข้อมูล

วิธีแก้ไข  IO Error: The Network Adapter Could not Establish the Connection  บน Oracle SQL

สาเหตุของข้อผิดพลาด "The Network Adapter Could Not Establish The Connection"

หลังได้รับรายงานมากมาย เราสืบสวนและจัดทำวิธีแก้ไข รวมถึงสาเหตุ:

  • รายละเอียดการเชื่อมต่อไม่ถูกต้อง (Incorrect Details): ต้องใส่ Hostname, Port, Username, Password ให้ถูกต้องทั้งหมด มิฉะนั้น Error อาจเกิดขึ้น
  • Service ถูกปิด (Disabled Service): Listener Service ต้องรันในพื้นหลัง เพื่อให้แอปทำงาน ถ้ายังไม่เริ่มหรือถูก Disable Error จะเกิด

วิธีที่ 1: ตรวจสอบรายละเอียดการเชื่อมต่อ (Checking Details)

รายละเอียดต้องถูกต้อง ตาม Server Configurations หากไม่ตรง Error จะเกิด ขั้นตอนนี้ตรวจสอบและใส่รายละเอียดใหม่

  1. ดาวน์โหลดและติดตั้ง Notepad++ จาก ที่นี่
  2. ไปที่ที่อยู่:
    DB Home: C:/app/Username/product/11.2.0(version might differ)/dbhome_1/Network/Admin
วิธีแก้ไข  IO Error: The Network Adapter Could not Establish the Connection  บน Oracle SQL
  1. คลิกขวาไฟล์ “tnsnames.ora” เลือก “Open With Notepad ++”
วิธีแก้ไข  IO Error: The Network Adapter Could not Establish the Connection  บน Oracle SQL
  1. ภายใต้หัวข้อ “ORCL=” ให้บันทึก Port และ Host
  2. บันทึก Service Name ด้วย
วิธีแก้ไข  IO Error: The Network Adapter Could not Establish the Connection  บน Oracle SQL
  1. ใส่รายละเอียดเหล่านี้ขณะสร้าง Network Connection กด “Test”
  2. ตรวจสอบว่าปัญหาแก้ไขแล้วหรือยัง

วิธีที่ 2: เริ่ม Listener Service (Starting Listener Service)

Listener Service อาจยังไม่เริ่มต้น Service นี้จำเป็นสำหรับการเชื่อมต่อ ขั้นตอนนี้จะเริ่ม Service ด้วยคำสั่งใน Command Prompt

  1. กด Windows + R เปิด Run Prompt
  2. พิมพ์ Cmd กด Shift + Ctrl + Enter เพื่อเปิดด้วย Admin
วิธีแก้ไข  IO Error: The Network Adapter Could not Establish the Connection  บน Oracle SQL
  1. พิมพ์คำสั่งตรวจสอบ Service:
    lsnrctl status
  2. หากผลลัพธ์คล้ายภาพด้านล่าง แปลว่า Service ยังไม่ได้เริ่ม
วิธีแก้ไข  IO Error: The Network Adapter Could not Establish the Connection  บน Oracle SQL
  1. พิมพ์คำสั่ง เริ่ม Service:
    lsnrctl start
วิธีแก้ไข  IO Error: The Network Adapter Could not Establish the Connection  บน Oracle SQL
  1. ตอนนี้ Listener Service เริ่มแล้ว เปิด แอปพลิเคชัน และ ตรวจสอบ ว่าสร้าง Connection ใหม่ได้หรือไม่