Finding user connected to a Database in SQL Server 2008

  • Hi,

    We were using the below query to find any users connected to a particular database in MSDE 2000.

    select * from master..sysprocesses a, master..sysdatabases b

    where a.dbid = b.dbid and b.name = '<DBName>'

    Now we are planning to upgrade the Database to SQL Server 2008, After upgrading to 2008 and restored the SQL Server 2000 database backup. We are always getting a record with lastwaittype as "CHECKPOINT_QUEUE" in the above query result.

    I want to know the following

    1.Why the checkpoint_queue Record is coming?

    2.How to avoid checkpoint_queue record?

    Can anyone help me on this? Thanks in Advance.

    Regards

    Karthick R

  • What's the SPID? I'm going to guess it's way under 50. Means it's a system process and can be ignored.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gail,

    The SPID is under 50 only, But i want to understand why is this happening? and This is happening only for the database where the Old version Backup is restored.

    Regards,

    Karthick R

  • It's probably the checkpoint process. As I said, don't worry about it. The system processes have all sorts of wait types in 2005 and above and they're supposed to have them. That's one of the waits that you just ignore.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • It is the checkpoint process, waiting to service the next checkpoint request. Totally normal and nothing to worry about. See http://msdn.microsoft.com/en-us/library/ms179984.aspx for a description of the wait types you might encounter. The descriptions are not huge on detail, but are often helpful enough.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply