Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Regarding .mdf file expiration

Author  Topic 

rammohan
Posting Yak Master

212 Posts

Posted - 2008-04-18 : 02:12:37
hi,
here i am using .mdf file as database for my project. i want this .mdf file should be expired or become read only after 365 days exactly. how can i achieve this?

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-18 : 02:16:08
You'd have to setup a SQL job to do it. You can use ALTER DATABASE to set it to read-only. Check SQL Server Books Online for details.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-04-19 : 05:07:54
Add a daily job , with relevant t-sql

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -