Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Tuesday, March 27, 2012

Cant get linq to recognize that sproc has changed

I have a GridView that is populated by a stored procedure via linq. I changed the stored procedure to return an additional column, but I can't get the additional column to show up in the GridView. The GridView has autogeneratecolumns=true, so if I were using a SqlDataSource the new column would show up automagically. But now it is not showing up and I cannot reference it. I can't figure out how to make linq recognize that my stored procedure has changed.

I have tried deleting the sproc definition from the dbml file, making sure the partial class is removed the .vb file, refreshing the stored procedures list in database explorer, and adding the sproc definition back again (a hassle), but still it insists on defining only the original columns and not the new column.

How do get linq to get back in sync with the database?

Is there any way to get linq back in sync after database changes??

sql

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.
sql

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can't get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed?

    The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory?

    Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can't get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed?

    The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory?

    Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can't get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed?

    The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory?

    Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can't get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed?

    The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory?

    Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.sql

Thursday, March 22, 2012

Can't Figure out SQL Statement

Perhaps someone can help me on this SQL statement. Let's say my table
has only 2 fields:
RowId Name
-- --
1 A
2 A
3 A
4 A
5 B
6 B
7 B
8 B
I want to return a dataset containing the rows with the lowest RowId
for each DISTINCT Name. Result:
RowId Name
-- --
1 A
5 B
Can anybody help me?
Thanks,
JasonOne method:
SELECT
MIN(RowId) AS RowId,
Name
FROM MyTable
GROUP BY
Name
Hope this helps.
Dan Guzman
SQL Server MVP
"daokfella" <jjbutera@.hotmail.com> wrote in message
news:1126619489.331236.145060@.g49g2000cwa.googlegroups.com...
> Perhaps someone can help me on this SQL statement. Let's say my table
> has only 2 fields:
> RowId Name
> -- --
> 1 A
> 2 A
> 3 A
> 4 A
> 5 B
> 6 B
> 7 B
> 8 B
> I want to return a dataset containing the rows with the lowest RowId
> for each DISTINCT Name. Result:
> RowId Name
> -- --
> 1 A
> 5 B
> Can anybody help me?
> Thanks,
> Jason
>|||SELECT MIN(RowID), Name FROM [my table] GROUP BY Name
"daokfella" <jjbutera@.hotmail.com> wrote in message
news:1126619489.331236.145060@.g49g2000cwa.googlegroups.com...
> Perhaps someone can help me on this SQL statement. Let's say my table
> has only 2 fields:
> RowId Name
> -- --
> 1 A
> 2 A
> 3 A
> 4 A
> 5 B
> 6 B
> 7 B
> 8 B
> I want to return a dataset containing the rows with the lowest RowId
> for each DISTINCT Name. Result:
> RowId Name
> -- --
> 1 A
> 5 B
> Can anybody help me?
> Thanks,
> Jason
>