• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Regularly refresh the data in MS SQL database

I'm in need to regularly refresh the data in my MS SQL database. In a sense we are demoing
an application that has some default data in, this data changes as the clients demo it, so every
few days I need to refresh it back to it's original state - data wise, I don't care much for the record
ID's etc.

What would be the best and easies way to do this. The only thing I can't do is revert back using the SQL
back-up. Thanks in advance.
0
vpekulas
Asked:
vpekulas
  • 3
  • 2
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
create another copy of  the original db, let the client make changes on the other copy. When you are asked to revert back to the original, drop the existing db and make a copy of the original db and save it with the name of the db you already dropped.
0
 
vpekulasAuthor Commented:
Is there another way to do this without using another DB ? Eg. generate a script somehow that contains all the data so I can purge the database and use the script to repopulate it again ?
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Of course  it is possible with BCP statement, but Generating the scripts for the existing data will be tough if it contains too many records, especially with Text / image columns. again it will take more time to run tooo. The easiest approach is the backup /restore method.


0
 
vpekulasAuthor Commented:
Unfortunately the  backup /restore method is not available for me. There isn't that many records and no images, mostly just some text etc. Nothing too big and we are talking dozens of records, not 1000's.
Can you elaborate on the BCP statement a bit more please ?
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
then you can use this procedure


http://vyaskn.tripod.com/code/generate_inserts.txt

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now