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

Single-click script execution on multiple SQL Servers.

Moderators: JonathanWatts, Anu Deshpande, dlkj, Colin Millerchip, Michelle Taylor

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

Postby tkdennis » Sat Sep 25, 2010 7:59 pm

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: Select all
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
tkdennis
 
Posts: 75
Joined: Fri Feb 29, 2008 1:13 am

Postby Linda Hawksworth » Mon Sep 27, 2010 12:05 pm

I have logged this feature request in our tracking system with reference SE-667. I will be informed if/when the status changes.
Linda Hawksworth
 
Posts: 192
Joined: Mon Jun 25, 2007 11:32 am


Return to SQL Multi Script 1

Who is online

Users browsing this forum: No registered users and 0 guests

cron