Solved

RESTORE to be possible only for a limited time

Posted on 2013-06-26
6
153 Views
Last Modified: 2013-06-27
I want the backup to be valid only for one day.. so if someone tries to restore on 2nd day, it should say 'not possible- expired'..

but i am not sure EXPIREDATE/RETAINDAYS do that.. are there any other options?
0
Comment
Question by:25112
6 Comments
 
LVL 69

Assisted Solution

by:ScottPletcher
ScottPletcher earned 125 total points
ID: 39279421
Neither EXPIREDATE or RETAINDAYS would do that.  In fact, I don't think there's any way to do that.  

Partly because it's not really logical: they probably figued if you didn't want anyone to use the backup at all, you'd just delete it :-).
0
 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 250 total points
ID: 39279455
The only way of doing something like this would be to have whomever would do the RESTORE to call a stored procedure instead of doing the RESTORE directly.  You would then program this functionality into your stored procedure (perhaps even making it generic and having the procedure restore the latest "valid" backup automatically).


Otherwise, like ScottPletcher says, you do *NOT* want this.  What if your server crashes and it takes you three days to set up a new one?  In this case, you would be screwed as you wouldn't be able to restore from your "expired" backup.
0
 
LVL 5

Author Comment

by:25112
ID: 39280080
hi - the reason we want this is:
users ask for db backup.. its Ok.. but they are known for not deleting from their local machines or let it sit forever..  and hence cause security concern that someone not authorizaed will get it..if we make it expire it in ___ days, it puts some restraint...

any other tweaks that can be done?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 250 total points
ID: 39280092
No - if I get a copy of your database (.bak file), I can restore it and do whatever I want with it for as long as I want.  There is no time functionality built into MSSQL.
0
 
LVL 25

Accepted Solution

by:
jogos earned 125 total points
ID: 39280410
If it is a security concern you definitly should not provide them the files. Have an environment where they can use the restored version for x days.  Central permissions, no one without authority can do anything on it you don't want.  Files can't be copied, restored on local system and backuped again.....
0
 
LVL 69

Expert Comment

by:ScottPletcher
ID: 39281478
You could write a job/process that used the SQL backup history (in msdb) to follow up and delete any local backups made after (n) day(s).
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now