Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

MSSQL LOG shrinking

Updated: 21 May 2010 | 5 comments
Claudio Veronezi's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

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

discussion Filed Under:

Comments

Mouse's picture
28
Sep
2009
0 Votes 0
Login to vote

It seems that bpnotify will not work with SQL backups....

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. 
 
Mouse's picture
28
Sep
2009
1 Vote +1
Login to vote

You can use maintenance plan inside the db engine

Just create maintenance plan for shrink and run in schedule after the backup 

Claudio Veronezi's picture
28
Sep
2009
0 Votes 0
Login to vote

I was thinking about it.

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 Veronezi Mendes
EMC TA - Pre Sales at Compwire
Londrina - Pr - Brazil
 

Claudio Veronezi's picture
28
Sep
2009
0 Votes 0
Login to vote

Thanks

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..

Claudio Veronezi Mendes
EMC TA - Pre Sales at Compwire
Londrina - Pr - Brazil
 

James Perry's picture
28
Sep
2009
0 Votes 0
Login to vote

I know that the MS Admins

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.