• I got this right because my copy of Local Transact SQL Help says as does BOL

    ' database_name ' | database_id | 0

    Is the name or ID of the database for which to run integrity checks. If not specified, or if 0 is specified, the current database is used. Database names must comply with the rules for identifiers.

    REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD

    Specifies that DBCC CHECKDB repair the found errors. The specified database must be in single-user mode to use one of the following repair options.

    I read it such that if you don't specify a database it will default to the current one. I guess not with the REPAIR commands?

    Originally I thought it was an error... but reading that it seems that it should be right... it's not... but I think it should be.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]