0

I'm trying to connect to a SQL Server database at Discount asp.net hosting with SQL Server Management Studio. Here`s the connection string that is working fine. What parts of it should I use in Management Studio to connect to remote Db?

Data Source=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_709539;
User ID=SQL2008_709539_user;Password=password;

I'm filling the fields in the following way:

  • Server name: tcp:sql2k803.discountasp.net
  • login: SQL2008_709539_user
  • password: password
  • authentication type is SQL Server.
Cade Roux
  • 88,164
  • 40
  • 182
  • 265
Yaroslav Yakovlev
  • 6,303
  • 6
  • 39
  • 59

3 Answers3

2

If it returns "Login failed" then you are getting to SQL Server but SQL Server is rejecting you (so it won't involve firewall, DNS, etc). Did you try explicitly setting the database information in the Connection dialog in SSMS? You may have to follow up with the host and ask them what state was found in the SQL Server log to go along with your failed attempt to log in. This is often because the database wasn't specified or the wrong database was specified.

Here is a list of all the states I've observed and what they probably mean, if your host won't directly tell you what to fix but they do tell you what state was found in SQL Server's log:

Aaron Bertrand
  • 272,866
  • 37
  • 466
  • 490
1

If it's working fine, use tcp:sql2k803.discountasp.net as server address, and user / pass as login data

Denis Biondic
  • 7,943
  • 5
  • 48
  • 79
  • actually it returns "Login failed for user" error message. This connection string is working fine and is used at this hosting. Any ideas? – Yaroslav Yakovlev Jun 30 '11 at 18:38
1
  • Database: SQL2008_709539
  • Login: SQL2008_709539_user
  • Password: password
  • Host: sql2k803.discountasp.net

Please note also:

  1. Some hosting companies denies access by default so you may have to request access from your IP address
  2. Sometime I was unable to connect using host name, I used IP address to connect via Management Studio (such problem appear due firewall, proxy, etc)

ADDED: Also see whether you've enabled remote tcp/ip connections

sll
  • 61,540
  • 22
  • 104
  • 156
  • tried ip as well. Didnt work in the same way. I remember I made it work some time ago. And had the same problem. So it puzzles me as I know there is a solution for all that. – Yaroslav Yakovlev Jun 30 '11 at 18:41
  • As I said, sometimes hosting companies denies access for the Management Studio Connections, connect support – sll Jun 30 '11 at 18:46