AlgoAlpha
AlgoAlpha

Reputation: 51

SQL remote connection not working on google compute engine

I have a google compute engine with a static IP address running widows server 2012 with SQL server 2012 express. I have enabled SQL remote connections by following the instructions here and have setup windows firewall and google firewall to allow connections on port 1433. I also verified that SQL engine is running. I have tested the port connection with telnet and it's allowing the connection. The problem is that i still am not able to connect to the server. error:

a network related or instance specific error occurred while establishing a connection .... error 26 error locating server specified

Here's the connection string im using

"Data Source=IP Address\SQLEXPRESS;Database=dbname;User Id=xyz;Password=123;"

A user posted the same question here but i am able to telnet my server. I have used the same steps before with a AWS server and everything worked perfect. Is there other steps that have to be done with a google compute server ?

Upvotes: 1

Views: 1198

Answers (2)

AlgoAlpha
AlgoAlpha

Reputation: 51

I had an error in the connection string. I ended up switching to Amazon AWS servers and the following connection string works.

"Data Source=ec2-00-000-00-000.compute-1.amazonaws.com,PORT#;Database=test;User Id=xyz;Password=1234;"

Upvotes: 0

bsvee
bsvee

Reputation: 1

If you are attempting to connect from a remote machine outside of GCP, then have you looked inside your SQL Server Firewall Rules, under the Advanced tab,the Edge Traversal setting? Edge Traversal Setting

Upvotes: 0

Related Questions