Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to Automate SSMS Additional Connection Parms

Author  Topic 

phenreid
Starting Member

29 Posts

Posted - 2010-11-17 : 15:22:01
Every time I login to my remote server via SSMS, I have to type in the Additional Connection Parameters tab:

trustservercertificate=true; encrypt=true.

My apps of course have this in the connection string, but with SSMS I can't figure out a way to automate these settings. If they are not there, I do not get an encrypted connection (across Internet) unless I have VPN -- which in this case I do not.

I was looking for T-SQL that established a connection with connection string parameters or other such method. I have SQL/Server 2008 R2 Express.

Any suggestions?

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2010-11-17 : 17:01:55
It looks like there is a Encrypt Connection checkbox on the Connection Properties tab on the connection dialog. I don't know how to preserve the certificate setting however.

=======================================
Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth. -Oscar Wilde, writer (1854-1900)
Go to Top of Page

phenreid
Starting Member

29 Posts

Posted - 2010-11-18 : 13:19:11
Thx; but without the trustservercertificate=true setting, my connection will fail.

Isn't there some way to connect via t-sql with a full connection string? Maybe a command line to SSMS or ??

[url]http://www.mssqltips.com/tip.asp?tip=1602
[/url]

Above links says you can use SQLWB, but I have 2008R2 and can't find that exe installed on my machine or much about it in Google search. Also, can't see whether there are switches for the trust server certificate.

I can see a newconnections.sqlwbconn file in my program files Microsoft SQL Server folder, but when I open in notepad just has the word CONNECTION. I hope someone knows where to point me.

Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2010-11-18 : 16:38:14
I looked at saving the connection in a Registered Server but there doesn't seem to be an option for specifying the supernummary options. You may want to look at attempting to save the connection inside a Solution. I never use this so I can't say if it would yield anything useful for you.

=======================================
Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth. -Oscar Wilde, writer (1854-1900)
Go to Top of Page
   

- Advertisement -