views:

22

answers:

2

we hav a java app running on tomcat backend is sql server configured for windows authentication we are runnning tomcat as a windows service we are not able to connect to sql db bcoz tomcat is used as windows service. guess, its taking different userid and pass for which sql server windows authentication fails. however, if we run tomcat normally (not as windows service), connection to db getting successful, but we cannot run tomcat normally as we want it to run forever. if we run tomcat normally, it shuts down when that particular user who started tomcat logs off as his session expires.

A: 

Try to configure tomcat service to log on as some real account not as Local system account.

kolchanov
A: 

Why don't you use Mixed authentication mode for SQL server instead of Windows Authentication because as per SQL Server's documentation using Local System Account is not recommend for security considerations.

In Mixed mode make a special user for your application and give the rights accordingly. Then use that user/pass in your connection string.

Faisal Feroz