Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution to JDBC connector to local instance of SQL Server #336

Closed
brianmatthewthomas opened this issue Oct 31, 2018 · 4 comments
Closed
Assignees
Labels
discussion/question Issue type ms sql Microsoft SQL Server database module

Comments

@brianmatthewthomas
Copy link

brianmatthewthomas commented Oct 31, 2018

Description: We had a local instance of SQL Server running to convert a very large (8GB) SQL dump. We did not have a password for the database, nor admin privileged but were instead trying to use windows integrated login to convert and received this message:

distracting security stuff
Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path
	at java.lang.ClassLoader.loadLibrary(Unknown Source)
	at java.lang.Runtime.loadLibrary0(Unknown Source)
	at java.lang.System.loadLibrary(Unknown Source)
	at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)
	... 18 common frames omitted
2018-10-24 10:14:49,066 [main] INFO  (c.d.Main) Troubleshooting information can be found at http://www.database-preservation.com/#troubleshooting
2018-10-24 10:14:49,066 [main] INFO  (c.d.Main) Please report any problems at https://github.com/keeps/db-preservation-toolkit/issues/new
2018-10-24 10:14:49,066 [main] DEBUG (c.d.Main) #########################################################
2018-10-24 10:14:49,066 [main] DEBUG (c.d.Main) #   FINISH-ID-43b4fb6d-a81a-4cf7-8c16-bc287d1cbc15
2018-10-24 10:14:49,066 [main] DEBUG (c.d.Main) #   FINISH v2.0.0
2018-10-24 10:14:49,066 [main] DEBUG (c.d.Main) #   EXIT CODE: 4
2018-10-24 10:14:49,066 [main] DEBUG (c.d.Main) #########################################################

The problem was fixed by the detail at the end of the message, "no sqljdbc_auth in java.library.path"

Steps required to reproduce the bug:

  1. DBPTK command: java "-Dfile.encoding=UTF-8" "-Djavax.net.ssl.trustStore" -jar dbptk-app-2.0.0.jar -i microsoft-s
    ql-server --import-server-name=[server name went here] --import-database=CTS --import-username=[windows admin username went here] --import-use-integrate
    d-login --import-password=[password went here] -e siard-2 -ep -ef filename.siard
  2. locate Microsoft JDBC Driver for SQL Server at https://www.microsoft.com/en-us/download/confirmation.aspx?id=11774.
  3. After installing the JDBC driver make sure to copy sqljdbc_auth.dll into the ./bin directory of the installed version of java. In our case jre1.8.0_131.

error-message.txt

@chalkos
Copy link
Contributor

chalkos commented Oct 31, 2018

Hey Brian! Thanks for sharing your solution.

If you don't mind, I will add this to the troubleshooting guide to make it easier to find.

@brianmatthewthomas
Copy link
Author

brianmatthewthomas commented Oct 31, 2018 via email

@chalkos chalkos added ms sql Microsoft SQL Server database module discussion/question Issue type labels Nov 12, 2018
@chalkos chalkos self-assigned this Nov 12, 2018
@chalkos
Copy link
Contributor

chalkos commented Nov 12, 2018

@chalkos
Copy link
Contributor

chalkos commented Nov 12, 2018

I also noticed that the driver being used has been discontinued, which might be why the login was not working. So this fix will probably not be needed after using a newer version of the driver.

Thanks again for finding the problem and a solution 👍

@chalkos chalkos closed this as completed Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion/question Issue type ms sql Microsoft SQL Server database module
Projects
None yet
Development

No branches or pull requests

2 participants