Thursday, July 9, 2009

How to find SQL Server Property using query

Here’s a quick trick the will allow you to easily retrieve information about the Microsoft SQL Server version that you are currently running. This quick how-to was written using SQL Server 2005, but it’s applicable to SQL Server 2000 as well.
Login to the Microsoft SQL Server Management Studio (Query Analyzer in SQL Server 2000)
Click New Query
Type and Execute the following SQL command:
SELECT SERVERPROPERTY (’productlevel’) as ‘Product Level’, SERVERPROPERTY(’productversion’) as ‘Product Version’, SERVERPROPERTY (’edition’) as ‘SQL Server Edition’

Wednesday, July 8, 2009

Deploy .NET Assembly to GAC

3 steps to deploy an assembly in the GAC:
  • Create or locate Key File for signing: sn -k "Path to SNK File"
  • Assign the Key to your Project (AssemblyInfo File):
  • Deploy the dll: gacutil -I "Path to DLL"