'MSSQL'에 관한 글 1개

[python] Python에서 MSSQL 사용하기

Python module:
    http://pymssql.sourceforge.net

장애 1)

    Traceback (most recent call last):
      File "/email_server/src/server/spam/xspam_centerlog.py", line 8, in ?
      File "/usr/local/python2.4.2/lib/python2.4/site-packages/pymssql.py", line 30, in ?
        import _mssql
    ImportError: /usr/local/python2.4.2/lib/python2.4/site-packages/_mssql.so: undefined symbol: dbcolinfo

조치 1)

    http://www.freetds.org/software.html 에서 FreeTDS-stable.tgz 을 다운받아 설치한다.
    직접 다운받기 : http://ibiblio.org/pub/linux/alpha/fre ··· able.tgz

장애 2)   

    Traceback (most recent call last):
      File "/email_server/src/server/spam/xspam_common.py", line 79, in xspam_main
      File "/email_server/src/server/spam/xspam_centerlog.py", line 20, in proc_main
      File "/usr/local/python2.4.2/lib/python2.4/site-packages/pymssql.py", line 328, in connect
        con = _mssql.connect(dbhost, dbuser, dbpasswd)
    error: DB-Lib error message 20009, severity 9:
    Server is unavailable or does not exist.

조치 2)

  dbhost에 port까지 명시한다.

  con = pymssql.connect( host='192.168.0.10:1433', user='sa', password='', database='temp')
  cur = con.cursor()
2008/03/06 14:34 2008/03/06 14:34
태그 : ,
글 걸기 주소 : 이 글에는 트랙백을 보낼 수 없습니다