Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Tuesday, March 27, 2012

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

Monday, March 19, 2012

Can't Display Sql 2005 Images

Hi!!!

I have a JPEG image into my Sql Server 2005 DB. The field type in the DB is Image.
When I try to display the image in a report, I always see a red cross instead the image...

I've tried to do: "http://msdn2.microsoft.com/en-us/library/ms156342.aspx" but it doesn't work.

Please help me!!!!

NEStorMake sure the image item source is set to Database. The Product Catalog report included with the RS sample reports demonstrates showing images from the database.

Thursday, March 8, 2012

can't create SP with a CTE

hi
i can't create a stored proc
with a CTE ( for recursion )
if i execute the query it works fine
but when i try to put it in a stored proc, it fails
with an error like
"Incorrect syntax near 'with'. If this is intended to be a common table
expression, you need to explicitly terminate the previous statement with a
semi-colon"
this is the query
--
with recursivo( _regla, _verbo, _pregla, _pverbo )
as (
select f.rg_codigo, f.vb_codigo, f.vf_regla, f.vf_verbo
from VerboFlujo f
where f.vf_regla= 199 and f.vf_verbo= 0
union all
select f.rg_codigo, f.vb_codigo, f.vf_regla, f.vf_verbo
from VerboFlujo f
inner join recursivo x on
x._regla= f.vf_regla and
x._verbo= f.vf_verbo
)
select *
from recursivo
atte,
Hernnsolved !
i have a SET NOCOUNT ON before the CTE
it should be SET NOCOUNT ON ;
( with a semicolon)
atte,
Hernn
"bajopalabra" <bajopalabra@.hotmail.com> escribi en el mensaje
news:Ot6FoWsnGHA.3512@.TK2MSFTNGP02.phx.gbl...
| hi
| i can't create a stored proc
| with a CTE ( for recursion )
|
| if i execute the query it works fine
| but when i try to put it in a stored proc, it fails
| with an error like
| "Incorrect syntax near 'with'. If this is intended to be a common table
| expression, you need to explicitly terminate the previous statement with a
| semi-colon"
|
| this is the query
| --
|
| with recursivo( _regla, _verbo, _pregla, _pverbo )
| as (
| select f.rg_codigo, f.vb_codigo, f.vf_regla, f.vf_verbo
| from VerboFlujo f
| where f.vf_regla= 199 and f.vf_verbo= 0
| union all
| select f.rg_codigo, f.vb_codigo, f.vf_regla, f.vf_verbo
| from VerboFlujo f
| inner join recursivo x on
| x._regla= f.vf_regla and
| x._verbo= f.vf_verbo
| )
| select *
| from recursivo
|
| --
| atte,
| Hernn
|
|

Sunday, February 19, 2012

cant connect to sql server 2005 from my asp.net application

Hi

I can't connect to sql server 2005 from my asp.net web page. I seem to be able to connect to it when i run the application from within visual studio but i can't connect to it when i run the application from IIS.

I am new to sql server 2005 express so please bear with me.

The error message i get is:

Cannot open database "Vets" requested by the login. The login failed.
Login failed for user 'OSCAR2K4\ASPNET'.

I don't know where this user OSCAR2K4\ASPNET came from but i looked in sql server 2005 and there he is. In the left hand pane I went to Security and then logins and found oscar2k4\asp.net there. I went to the properties for this user and went to User Mappings. There was no tick next to my Vets database so I added one and ran the application from IIS. I also added the user to every single role in the vets database (including dbowner). I also went into the vets database itself and found the oscar/aspnet user and made sure he was added to every role.

I ran the application again. This time i got a lots of different errors. If the page was trying to run a select procedure I got the error user does not have select permission. If the page was running an SP i got the error or user does not execute permission


I have never had this problem before so I don't understand.

Where did this user come from? Was he created automatically when i configured my database for membership and roles? How do i set up this user so he can access the databsae from IIS.

The only way I could get the application to run from IIS was to go to Security - Logins for sql server and add the oscar2k4\asp.net user to the sysadmin role.

I find this very strange. Naturally i don't want to leave oscar2k4 in sysadmin.

Please help :) I can't upload my website until i fix this

Thanks, andrea

<server>\ASPNET is 'ASP.NET Machine Account', one of the access control lists (ACLs) that are set by default on the Machine.config file and the root Web.config file.

What's the OS version (e.g. Window2000 or Xp) of the box? You can take a look at this articlehttp://msdn2.microsoft.com/en-us/library/ab4e6cky.aspx

Tuesday, February 14, 2012

Can't connect to mssql

