My client wants me to create a demo site with a demo database that updates every 30 minutes; allowing users to just get in, mess with the data and then auto-reset.
What would I need to do on the server to have it automatically refresh every 30 minutes?
I'm thinking I would create my sample database. Create a backup of it.
Then create a Job that would Restore the backup and run that job every 30 minutes.
Something like this? Will it run if the database is in use? How would that work?
Is there a better way?
RESTORE DATABASE [DEMODBF] FROM
DISK = N'C:\DBFBackups\DEMODBF_Hourly.bak'
WITH FILE = 1, MOVE N' DEMODBF '
TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DEMODBF.mdf',
MOVE N' DEMODBF_log'
TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DEMODBF.ldf',
NOUNLOAD, STATS = 10