vferrari
asked on
Is there a way to programmatically change the recovery model on user DB's in MS SQL Server 2000?
Here's my situation: I have a developer who consistently forgets to reset the recovery model to Full after he works on his database (usually when he restores or if he changes models just for speed sake). Unfortunately, the DB server he's working with houses about 40 other databases. His is by far the largest, and the transaction log for him alone gets to the point where it chokes the server and brings down other DB's.
Ideally what I would like to do is set up a job that runs every night before the backup runs that changes the recovery model on any user databases (or even specific ones if I have to) via a stored procedure, etc.
Can anyone point me in the right direction? It would save immense amounts of grief.
Thanks!
Ideally what I would like to do is set up a job that runs every night before the backup runs that changes the recovery model on any user databases (or even specific ones if I have to) via a stored procedure, etc.
Can anyone point me in the right direction? It would save immense amounts of grief.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Aneeshattingal,
That was EXACTLY what I was looking for. Thanks!
That was EXACTLY what I was looking for. Thanks!
to activate the full recovery mode:
exec sp_dboption 'trunc. log on chkpt.', 'FALSE'
to activate the simple recovery mode:
exec sp_dboption 'trunc. log on chkpt.', 'TRUE'