Hi
I installed ASP and MSSQL(SQL Express Edition, SQL Manager 2005 for SQL
Server Lite).
- ASP is runnig correctly
- With SQL Manager 2005 for SQL I can create Databases and tabels and some
records...
I can not connect from an ASP script (example follows at the end). I've get
an error message in the internet explorer (after loading my asp script):
"Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user 'sa'.
The user is not associated with a trusted SQL Server connection.
/index.asp, line 22
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET
CLR 2.0.50727)
Page:
GET /index.asp
Time:
Freitag, 29. September 2006, 09:13:42
More information:
Microsoft Support "
I've looked at this site:
http://support.microsoft.com/defaul...kb;en-us;555332 but it
doesn't help me cause I cant find the properties of the Resulution.
I've got no idea what else I can do Hopfully you understanding my crap
english;)
Thanks for helping!
Pascal Suter
By the way I was talking about this asp script:
<% OPTION EXPLICIT %>
<%
'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL
'define the connection string, specify database driver
ConnString="DRIVER=SQL Server;SERVER=localhost\SQLEXPRESS;UID=s
a;" & _
"PWD=;DATABASE=master"
'declare the SQL statement that will query the database
SQL= "SELECT test FROM test"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
'Open the connection to the database
Connection.Open ConnString
'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection
'first of all determine whether there are any records
If Recordset.EOF Then
Response.Write("No records returned.")
Else
'if there are records then loop through the fields
Do While NOT Recordset.Eof
Response.write Recordset("test")
Response.write "<br>"
Recordset.MoveNext
Loop
End If
'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
%>YOu have only Windows Authentication enbaled but you are using a SQL
user in your connection string. Either use integrated authentication or
switch to Mixed mode. More details on that on my website under the
screencasts sections
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
Thanks for your help. But it's exactly the same problem like in my link
below. There's a different program then I have. Unfortunatly I can't find
this settings. Probably the not exists? I have really no idea how I can fix
it|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
I've done this change, but if I want login on Microsoft SQL Server
Management Studio Express the login fails. Where can I change/create Login
names and permissions?
thanks for your help
Pascal Suter|||Am I something like a selfentertainer?;) However, I found a solution for my
problem but acutally your link was the key!
great thanks
Pascal Suter|||I am having the same problem, I did look in the registry but did not find
anything that would help me. I wish you would have expanded upon your last
post to explain what you actually did to solve the problem. I think what yo
u
did will solve my problem also.
"Suter" wrote:

> Am I something like a selfentertainer?;) However, I found a solution for m
y
> problem but acutally your link was the key!
> great thanks
> Pascal Suter
>

Can't connect to mssql

Hi
I installed ASP and MSSQL(SQL Express Edition, SQL Manager 2005 for SQL
Server Lite).
- ASP is runnig correctly
- With SQL Manager 2005 for SQL I can create Databases and tabels and some
records...
I can not connect from an ASP script (example follows at the end). I've get
an error message in the internet explorer (after loading my asp script):
"Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'.
The user is not associated with a trusted SQL Server connection.
/index.asp, line 22
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET
CLR 2.0.50727)
Page:
GET /index.asp
Time:
Freitag, 29. September 2006, 09:13:42
More information:
Microsoft Support "
I've looked at this site:
http://support.microsoft.com/default...b;en-us;555332 but it
doesn't help me cause I cant find the properties of the Resulution.
I've got no idea what else I can do Hopfully you understanding my crap
english;)
Thanks for helping!
Pascal Suter
By the way I was talking about this asp script:
<% OPTION EXPLICIT %>
<%
'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL
'define the connection string, specify database driver
ConnString="DRIVER=SQL Server;SERVER=localhost\SQLEXPRESS;UID=sa;" & _
"PWD=;DATABASE=master"
'declare the SQL statement that will query the database
SQL= "SELECT test FROM test"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
'Open the connection to the database
Connection.Open ConnString
'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection
'first of all determine whether there are any records
If Recordset.EOF Then
Response.Write("No records returned.")
Else
'if there are records then loop through the fields
Do While NOT Recordset.Eof
Response.write Recordset("test")
Response.write "<br>"
Recordset.MoveNext
Loop
End If
'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
%>
YOu have only Windows Authentication enbaled but you are using a SQL
user in your connection string. Either use integrated authentication or
switch to Mixed mode. More details on that on my website under the
screencasts sections
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
Thanks for your help. But it's exactly the same problem like in my link
below. There's a different program then I have. Unfortunatly I can't find
this settings. Probably the not exists? I have really no idea how I can fix
it
|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
I've done this change, but if I want login on Microsoft SQL Server
Management Studio Express the login fails. Where can I change/create Login
names and permissions?
thanks for your help
Pascal Suter
|||Am I something like a selfentertainer?;) However, I found a solution for my
problem but acutally your link was the key!
great thanks
Pascal Suter