I created a database 'dbDemo' (MS SQL Server 2012) by Plesk on Google Cloud Platform and for connecting to this database from another local machine I changed the TCP Port 1433 on my online server using this link guidelines.
and I am able to login into my database by little admin. When I run SQL query I found below output
SELECT
@@servername AS 'Server Name'
,@@servicename AS 'Instance Name'
,DB_NAME() AS 'Database Name'
,HOST_NAME() AS 'Host Name'
Output:
Server Name: MY-WINDOW-INSTA\MSSQLSERVER2012
Instance Name: MSSQLSERVER2012
Database Name: dbDemo
Host Name: MY-WINDOW-INSTA
and My Server IP are:
My Server IP (External): 35.240.XXX.XXX My Server IP (Internal): 10.XXX.X.X
Now I want to connect to my online database from a local remote machine by SQL Server Management studio...
The above screenshot Login and Password are correct. but I am unable to find the exact value for the server name.
I have already used the below values as a server name:
- 35.240.XXX.XXX,1433\MY-WINDOW-INSTA\MSSQLSERVER2012
- 35.240.XXX.XXX,1433\MSSQLSERVER2012
- 35.240.XXX.XXX,1433
- 35.240.XXX.XXX
- .\MSSQLSERVER2012
- MY-WINDOW-INSTA\MSSQLSERVER2012
- .\MY-WINDOW-INSTA\MSSQLSERVER2012
Note: I have also implement all these methods https://stackoverflow.com/questions/16088151/how-to-find-server-name-of-sql-server-management-studio