-
T Log backup
If i restrict the size of trans. log to say, 3o MB , then how do i schedule its backup inorder to prevent getting the error "LOG FULL"
-
Use a performance counter to monitor it. When it is say 80% full then back it up which will empty most if not all of it out.
-
Create a performance condition alert using SQLServeratabases - Log File Used Size counter reaches 80% of your file size, and go to response tab, create a new job that backs up transaction log and define it as a response.
-
1. do checkpoint and backup the log often. (with NO_LOG)
or
2. change the recovery mode to simple
or
3. follow skhanal's and knookie's advice
or
4. dont restrict the log size.
-
Try this, plated with a little but it works
create procedure mylog @dbname varchar(50)
as
declare @logspace int
truncate table tempdb..logspace
insert tempdb..logspace (dbname,logsize,percentused,status)
execute('dbcc perflog')
set @logspace = (select percentused from tempdb..logspace where dbname = @dbname)
print @logspace
if @logspace > 50
backup log northwind with truncate_only
else
return
This will run a backup log with truncate if your percentage used is over 50%.
HTH
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|