SQL Server Performance

Error: The database must be online to have a database snapshot

Discussion in 'SQL Server 2005 Database Mirroring' started by ashish.johri, Sep 18, 2007.

  1. ashish.johri New Member

    I have created one Mirror DB ('QuestMirror') for the principal one. This is in Restoring mode now.
    Now I want to get snap shot (SnapshotDatabase) for this Mirror and I write my query like below:CREATE
    DATABASE SnapshotDatabaseON(
    NAME = 'QuestMirror', FILENAME = 'D:program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataMySNAPSHOT.mdf')
    AS SNAPSHOT OF QuestMirrorThe error is : "Msg 1822, Level 16, State 1, Line 1
    The database must be online to have a database snapshot."
    -------------------------[:'(] How can make this online?
  2. thomas New Member

    Is it Enterprise Edition of SQL Server 2005? Need that for snapshots.
  3. ashish.johri New Member

    Yes. Please note that I am creating the snapshot on the mirror DB.
    Regards,
    Ashish
  4. thomas New Member

    Your syntax looks correct. Is mirroring established and synchronised?
  5. ashish.johri New Member

    Yes the mirroring is established and synchronized.
  6. thomas New Member

    We do this on a mirrored database without any problems. I'll look up the code we use to create them and check, and I'll get back to you.
  7. thomas New Member

    Mine looks like this

    CREATE DATABASE db_dbss_0931 ON
    ( NAME = N'db_DATA', FILENAME = 'H:MSSQLDatadb_Data_Data_0931.ss'),
    ( NAME = N'db_INDEX', FILENAME = 'I:MSSQLIndexdb_Data_Index_0931.ss'),
    ( NAME = N'db_STATIC', FILENAME = 'H:MSSQLDatadb_Data_Static_0931.ss')
    AS SNAPSHOT OF db

    So... can't see what is wrong with yours, I'm afraid..!?
  8. ashish.johri New Member

    Thanks Thomas for your comments. I shall set up the quorum again from scratch and let you know. Latest is the same error :( .

Share This Page