Monday, June 20, 2005

Some Useful SQL Queries

Here are some useful SQL queries:
  • select serverproperty ('productlevel') // SP version
  • select serverproperty ('productversion')
  • select serverproperty ('edition')
  • select @@version // version+edition, also platform version + build + sp version

The system stored procedure xp_msver can return more detailed info than the SELECT @@VERSION query method.

Adopted from the book Assessing Network Security by Ben Smith, David LeBlanc, Kevin Lam.

You don't need to be sa to execute queries and stored procedure above. A login with the public role on a custom database can execute them!

0 Comments:

Post a Comment

<< Home