Connecting to MSSQL2008

Asked by Jiri Urban

Im struggling at little problem, im trying to connect MSSQL2008 server using zxJDBC driver. i move over problem with "driver not found" but having problem with connecting db. my code:

from com.ziclix.python.sql import zxJDBC
import java

d, u, p, v = "jdbc:sqlserver://abc.efg.test:1434;databaseName=TEST", "***", "***", "com.microsoft.sqlserver.jdbc.SQLServerDriver"
conn = zxJDBC.connect(d, u, p, v)
conn.close()

when i run this script, sikuli struggle and do nothing, at db server i see that test pc joinned server, but he joined different database( master) and did nothing (0s CPU and DISK time) i have to kill this SPID to let sikuli appeared. Any idea where should be problem?

ive tried JDBC 3.0, 4.0 driver - same problem

Thank you for any idea

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

If you are sure, the driver jar containing com.microsoft.sqlserver.jdbc.SQLServerDriver is in class path, then the only place, where something might be wrong is in you d string denoting the jdbc url:

"jdbc:sqlserver://abc.efg.test:1434;databaseName=TEST"

so I think you have to check this.

Revision history for this message
Jiri Urban (fixie) said :
#2

Im sure that connection string is OK. Actually i think im connected to db, because in processes i see my test PC in state of - AWAITING COMMANDS.

but for some reasons, sikuli doesnt leave connect statement. Im rly frustrated, because i really cant figure out where should be problem.

Interesting is that if i change user/pass its jdbc give me correct permission errod, so im sure that sikuli is connecting right. Any idea why sikuli stucks at connect statement?

i also tried connect through: db = apply(zxJDBC.connectx, ("com.microsoft.sqlserver.jdbc.SQLServerDataSource",), params) same result :(

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Do you have the possibility, to try the same in plain Jython 2.5.2 ?

I am sorry, but I do not have an mssql server available to support you somehow.

Can you help with this problem?

Provide an answer of your own, or ask Jiri Urban for more information if necessary.

To post a message you must log in.