Refreshing User Trial from Production

  • I would like to be able to automate refresh of User Trial once a week from Production. Both are on the same Server.

    Are there any sample scripts which would show me how to do this. I envisage doing this at night but I guess the script would also have to kickout any users who may remain logged in.

  • create and schedule a task

  • Use Data transformation services.

    It will virtually walk you through and you

    should have an option of scheduling

    Mike

  • Create a task that backs up the main database and restores it to the test database

    using scripts similar to the following:

    BACKUP DATABASE [<DBName>] TO DISK = N'Replication.BAK' WITH INIT, NOUNLOAD, NAME = N'Replication backup', NOSKIP, STATS = 10, NOFORMAT

    and to restore into the Trial db:

    RESTORE DATABASE [<TrialDB>]

    FROM DISK = 'replication.BAK'

    WITH REPLACE

    We have our production database replicated to our training database every nightusing the above scripts. Works very well

    Nigel Higgs

    Software Engineer

    RLM Systems Pty Ltd

    Nigel H.
    Infrastructure
    Lockheed Martin Australia

  • Thanks for the replies. I used Nigel's suggestion which works fine. The only problem I had is if users were still logged in.

    I resolved this by using nhamilton script

    Kick all users out of a DB

    http://www.sqlservercentral.com/scripts/contributions/907.asp

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

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