cancel
Showing results for 
Search instead for 
Did you mean: 

MSSQL LOG shrinking

Claudio_Veronez
Level 6
Partner Accredited

Hi there,

I would like to know if is there any way of automatically run an script or something to Shrink a MSSQL-log file after the end of the backup (status 0)


Any Idea? material ?

Thanks a Lot
1 ACCEPTED SOLUTION

Accepted Solutions

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
Just create maintenance plan for shrink and run in schedule after the backup 

View solution in original post

5 REPLIES 5

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
Just create maintenance plan for shrink and run in schedule after the backup 

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
Document ID: 272332 
http://support.veritas.com/docs/272332
 

The bpstart_notify and bpend_notify scripts do not get called during a SQL database backup.

 
Details:
This issue is related to a limitation of the DBBACKUP.EXE process. During SQL backups, DBBACKUP.EXE is the process responsible for the backups. This process does not have the capability of calling thebpstart_notify and bpend_notify scripts; therefore, the scripts will fail to execute. 
 

Claudio_Veronez
Level 6
Partner Accredited

the problem is,

Lets supose that the backup fail..

MSSQL will try to shrink a LOG that isn't truncated yet.


Would it be a problem??


Claudio_Veronez
Level 6
Partner Accredited


Thank you Mouse,

Our DBA will make a script to shrink every hour, there is no problem on shrinking a log that isn't truncated.


thanks..


James_Perry
Level 4
I know that the MS Admins here have something inline with the backup job that shrinks/truncates the logs for all SQL backups when run successfully.  If the backup fails then they run a log job that backups the logs and then shrinks them.  Normally the log job is scheduled to start half an hour after the SQL job and closes the window two hours before the SQL job normally completes.  That way if it does fail the SQL Server does not have issues with huge logs.