Python脚本采集某一台SQL Server服务器数据的时候,突然遇到Connection to the database failed for an unknown reason”错误,更详细的信息如下

 

Traceback (most recent call last):
  File "src/pymssql.pyx", line 636, in pymssql.connect
  File "src/_mssql.pyx", line 1957, in _mssql.connect
  File "src/_mssql.pyx", line 677, in _mssql.MSSQLConnection.__init__
_mssql.MSSQLDriverException: Connection to the database failed for an unknown reason.
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/home/konglb/python/get_server_info.py", line 84, in <module>
    autocommit=True);
  File "src/pymssql.pyx", line 645, in pymssql.connect
pymssql.InterfaceError: Connection to the database failed for an unknown reason.
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "/home/konglb/python/get_server_info.py", line 474, in <module>
    logger.error(fe.message)
AttributeError: 'InterfaceError' object has no attribute 'message'

相关文章:

  • 2022-12-23
  • 2021-10-30
  • 2021-12-02
  • 2021-07-20
  • 2021-11-05
  • 2021-11-10
猜你喜欢
  • 2021-06-15
  • 2021-07-20
  • 2021-10-28
  • 2021-06-28
  • 2021-06-23
  • 2022-12-23
  • 2021-09-01
相关资源
相似解决方案