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 2005 Forums
 SQL Server Administration (2005)
 Connection Confusion and Safeguards

Author  Topic 

doco
Yak Posting Veteran

77 Posts

Posted - 2012-03-08 : 16:59:03
Using SQL Server 2005 Management Studio version 9.00.1399.00

We run a number of databases not the least of which is one we identify as TEST. This database allows for well, testing on real data without affecting the production data.

Today I was testing an update query while the production database was disconnected and only the test database being connected. However, I learned a painful and embarrassing lesson. The connection in the Object Explorer does not necessarily imply the ACTUAL connection in the query editor . Needless to say I had created an investigation (select) query against the production database to review the data I wanted to update. Then, y'all probably know where this is headed, to my shock and dismay I ran the update from the same query editor and yes, it was against production. The reason this is true is because the query editor was yet connected to the production database.

So, to my question. Not to make excuse for my truly novice blunder, but is there an option available that might give warning that queries being run are against db's that are not shown in the Object Explorer? Seems like this might be a handy little annoyance to have.

Education is what you have after you've forgotten everything you learned in school

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-08 : 17:26:45
No and this is why you need to be very careful when running queries on a client that has access to both prod and non-prod. We've all made this mistake and have learned to double-check and triple-check what server we are connected to.

Having said that, use this: http://weblogs.sqlteam.com/tarad/archive/2011/06/17/fixing-ssms-tabs.aspx

9.00.1399? Why aren't you running service pack 4?!!!

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

doco
Yak Posting Veteran

77 Posts

Posted - 2012-03-09 : 10:14:44
quote:

9.00.1399? Why aren't you running service pack 4?!!!



Not aware it existed.

quote:

Having said that, use this: http://weblogs.sqlteam.com/tarad/archive/2011/06/17/fixing-ssms-tabs.aspx



Went to the link. Interestingly, under Tools | Options | Text Editor - there is no Text Editor and Status Bar option


Education is what you have after you've forgotten everything you learned in school
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-12 : 12:47:56
Install service pack 4 then. You are running a very old version that has had thousands of bugs fixes and some features added.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-03-12 : 13:00:46
I don't think the feature exists to color your tabs and status bars in SQL 2005.

But SQL Server MVP and SQL Team contributor Mladen Prajdic wrote this tool which allows you to do it in SQL 2005.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-12 : 13:15:51
Ah! I've got 2008 R2 tools installed and use it for 2005.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-03-12 : 13:17:47
me too
Go to Top of Page

doco
Yak Posting Veteran

77 Posts

Posted - 2012-03-12 : 14:33:14
Hmmm... we have SQL Server 2008 R2 on the server and use as 2005 as well.

Education is what you have after you've forgotten everything you learned in school
Go to Top of Page
   

- Advertisement -