0

In SSMS v19 I can successfully connect/login to a SQL server that is listening on the default port 1433

Server : server.env.domain.com,1433
Authentication : SQL Auth

And I can query any of the databases hosted on this server.

Does SSMS reveal the connection-string it is using to make this connection ? I've searched quite a bit and can't find it.

Or is there an API I can call that would return the exact connection string used by SSMS ?

I ask because I am unable to connect via another app located on the same client machine as SSMS. I would like to know exactly how SSMS is making its connection.

BaltoStar
  • 99
  • 4

1 Answers1

1

SSMS (SQL Server Management Studio) does not directly reveal the exact connection string it uses in its UI. However, you can recreate the connection string by first following these steps to ensure your application is using the same connection parameters:

  1. Check the Connection Properties in SSMS - by right-clicking on the server name in the Object Explorer after connecting to the server. Go to Properties and navigate to the Connection page to see details like server name, connection properties, and authentication type.

  2. Ensure that your other application is configured to use the same network protocols and libraries as SSMS.

  3. Using the SQL Server Configuration Manager, check for any specific configurations or protocols that might be required.

After that you can construct the connection string manually, using the connection parameters collected in the above steps. You can use this link for further info on this SQL Server Connection Strings Reference Guide (mssqltips.com) and SQL Connection Strings tips (sqlshack.com).

Severalnines
  • 419
  • 1
  • 5