robot framework連接Oracle錯誤:ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA


在使用robot framework的關鍵字Connect to Database Using Custom params連接Oracle數據庫:

Connect to Database Using Custom params         cx_Oracle      'username','password','host'   

報錯 ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

解決方法:

在host后加上所連接數據庫的庫名(就是Oracle配置文件tnsnames.ora中的SERVICE_NAME)

如:

Connect to Database Using Custom params cx_Oracle 'username','password','host/orcl'   

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM