Guest User

Untitled

a guest
Aug 26th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Not able to connect local instance of SQL Server 2008 in a Java program
  2. Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
  3. String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
  4. "databaseName=sis;user=sample;password=sample;";
  5. connection = DriverManager.getConnection(connectionUrl);
  6.  
  7. netsh firewall set portopening protocol = TCP port = 1433
  8. name = SQLPort mode = ENABLE scope = SUBNET profile = CURRENT
Add Comment
Please, Sign In to add comment