Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8852489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:24:51+00:00 2026-06-14T13:24:51+00:00

I am doing some testing on a dev database. I would like a easy

  • 0

I am doing some testing on a dev database. I would like a easy way to roll back to a known state, however due to the size of the database restoring from a backup takes 5 minutes to perform.

The work I want to “Rollback” is distributed over many connections, I can not modify the sql for some of the connections because they are from an app I do not have access to the source (so I can’t just wrap my connections with a giant BEGIN TRANSACTION)

Is there something lighter weight than restoring from a backup but I don’t need to explicitly enable like BEGIN TRANSACTION and also works to roll back work done by connections that have opened, performed it’s work, and closed after the point to rollback to was created?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:24:52+00:00Added an answer on June 14, 2026 at 1:24 pm

    You can use database snapshots at the beginning and revert to it at the end. You have to however have all connections closed as it is very similar to BACKUP/RESTORE, though it is certainly more lightweight. One way to do it is it kill all the connections before reverting. If your application can reconnect to a database after a connection failure,this should cover what you want to achieve.

    ----To create a snapshot
    create database SrcDbSnapshot
    on ( name = LogicalFileNameFromSrcDB, 
        filename = 'E:\SrcDB.ss')
    AS SNAPSHOT OF SrcDB
    go
    
    ----To roll back
    --Kills all connections and performs the rollback
    ALTER DATABASE [SrcDB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    RESTORE DATABASE [SrcDB] FROM DATABASE_SNAPSHOT = 'SrcDbSnapshot'
    go
    
    ----To remove the snapshot
    drop database SrcDbSnapshot
    go
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Early on I was doing some debugging and testing using the chrome dev tools(known
I would like to start doing some testing of our SaaS application on our
I am writing a small glue tool for doing some testing and I would
I was doing some testing on an app, and I realized that calling .state()
I am doing some testing on a new html5-css3 framework and I want to
I'm currently doing some testing to determine the performance implications of including an index
I am doing some testing for a very large website, created many different developers.
I was just doing some random testing on locking in multi-threading this morning and
I am doing some initial testing for a Rails app which will be deployed
I'm doing some unit testing, and some of the code is checking to see

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.