SQL Server Who Lock

When working with SQL Server, two procedures that I use from time to time is sp_who and sp_lock. The sp_who procedure provides information as to which loginame, hostname, dbname are for current users. Usually I am just interested the activity on a given user, which you can use the following SQL command.

sp_who @loginame = 'sa'

The sp_lock procedure reports on which sessions ids are locked in the database. There are different level of locks such as database, table, and data locks.

Technorati Tags: , , , , , ,

Related posts:

  1. SQL Server Query Shortcuts
  2. JDBC and SQL Server 2005
  3. Create SQL Server Database and Database Tables From a File
  4. Desc SQL Tables
  5. Copy Data Between Two Database Tables

This entry was posted in SQL, TechKnow, Tools. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*