mssql jdbc - Not able to connect local instance of SQL Server 2008 in a Java program -
I am using sqljdbc4.jar in the build path of the eclipse project. I am trying to connect to a Java program in SQL Server 2008
for class .for name ("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String connection = "jdbc: sqlserver: // localhost: 1433;" + "Database Name = Sice; User = Sample; Password = Sample;"; Connection = DriverManager.getConnection (connectionUrl); But I get the following error TCP / IP connection has failed for the host.
Enable TCP / IP in SQL Server Configuration Manager - & gt; Client Protocol
SQL Server Browser Service is also running Please tell me what I should try for other things.
Thanks
How to firewall, This way ??? Open port localhost / enable: 1433
Run CMD and Paste
Netसेट Firewall Set Porting Protocol = TCP Port = 1433 Name = SQLport Mode = Enabled Scope = = SUBNET profile = CURRENT
Change SQL Server authentication from 2 / s
Windows oh ... SQL server and Windows authentication (composite mode)
3) Your version is SQL Server 2008 or SQL Server 2008 Express, if express , Then search on the downloaded package (excelent help inc instances) how to connect express to local host, inter localhost \ sqlexpress
and and
edit: < / P>
5) In the management studio, you have to add a new user (no address) SQL Authentication) and assign for decision (whatever or even model) is there ??? Are not you ?
Comments
Post a Comment