how can i use the mirrored database? help plz

  • Hi .

    i have a principal and mirror sever ,my mirroring is working ,but i want to use my restoring database in mirror server and restore my files !!!how can i do that?thanks a lot.

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • The mirror database is restoring and is unavailable. Can you explain more what you're trying to do?

    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
  • both mirror and principal server are synchronized and when i stop the mirroring and i want to use my mirror db i get a error .i want to know how can i restore my data in mirror server ?

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • If you've stopped mirroring completely, you can run RESTORE DATABASE <database name> WITH RECOVERY, but to restart mirroring after that you'd need to set up from scratch, restoring a new full backup. The mirror database has to remain offline and restoring for mirroring to work.

    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
  • how can i restore mdf and ldf files WITH RECOVERY?

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • The command is

    RESTORE DATABASE <database name> WITH RECOVERY

    However you can only do that if mirroring is completely removed and once done you can't resume mirroring.

    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
  • Thank you so much my dear friend , GilaMonster .

    i am going to do that ,i will come back

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • thank you.it works ...

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • You can create a database snapshot on a mirrored database to make it readonly if thats of any use.

  • bijarcity(Ehsan Akbar) (3/20/2012)


    both mirror and principal server are synchronized and when i stop the mirroring and i want to use my mirror db i get a error .i want to know how can i restore my data in mirror server ?

    Failover the mirror so the secondary database becomes the principal, the original database will go into restoring mode, allow the databases to synchronise.

    At this point break the mirror, you may leave all databases and endpoints, etc in place and the original principal will now be left restoring. Leave this database as is, to resume the mirroring you need to apply any log backups that occur on the new principal to the new secondary. You may then restart the mirroring session either via the GUI or via T-SQL

    MysteryJimbo (3/22/2012)


    You can create a database snapshot on a mirrored database

    assuming your installed version of SQL server allows this

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Why would you want to restore a database in a mirroring session?I would suggest creating a new database and restoring on the newly created database ,unlike removing the mirroring session and the restoring state of the database and again re-establishing the mirroring session again.Maybe i missed something.

    “When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris

Viewing 11 posts - 1 through 10 (of 10 total)

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