Red Gate forums :: View topic - REQ: Change Database Name in Results if USE <database> in sc
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Multi Script 1
SQL Multi Script 1 forum

REQ: Change Database Name in Results if USE <database> in sc

Search in SQL Multi Script 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
tkdennis



Joined: 29 Feb 2008
Posts: 74

PostPosted: Sat Sep 25, 2010 7:59 pm    Post subject: REQ: Change Database Name in Results if USE <database> in sc Reply with quote

I have many databases on each SQL Instance, so my distribution lists are all set to master and I put the database name in the script. It would be nice if the results tab listed the database name from the USE statement that the SQL actually executed within, instead of every result showing the name from the distribution list.

This would include USE statements within dynamic SQL also
Code:
if exists (select 1 from sys.databases where name = 'db1')
   exec ('use db1;exec sp__spaceused ')
if exists (select 1 from sys.databases where name = 'db2')
   exec ('use db2;exec sp__spaceused ')


Thanks,
Traci
SMS 1.2.0.28
Back to top
View user's profile Send private message
Linda Hawksworth



Joined: 25 Jun 2007
Posts: 192

PostPosted: Mon Sep 27, 2010 12:05 pm    Post subject: Reply with quote

I have logged this feature request in our tracking system with reference SE-667. I will be informed if/when the status changes.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group