June 6, 2012 at 12:35 pm
Folks,
Is it possible to programmatically (using T-SQL) to list all the assemblies on my server (different db's) with the associated version numbers ? The idea is to make sure all the assemblies are at the same version in our system. Currently I can double-click each assembly and get the version number , but it is somewhat tedious.
June 6, 2012 at 12:58 pm
you could query sys.assemblies;
i'm sticking the results in a global temp table for ease of reporting, for example:
CREATE TABLE [dbo].[##RESULTS] (
[DBNAME] NVARCHAR(128) NULL,
[ASSEMBLYNAME] SYSNAME NOT NULL,
[ASSEMBLYVERSION] NVARCHAR(4000) NULL)
EXECUTE sp_msForEachdb 'INSERT INTO ##RESULTS select ''?'' As dbName,name As AssemblyName,clr_name as AssemblyVersion from [?].sys.assemblies '
SELECT * FROM [##RESULTS]
ORDER BY [ASSEMBLYNAME],[ASSEMBLYVERSION],[DBNAME]
Lowell
June 8, 2012 at 7:05 am
Thats terrific ... thanks Lowell. I went through many forums and there wasn't anything close to this.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply