Monday, March 19, 2012
Job Hang when user connected
B.T.W. Sorry for my poor english.
I have database in SQL server 2000 wich user can access with ASP
page. They connect to the database it and return some info.
I got, in SQL Server, a job that run 1 DTS and some stored procedur. It is
running each hour in a day.
I dont know why but when they are web connection to my databse the job
just hang to Step 1 and never end. I have to Stop the Job and restart it.
Again,
if user are connected to my database, the Job just hang. The weird part is
that I can
run the DTS included in the job manually everytime whitout error, even if
user are connected to it ?!
Someone got the same problem
Should I disconnect all user before runnung the job ?
If yes, how can I do that ?
Thanks
Richard
First of all enable DTS package logging as specified in BOL:
To enable package logging
Open the Data Transformation Services (DTS) package for which you want to create a log.
On the Package menu, click Properties to display the DTS Package Properties dialog box.
Do one of the following:
Save package logs to Microsoft? SQL Server? by clicking the Logging tab, selecting the Log package execution to SQLServer check box, and then clicking an available server on which to save the package logs.
Security Note When possible, use Windows Authentication.
Save package logs to SQL Server 2000 Meta Data Services by clicking the Advanced tab, and then selecting the Show lineage variables as source columns and Write lineage to repository check boxes. On the Package menu, click Save As, and then in the Save DTS
Package dialog box, in the Location list, select Meta Data Services.
,... in order to findout the flow of DTS package.
Also refer to SQLAgent log and SQL Server error log for any information on this behaviour.
"Richard Martin" wrote:
> Hi all,
> B.T.W. Sorry for my poor english.
> I have database in SQL server 2000 wich user can access with ASP
> page. They connect to the database it and return some info.
> I got, in SQL Server, a job that run 1 DTS and some stored procedur. It is
> running each hour in a day.
> I dont know why but when they are web connection to my databse the job
> just hang to Step 1 and never end. I have to Stop the Job and restart it.
> Again,
> if user are connected to my database, the Job just hang. The weird part is
> that I can
> run the DTS included in the job manually everytime whitout error, even if
> user are connected to it ?!
> Someone got the same problem
> Should I disconnect all user before runnung the job ?
> If yes, how can I do that ?
>
> Thanks
> Richard
>
>
Job Hang when user connected
B.T.W. Sorry for my poor english.
I have database in SQL server 2000 wich user can access with ASP
page. They connect to the database it and return some info.
I got, in SQL Server, a job that run 1 DTS and some stored procedur. It is
running each hour in a day.
I dont know why but when they are web connection to my databse the job
just hang to Step 1 and never end. I have to Stop the Job and restart it.
Again,
if user are connected to my database, the Job just hang. The weird part is
that I can
run the DTS included in the job manually everytime whitout error, even if
user are connected to it ?!
Someone got the same problem
Should I disconnect all user before runnung the job ?
If yes, how can I do that ?
Thanks
RichardFirst of all enable DTS package logging as specified in BOL:
[i]To enable package logging
Open the Data Transformation Services (DTS) package for which you want to cr
eate a log.
On the Package menu, click Properties to display the DTS Package Properties
dialog box.
Do one of the following:
Save package logs to Microsoft? SQL Server? by clicking the Logging tab,
selecting the Log package execution to SQLServer check box, and then clickin
g an available server on which to save the package logs.
Security Note When possible, use Windows Authentication.
Save package logs to SQL Server 2000 Meta Data Services by clicking the Adva
nced tab, and then selecting the Show lineage variables as source columns an
d Write lineage to repository check boxes. On the Package menu, click Save A
s, and then in the Save DTS
Package dialog box, in the Location list, select Meta Data Services.
[/i]
,... in order to findout the flow of DTS package.
Also refer to SQLAgent log and SQL Server error log for any information on t
his behaviour.
"Richard Martin" wrote:
> Hi all,
> B.T.W. Sorry for my poor english.
> I have database in SQL server 2000 wich user can access with ASP
> page. They connect to the database it and return some info.
> I got, in SQL Server, a job that run 1 DTS and some stored procedur. It i
s
> running each hour in a day.
> I dont know why but when they are web connection to my databse the job
> just hang to Step 1 and never end. I have to Stop the Job and restart it.
> Again,
> if user are connected to my database, the Job just hang. The weird part is
> that I can
> run the DTS included in the job manually everytime whitout error, even if
> user are connected to it ?!
> Someone got the same problem
> Should I disconnect all user before runnung the job ?
> If yes, how can I do that ?
>
> Thanks
> Richard
>
>
Friday, February 24, 2012
jdbc-sql 2000 error
I'm having trouble connecting to Sql Server 2000 via Java 2 (5.0).
I'm on Windows Server 2003 and trying to connect locally from the
server. I've downloaded the jar files (mssqlserver.jar,msutil.jar,
msbase.jar) containing the jdbc driver from microsoft and placed them in
the same directory as my java file, below is a snippet of my code to
test the connection:
public void openTest() throws Exception
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver" );
Connection m_Conn = DriverManager.getConnection
("jdbc:microsoft:sqlserver://local:1433", "", "");
}
I compile using the following command there are no errors:
javac -classpath ".;./mssqlserver.jar;./msbase.jar;./msutil.jar"
Test.java
At runtime i get the following error,
Exception in thread "main" java.lang.ClassNotFoundException:
com.microsoft.jdbc.
sqlserver.SQLServerDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at Hello.openTest(HelloPrint.java:30)
at HelloPrint.main(HelloPrint.java:11)
Can anyone help? Many thanks in advance.
InderHi
It's been a while since I used the JDBC driver!
microsoft.public.sqlserver.jdbcdriver may be a better newsgroup to post to.
You may want to make sure the .jar files are on the classpath and you may
want to re-run the setup just in case there is some corruption.
John
"inder" wrote:
> Hi,
> I'm having trouble connecting to Sql Server 2000 via Java 2 (5.0).
> I'm on Windows Server 2003 and trying to connect locally from the
> server. I've downloaded the jar files (mssqlserver.jar,msutil.jar,
> msbase.jar) containing the jdbc driver from microsoft and placed them in
> the same directory as my java file, below is a snippet of my code to
> test the connection:
> public void openTest() throws Exception
> {
> Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver" );
> Connection m_Conn = DriverManager.getConnection
> ("jdbc:microsoft:sqlserver://local:1433", "", "");
> }
>
> I compile using the following command there are no errors:
> javac -classpath ".;./mssqlserver.jar;./msbase.jar;./msutil.jar"
> Test.java
> At runtime i get the following error,
>
> Exception in thread "main" java.lang.ClassNotFoundException:
> com.microsoft.jdbc.
> sqlserver.SQLServerDriver
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at Hello.openTest(HelloPrint.java:30)
> at HelloPrint.main(HelloPrint.java:11)
>
> Can anyone help? Many thanks in advance.
> Inder
>|||Hi John,
I've got that error fixed; you were right, it was a classpath
problem. Now i have another error,
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
when i run the following,
Connection m_Conn =
DriverManager.getConnection("jdbc:microsoft:sqlserver://servername:1433;
DatabaseName=Northwind","","");
The problem is that my 'servername' is the same as my windows server
2003 domain and when i setup my sql server 2000 i set it to use the
windows authentication, so now i'm not sure what to put for the username
and password in the above string.
Many thanks again,
Inderjit
*** Sent via Developersdex http://www.examnotes.net ***|||Hi
This may help a bit.
http://support.microsoft.com/defaul...kb;en-us;313100
AFIK the JDBC driver does not support Windows Authentication as it is
not a type 4 driver. You may want to look at
http://www.jnetdirect.com/products.php?op=jsqlconnect
John
JDBC with MSDE
have SQL Server installed. Is this possible? When I try to connect I get
the error:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server
connection.
From what I've read on the web it looks like I need to set the security
settings to allow
for SQL authentication as well as NT authentication. Is that correct? And
can that
be done with just MSDE?
I think that I have MSDE 2000 installed (it actually came with a different
application).
I just downloaded the latest SQL Server JDBC driver.
Thanks,
Brucehi,
"dfdfd" <dfdf@.aol.com> ha scritto nel messaggio
news:Uehab.184609$xf.152570@.lakeread04...
> I have a MSDE database that I am trying to connect to with JDBC. I don't
> have SQL Server installed. Is this possible? When I try to connect I get
> the error:
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC][SQLServer]
> Login failed for user 'sa'. Reason: Not associated with a trusted SQL
Server
> connection.
> From what I've read on the web it looks like I need to set the security
> settings to allow
> for SQL authentication as well as NT authentication. Is that correct?
And
> can that
> be done with just MSDE?
you connection failed becouse you MSDE installation is set to WinNT
authebtication (trusted authetication), default setting for WinNT platform
that can be changed during setup by filling SECURITYMODE = SQL parameter..
have a look at
http://support.microsoft.com/defaul...kb;en-us;285097
for more info about this and for hints on how to change Authentication
setting by hacking the registry..
new switches info for service pack 3a can be found at
http://support.microsoft.com/?kbid=810826
hth
Andrea Montanari
andrea.sql@.virgilio.it
montanari_andrea@.virgilio.it
http://www.asql.biz/DbaMgr.shtm
DbaMgr2k ver 0.4.0 - DbaMgr ver 0.50.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--- remove DMO to reply
JDBC SP3 and SSL
If I enable SSL on my SQL Server (using the Force Protocol Encryption in
Server Network Utility) and then use JDBC SP3 to connect (and Java 5 Update
2), will the connection succeed? If the current version of Microsoft's JDBC
Driver for SQL Server won't make a SSL connection, are there plans on a
future version having this capability?
The reason I ask is because we have one application that uses JDBC to
connect to SQL Server and it has to use Microsoft's JDBC Driver in order to
work, so using a Type 3 JDBC driver isn't an option for us.
Thanks,
Jason
Why does your application have to use the MS driver? There are a lot of
commercial type 4 drivers out there and a pretty good open source one,
too. All of these support SSL.
Alin,
The jTDS Project.
|||Alin,
The application I'm referring to is a purchased application, and I believe
it is coded to use the Microsoft JDBC driver. At least that is what the
installation instructions lead me to believe.
Thanks,
Jason
"Alin Sinpalean" wrote:
> Why does your application have to use the MS driver? There are a lot of
> commercial type 4 drivers out there and a pretty good open source one,
> too. All of these support SSL.
> Alin,
> The jTDS Project.
>
|||Jason Delaune wrote:
> Alin,
> The application I'm referring to is a purchased application, and I
believe
> it is coded to use the Microsoft JDBC driver. At least that is what
the
> installation instructions lead me to believe.
Usually applications are coded to use the JDBC specification. Relying
on non-standard features of particular implementations is not a good
idea. If that's the case then you're out of luck.
You could still try another driver, though. In 90% of the cases it
works.
Alin.
|||Alin,
Which driver(s) would you recommend that supports connections to SQL Server
using SSL?
Thanks,
Jason
"Alin Sinpalean" wrote:
> Jason Delaune wrote:
> believe
> the
> Usually applications are coded to use the JDBC specification. Relying
> on non-standard features of particular implementations is not a good
> idea. If that's the case then you're out of luck.
> You could still try another driver, though. In 90% of the cases it
> works.
> Alin.
>
|||I would of course recommend the open source jTDS JDBC driver (which I'm
a developer of); you can get it from http://jtds.sourceforge.net
There are also quite a few commercial drivers out there if you don't
trust open source, but they do cost a lot and are not necessarily
better. Just do a Google search and they will turn up.
Alin,
The jTDS Project.
jdbc permissions
using in your servlet to connect to sql server. There is
no concept of giving read/write permissions to a jdbc
driver.
Let us know if you need more clarification on this or how
to do it.
hth.
>--Original Message--
>seems precious few answers in the jdbc group...
>as I'm trying to connect Tomcat 5 to MSDE, according to
the help system, I
>have to give the jdbc driver some read/write perms, but
as the Java is
>actually a servlet, there is no codebase being used.
>Anyone got any ideas on where I can set the permissions?
>.
><anonymous@.discussions.microsoft.com> wrote in news:1493501c3fa41
$8cbdc0d0$a301280a@.phx.gbl:
well, this is the page from the helpfile thats caused me to ask:
''
Using the SQL Server 2000 Driver for JDBC on a Java 2 Platform
----
--
When using the SQL Server 2000 Driver for JDBC on a Java 2 Platform with
the standard security manager enabled, you must give the driver some
additional permissions. Refer to your Java 2 Platform documentation for
more information about the Java 2 Platform security model and
permissions.
You can run an application on a Java 2 Platform with the standard
security manager using:
"java -Djava.security.manager application_class_name"
where application_class_name is the class name of the application.
Web browser applets running in the Java 2 plug-in are always running in a
Java Virtual Machine with the standard security manager enabled. To
enable the necessary permissions, you must add them to the security
policy file of the Java 2 Platform. This security policy file can be
found in the jre/lib/security subdirectory of the Java 2 Platform
installation directory.
To use JDBC data sources, all code bases must have the following
permissions:
// permissions granted to all domains
grant {
// DataSource access
permission java.util.PropertyPermission "java.naming.*", "read,write";
// Adjust the server host specification for your environment
permission java.net.SocketPermission "*.microsoft.com:0-65535",
"connect";
};
To use insensitive scrollable cursors, and perform client-side sorting of
some DatabaseMetaData ResultSets, all code bases must have access to
temporary files. If access to temporary files is not available, the
driver may throw an exception indicating that it is unable to set up a
static cursor cache.
For JDK 1.1 environments, access to "current working directory" must be
granted.
For Java 2 environments, access to the temporary directory specified by
the VM configuration must be granted.
The following is an example of permissions being granted for the C:\TEMP
directory:
// permissions granted to all domains
grant {
// Permission to create and delete temporary files.
// Adjust the temporary directory for your environment.
permission java.io.FilePermission "C:\\TEMP\\-", "read,write,delete";
};
'''
> Make sure you give sql permissions to the sql user you are
> using in your servlet to connect to sql server. There is
> no concept of giving read/write permissions to a jdbc
> driver.
> Let us know if you need more clarification on this or how
> to do it.
>
via the tomcat log, its failing to load the jdbc driver, but whether its
authentication or unable to find the driver, I'm not sure
> hth.
>
> the help system, I
> as the Java is
>|||I apologige for it. There is nothing special you need to
do on sql server side. I will post more if I can find more
information on this.
Thanks.
>--Original Message--
><anonymous@.discussions.microsoft.com> wrote in
news:1493501c3fa41
>$8cbdc0d0$a301280a@.phx.gbl:
>well, this is the page from the helpfile thats caused me
to ask:
>''
>Using the SQL Server 2000 Driver for JDBC on a Java 2
Platform
>----
--
>--
>When using the SQL Server 2000 Driver for JDBC on a Java
2 Platform with
>the standard security manager enabled, you must give the
driver some
>additional permissions. Refer to your Java 2 Platform
documentation for
>more information about the Java 2 Platform security model
and
>permissions.
>You can run an application on a Java 2 Platform with the
standard
>security manager using:
>"java -Djava.security.manager application_class_name"
>where application_class_name is the class name of the
application.
>Web browser applets running in the Java 2 plug-in are
always running in a
>Java Virtual Machine with the standard security manager
enabled. To
>enable the necessary permissions, you must add them to
the security
>policy file of the Java 2 Platform. This security policy
file can be
>found in the jre/lib/security subdirectory of the Java 2
Platform
>installation directory.
>To use JDBC data sources, all code bases must have the
following
>permissions:
>// permissions granted to all domains
>grant {
>// DataSource access
>permission
java.util.PropertyPermission "java.naming.*", "read,write";
>// Adjust the server host specification for your
environment
>permission java.net.SocketPermission "*.microsoft.com:0-
65535",
>"connect";
>};
>To use insensitive scrollable cursors, and perform client-
side sorting of
>some DatabaseMetaData ResultSets, all code bases must
have access to
>temporary files. If access to temporary files is not
available, the
>driver may throw an exception indicating that it is
unable to set up a
>static cursor cache.
>For JDK 1.1 environments, access to "current working
directory" must be
>granted.
>For Java 2 environments, access to the temporary
directory specified by
>the VM configuration must be granted.
>The following is an example of permissions being granted
for the C:\TEMP
>directory:
>// permissions granted to all domains
>grant {
>// Permission to create and delete temporary files.
>// Adjust the temporary directory for your environment.
>permission java.io.FilePermission "C:\\TEMP\\-
", "read,write,delete";
>};
>'''
>
>
>
are
is
how
>via the tomcat log, its failing to load the jdbc driver,
but whether its
>authentication or unable to find the driver, I'm not sure
>
>.
>
jdbc permissions
as I'm trying to connect Tomcat 5 to MSDE, according to the help system, I
have to give the jdbc driver some read/write perms, but as the java is
actually a servlet, there is no codebase being used.
Anyone got any ideas on where I can set the permissions?Make sure you give sql permissions to the sql user you are
using in your servlet to connect to sql server. There is
no concept of giving read/write permissions to a jdbc
driver.
Let us know if you need more clarification on this or how
to do it.
hth.
>--Original Message--
>seems precious few answers in the jdbc group...
>as I'm trying to connect Tomcat 5 to MSDE, according to
the help system, I
>have to give the jdbc driver some read/write perms, but
as the java is
>actually a servlet, there is no codebase being used.
>Anyone got any ideas on where I can set the permissions?
>.
>|||<anonymous@.discussions.microsoft.com> wrote in news:1493501c3fa41
$8cbdc0d0$a301280a@.phx.gbl:
well, this is the page from the helpfile thats caused me to ask:
''
Using the SQL Server 2000 Driver for JDBC on a Java 2 Platform
----
--
When using the SQL Server 2000 Driver for JDBC on a Java 2 Platform with
the standard security manager enabled, you must give the driver some
additional permissions. Refer to your Java 2 Platform documentation for
more information about the Java 2 Platform security model and
permissions.
You can run an application on a Java 2 Platform with the standard
security manager using:
"java -Djava.security.manager application_class_name"
where application_class_name is the class name of the application.
Web browser applets running in the Java 2 plug-in are always running in a
Java Virtual Machine with the standard security manager enabled. To
enable the necessary permissions, you must add them to the security
policy file of the Java 2 Platform. This security policy file can be
found in the jre/lib/security subdirectory of the Java 2 Platform
installation directory.
To use JDBC data sources, all code bases must have the following
permissions:
// permissions granted to all domains
grant {
// DataSource access
permission java.util.PropertyPermission "java.naming.*", "read,write";
// Adjust the server host specification for your environment
permission java.net.SocketPermission "*.microsoft.com:0-65535",
"connect";
};
To use insensitive scrollable cursors, and perform client-side sorting of
some DatabaseMetaData ResultSets, all code bases must have access to
temporary files. If access to temporary files is not available, the
driver may throw an exception indicating that it is unable to set up a
static cursor cache.
For JDK 1.1 environments, access to "current working directory" must be
granted.
For Java 2 environments, access to the temporary directory specified by
the VM configuration must be granted.
The following is an example of permissions being granted for the C:\TEMP
directory:
// permissions granted to all domains
grant {
// Permission to create and delete temporary files.
// Adjust the temporary directory for your environment.
permission java.io.FilePermission "C:\\TEMP\\-", "read,write,delete";
};
'''
> Make sure you give sql permissions to the sql user you are
> using in your servlet to connect to sql server. There is
> no concept of giving read/write permissions to a jdbc
> driver.
> Let us know if you need more clarification on this or how
> to do it.
>
via the tomcat log, its failing to load the jdbc driver, but whether its
authentication or unable to find the driver, I'm not sure
> hth.
>>--Original Message--
>>seems precious few answers in the jdbc group...
>>as I'm trying to connect Tomcat 5 to MSDE, according to
> the help system, I
>>have to give the jdbc driver some read/write perms, but
> as the java is
>>actually a servlet, there is no codebase being used.
>>Anyone got any ideas on where I can set the permissions?
>>.
>|||I apologige for it. There is nothing special you need to
do on sql server side. I will post more if I can find more
information on this.
Thanks.
>--Original Message--
><anonymous@.discussions.microsoft.com> wrote in
news:1493501c3fa41
>$8cbdc0d0$a301280a@.phx.gbl:
>well, this is the page from the helpfile thats caused me
to ask:
>''
>Using the SQL Server 2000 Driver for JDBC on a Java 2
Platform
>----
--
>--
>When using the SQL Server 2000 Driver for JDBC on a Java
2 Platform with
>the standard security manager enabled, you must give the
driver some
>additional permissions. Refer to your Java 2 Platform
documentation for
>more information about the Java 2 Platform security model
and
>permissions.
>You can run an application on a Java 2 Platform with the
standard
>security manager using:
>"java -Djava.security.manager application_class_name"
>where application_class_name is the class name of the
application.
>Web browser applets running in the Java 2 plug-in are
always running in a
>Java Virtual Machine with the standard security manager
enabled. To
>enable the necessary permissions, you must add them to
the security
>policy file of the Java 2 Platform. This security policy
file can be
>found in the jre/lib/security subdirectory of the Java 2
Platform
>installation directory.
>To use JDBC data sources, all code bases must have the
following
>permissions:
>// permissions granted to all domains
>grant {
>// DataSource access
>permission
java.util.PropertyPermission "java.naming.*", "read,write";
>// Adjust the server host specification for your
environment
>permission java.net.SocketPermission "*.microsoft.com:0-
65535",
>"connect";
>};
>To use insensitive scrollable cursors, and perform client-
side sorting of
>some DatabaseMetaData ResultSets, all code bases must
have access to
>temporary files. If access to temporary files is not
available, the
>driver may throw an exception indicating that it is
unable to set up a
>static cursor cache.
>For JDK 1.1 environments, access to "current working
directory" must be
>granted.
>For Java 2 environments, access to the temporary
directory specified by
>the VM configuration must be granted.
>The following is an example of permissions being granted
for the C:\TEMP
>directory:
>// permissions granted to all domains
>grant {
>// Permission to create and delete temporary files.
>// Adjust the temporary directory for your environment.
>permission java.io.FilePermission "C:\\TEMP\\-
", "read,write,delete";
>};
>'''
>
>
>
>> Make sure you give sql permissions to the sql user you
are
>> using in your servlet to connect to sql server. There
is
>> no concept of giving read/write permissions to a jdbc
>> driver.
>> Let us know if you need more clarification on this or
how
>> to do it.
>via the tomcat log, its failing to load the jdbc driver,
but whether its
>authentication or unable to find the driver, I'm not sure
>
>> hth.
>>--Original Message--
>>seems precious few answers in the jdbc group...
>>as I'm trying to connect Tomcat 5 to MSDE, according to
>> the help system, I
>>have to give the jdbc driver some read/write perms, but
>> as the java is
>>actually a servlet, there is no codebase being used.
>>Anyone got any ideas on where I can set the permissions?
>>.
>>
>.
>
Monday, February 20, 2012
JDBC Integrated Security problem
Hi,
I am using the latest 6/26 JDBC driver to connect to sql server 2000 server. My url is jdbc:sqlserver://hostname:1433;integratedSecurity=true;. I was getting the following errors "Invalid integratedSecurity property value:true". Any suggestion to resolve this problem.
Thanks.
hi Alexie,Can you try adding the following to your repro:
DatabaseMetaData dd = conn.getMetaData();
System.out.println("Driver version is " + dd.getDriverVersion() );
My first suspicion is that you may have the RTW driver somewhere in the path and you are not picking up CTP2.
CTP2 Driver version is 1.1.1320.0. This build contains Integrated Security feature.
RTW Driver version is 1.0.809.102. This build would throw the error that you are seeing since Integrated authentication was not yet implemented.|||
Thanks your information. Clean the classpath helps to resolve this problem.
Additional question, how to pass NT domain account. I enter
jdbc:sqlserver://hostname;integratedSecurity=true;user=domain\myaccount;password=mypassword;
I was getting exception like
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Do you have any suggestion? I heard that I need to impersonate my client program. Do you know where to find reference document and sample code.
|||pls run the sql profiler and check what account is java using to connect to sql server|||I am not able to connect to sql server. Should I see any errors in profiler? Java account is using sql server admin account. I can see other textData for admin account but not for remote sql server connection.
Thanks.
|||Glad to hear that you got the path problem cleared up.
There is no way to pass in NT domain account, unfortunatelly this means that integrated authentication will not work at all on non Windows platforms.
For Windows platforms you can get arround this limitation by using impersonation before creating a connection so that you connect with the NT domain information that you select.
One of the features currently being considered for our next release is a type four integrated authentication that would work for non Windows platforms and that would allow you to pass in NT authentication as shown above. Currently we have no customer feedback on why this would be important, and it is not clear whether we will decide to include it. If this feature is important to you I would encourage you to file a bug directly in the product feedback webpage, it will definitelly help us come feature discussion time.
http://msdn.microsoft.com/data/ref/jdbc/ "Submit Feedback on the JDBC Driver"
Thanks,
Angel
|||Angel,
Thanks your information. As you mention, it will be a problem if our java client resides on non-windows environment and tries to access sql server.
|||Angel,
I try to submit feedback, but I am not able to locate any add new feedback function. Can you help?
|||Alexie,
What problem did you have when clicking on the "Submit Feedback on the JDBC Driver" link? As far as I know this should take you to the Connect web site where you should be able to file a bug directly on this product.
|||Angel,
I try the http://connect.microsoft.com/SQLServer/Feedback. It only allow me to search all existing bugs. But, I try to add new bug.
|||I see, the process is a little bit confusing. This is the first time that I use the updated connect page.
They seem to be trying to avoid bug duplicates by forcing you to do a search first. You can submit a bug after doing the search.
The process looks like: http://connect.microsoft.com/SQLServer/Feedback. -> Submit Feedback
Step 1 has someone else already reported this issue: -> write something on the search feedback textbox and click on search.
Step 2, Unable to find a match -> Submit Feedback (button at the bottom of the screen)
click on SQL Server 2005 Bug Form . Make sure you type JDBC on the title of the bug so that it gets routed to us faster.
Hope this is not too much of a pain, thank you for taking the time to submit feedback.
|||Angel,
Thanks. I submitted my feedback.
|||Angel,
You mentioned "For Windows platforms you can get arround this limitation by using impersonation before creating a connection so that you connect with the NT domain information that you select." from you early response.
Do you know how to implement impersonation? Any code sample or reference document?
Thanks again.
|||Hmm not really sure what the best way would be. I would create a windows dll and call from the Java app into my dll to use Windows impersonation APIs.
This looks promising though:
http://www.onjava.com/pub/a/onjava/2004/02/25/javavsdotnet.html?page=4
|||Angel,
I am able to impersonate my client program, but I am still getting "Login failed for user ''. The user is not associated with a trusted SQL Server connection.". Do you know why I am still getting this error? Do I miss any steps? Both my client program and SQL Server 2005 are on same host and same domain(DC).
Thanks.
JDBC Driver issue.
How can i connect MSSQL server using Microsoft JDBC Drivers in Windows NT Autentication Mode.
Your help is appritiated
Thanks in Advance
Thanks,
egtestI don't believe you can. At least I couldn't find it anywhere in the help files or Microsofts site. Keep in mind if you use windows auth you're now platform dependant.
JDBC Driver for SQL Server 2005
Using the SQL Server 2000 JDBC driver to connect to SQL Server 2005 is not a supported scenario. We highly recommend using the SQL Server 2005 JDBC driver to leverage the new capabilities of SQL Server 2005. The latest v1.2 beta version along with the v1.1 version are available for download at http://msdn.microsoft.com/data/jdbc
Jimmy