Sunday, February 12, 2012

Connect to SQL Server dialog

Hi,
Is it possible to avoid the last used server being in Query Analyzer
'Connect to SQL Server' dialog by default(when I click on File/Connect
in Query Analyzer) - I don't want to apply 'truncate table' scripts to
a production server by mistake!
Thanks<polinaskulski@.aol.com> wrote in message
news:1120572207.464620.272820@.g49g2000cwa.googlegr oups.com...
> Hi,
> Is it possible to avoid the last used server being in Query Analyzer
> 'Connect to SQL Server' dialog by default(when I click on File/Connect
> in Query Analyzer) - I don't want to apply 'truncate table' scripts to
> a production server by mistake!
> Thanks

I don't think that's possible - if you're concerned about running scripts in
the wrong place, then you can reference @.@.SERVERNAME in your scripts, or
always begin a transaction and require a manual COMMIT or ROLLBACK. Another
option is to use a dedicated administrator account for deployments to
production servers.

But all those approaches have drawbacks as well, and in the end there's no
catch-all substitute for being careful about what you're doing.

Simon

No comments:

Post a Comment