Home > Archive > Microsoft SQL Server forum > July 2005 > Connect to SQL Server dialog









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Connect to SQL Server dialog
polinaskulski@aol.com

2005-07-05, 9:23 am

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

Simon Hayes

2005-07-05, 1:23 pm


<polinaskulski@aol.com> wrote in message
news:1120572207.464620.272820@g49g2000cwa.googlegroups.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


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com