Home Forums SQL Server 2008 T-SQL (SS2K8) Trying to bypass via tsql a database when it is offline RE: Trying to bypass via tsql a database when it is offline

  • I have added what was suggested:

    IF DATABASEPROPERTYEX('archer', 'Status') = 'ONLINE'

    BEGIN

    use archer

    SET NOCOUNT ON

    END

    It looks good until you execute and I get this error:

    Msg 954, Level 14, State 1, Line 3

    The database "Archer" cannot be opened. It is acting as a mirror database.