Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: Restore to read-only mode

    Hi all,

    EM has the following restore option:

    "Leave database read-only and able to restore additional transaction logs."

    Using this, I can restore to a named transaction, then run a SELECT statement that outputs the current state of my data to a file while the db is still in load mode.

    What is the T-SQL version of this EM property, if it exists. I'm using:

    restore log MyDatabase from MyDiskDevice with file=1, norecovery,
    stopatmark = 'mymark'

    I can't find a read-only attribute in BOL though to use with the RESTORE statement. Can I do this in script???

    Thanks,

    BOb

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    ALTER DATABASE <dbname> SET READ_ONLY WITH ROLLBACK IMMEDIATE
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Oct 2003
    Posts
    2
    Thanks Brett. I'll give it a try.

    Bob

Posting Permissions

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