restoring change logs

  • Greetings again !!

    I am trying to make sure that when we restore from backup, the channge logs get restored also. The query given to me by the help desk does not include all the change logs....only the current one (generally empty). I am using the following query. Can anyone point me in the right direction to get all the change logs (I believe the file names are "OUR_CHANGE_LOG_0000/0001/0002....) (please note the paths are spread across lines due the edit-screen width)

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

    restore database CW_Data from disk = 'C:\1_12_09\bu_1_12_09.cwb'

    with move 'OUR_Data' to 'C:\Program Files\

    Microsoft SQLServer\MSSQL$test\Data\OUR_Data.MDF',

    move 'OUR_Log' to 'C:\Program Files\

    Microsoft SQLServer\MSSQL$test\Data\OUR_Data_Log.mdf',

    Replace

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

    Thanx !!

  • Scripts abound everywhere. Search here, use BOL, Google. Do you know exactly what you're trying to accomplish on the restore? Point in time, last full backup and all logs after that? Enterprise Manager can do a bunch of the work for you with a couple of clicks of the mouse.

    http://technet.microsoft.com/en-us/library/cc966495.aspx

    -- You can't be late until you show up.

  • I'm not clear on what you mean by "change logs". Do you have some files that you are using to track changes to the database?

    If so, that's going to be something outside of SQL, and is either something built at your company, or by some software vendor, and you'll need to get support for it from whomever built it.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Terry...thanx for the link...it adds some light to the end of my tunnel. Most of my IT is VFP, VB, and MUMPS. I'm new to but getting there with SQL.

    G^2...The system is written in VB and SQL. I don't have the source code available so I'm in the dark a little.

    Ciao

Viewing 4 posts - 1 through 3 (of 3 total)

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