|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: 2 days ago @ 1:16 PM
Points: 3,367,
Visits: 1,567
|
|
This worked on all of the instances I tried it on.
declare @value varchar(max)
EXEC master..xp_regread @rootkey = 'HKEY_LOCAL_MACHINE', @key = 'SOFTWARE\Microsoft\Microsoft SQL Server', @value_name = 'InstalledInstances', @value = @value OUTPUT
It returned a list of all installed instances on the servers I tested it on. That only includes 2000-2008 R2 and limited OSs. You would probably have more options to test than I would.
I'm not sure how useful this will be however since I also read that extended stored procedures have been listed as depreciated in 2012.
Kenneth Fisher I strive to live in a world where a chicken can cross the road without being questioned about its motives. -------------------------------------------------------------------------------- For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/ For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Link to my Blog Post --> www.SQLStudies.com
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 2:56 PM
Points: 54,
Visits: 310
|
|
Ooo, nifty! Thanks, I'll give that a shot - I don't have a multi-instance VM at the moment, but I happen to be working with a client later today that's got a bunch, and I'll give it a shot there and let you know how it goes.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: 2 days ago @ 11:53 PM
Points: 1,612,
Visits: 591
|
|
Sorry Brent, at the risk of this becoming an sp_Blitz steering group , I was wondering if a future version of blitz could pick up if a SQL instance (in a maint plan or t-sql) has the Backup set to expire = 1 day? Just for informational purposes?
Thanks
qh
SQL 2K acts like a spoilt child - you need to coax it round with lollipops.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 2:56 PM
Points: 54,
Visits: 310
|
|
Ha! No worries. Do you have T-SQL handy to detect that? If so, can you email it to me at help@brentozar.com? If so I'll add it to the check, but I don't know offhand how to grab that, and I've stopped adding checks that I have to research myself. (Just already have a laundry list of stuff I want to add.)
|
|
|
|