none
java.sql.SQLException: Login failed for user 'punna'.

    Question

  • Java.sql.SQLException: Could Not Get The Data Of The Row From The OLE DB Provider 'SQLOLEDB' Windows Server 2003 R2 Enterprise x64 Edition service pack 1 SQL Server 2000 Enterprise edition 32 bit, SP4 : 2000.8.00.2039 jdbc driver: jtds connection string: jdbc:jtdsqlserver://ZH-DATA-4:1434/[dbname];instance=[instance name] the connectivity works fine...almost. I have 2 identical sql servers one of which is linked to the other via a linked server config which for one particular query gives back the error I give in the subject of this thread: java.sql.SQLException: Could not get the data of the row from the OLE DB provider 'SQLOLEDB' if I run the exact same sql string in query analyser it runs with no problem. if have similar queries also running from java which use the linked server and these do not give an error. I am at a loss as to explain why this is happening. the query in question joins together a number of views which reference the linked server. I have tried everything I can think of including recreating the views and linked server definition. If all is OK in query analyser, how can it fail when called over jbdc (especially when all other db requests succeed) ?
    Thursday, July 16, 2009 7:11 AM

Answers

  • Which authentication mode do you use between your 2 servers ?
    Perhaps you use "current secutity context" ? In NTLM, authentication can't be done through an other server (only one "jump" allowed). It can explain query works from management console, and not from your java program...
    Try to set up a security context with a SQL account in linked server configuration. (Or use Kerberos authentication mode....)
    Thursday, July 16, 2009 7:58 AM