Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Posts
    9

    Unanswered: where sp_dboption get store ?

    Is there is any table in which SQL Server stores sp_dboption ??
    How are we query and see value for each database ?

    thank you
    W

  2. #2
    Join Date
    Jun 2002
    Posts
    9
    Values of sp_dboption.

  3. #3
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    To see a list of values that can be set :
    exec sp_dboption

    To see values set for a given database :
    exec sp_dboption pubs

    To see values set for all databases :
    sp_MSForeachDB 'print ''?'' exec sp_dboption ?'
    MCDBA

  4. #4
    Join Date
    Jun 2002
    Location
    London
    Posts
    1
    The options are stored in two columns in master..sysdatabases - status and status2. Check BOL for breaking down the value.

    As for querying, a select from sysdatabases with a (large) case statement on both status and status2 should do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •