From: Grant M. <gmc...@in...> - 2005-10-29 18:59:06
|
Since this python module is a wrapper around the Sybase CT library you've got to use the server name that is defined in your sql.ini for windows or in your interfaces file on linux. cat /opt/sybase-12.5.2/interfaces: dt1_12_5_3_esd1 master tcp ether wol1-db-srv-dt1 5010 query tcp ether wol1-db-srv-dt1 5010 so to connect to wol1-db-srv-dt1 on port 5000 i would use: db = Sybase.connect("dt1_12_5_3_esd1",user, passwd, database) -----Original Message----- From: pyt...@ww... [mailto:pyt...@ww...]On Behalf Of Robert Marchetti Sent: Saturday, 29 October 2005 2:34 AM To: 'pyt...@ww...' Subject: [python-sybase] error trying to connect using latest sybase.py Hello, I am trying to connect to a SYBASE using Sybase.connect but it throws an error before I can connect Example: # DNS, user, passwd, Database db = Sybase.connect("10.10.10.10:1600",user, passwd, database) print db Traceback (most recent call last): File "C:\eclipse\workspace\GUI_TestCases\DVM.py", line 11, in ? db = Sybase.connect("10.150.4.103 : 1600",user, passwd, database) File "C:\Python24\Lib\site-packages\Sybase.py", line 1005, in connect strip, auto_commit, delay_connect, locking) File "C:\Python24\Lib\site-packages\Sybase.py", line 867, in __init__ self.connect() File "C:\Python24\Lib\site-packages\Sybase.py", line 886, in connect status = conn.ct_connect(self.dsn) File "C:\Python24\Lib\site-packages\Sybase.py", line 184, in _clientmsg_cb raise DatabaseError(_fmt_client(msg)) - Ignored: Sybase.DatabaseError: Layer: 6, Origin: 8 ct_connect(): directory service layer: internal directory control layer error: Requested server name not found. I can connect find thru java and Sybase central, but I would like to python so I can script some validation tests. It uses an IP and Port as in the above example (Actual IP not used in this message) Any info would be great! Thanks Rob _____ The information contained in this e-mail message and any attachments is confidential, and is intended only for the use of the party to whom it is addressed. If you are not the above-named intended recipient, you are hereby notified that any dissemination, copying or disclosure of this communication is strictly prohibited. If you have received this communication in error, please notify Boston Communications Group, Inc. immediately by reply to this message or by telephoning (781) 904-5000, and destroy this message and its attachments, without making any copy or distribution. |