cancel
Showing results for 
Search instead for 
Did you mean: 

NetBackup MSSQL not truncating log

Claudio_Veronez
Level 6
Partner Accredited
Hello,

I'm running NB log policy over several mssql servers,

I'm having some problem because after log backup, the log is not truncated and I'm getting some space problems.

NB 6.5.3 
MSSQL client OK   6.5.3
files      OK
online  OK
diff        OK
full        OK
Log      OK  (but not truncate the log)

Does anyone had these problem?

Thanks.



1 ACCEPTED SOLUTION

Accepted Solutions

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

NetBackup for SQL Server completes successful (Status 0) backups and truncates SQL transaction logs but the amount of physical space on the SQL Server hard drive allocated to the transaction log does not decrease.

http://seer.entsupport.symantec.com/docs/263890.htm


3RD PARTY: Despite backing up and truncating the Microsoft SQL Server transaction logs with NetBackup, the size of the transaction log on the SQL server's hard disk drive does not get any smaller.


http://seer.entsupport.symantec.com/docs/263631.htm

This behavior is normal, and is the result of how SQL handles its transaction logs.  

View solution in original post

19 REPLIES 19

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
Check your script once again.

Follow this article and make sure that you have "- "Backup and truncate transaction log" backs up and truncates the transaction logs." selected

DOCUMENTATION: Step-by-step configuration of NetBackup 6.0 for SQL 2000/2005 transaction log backups
http://seer.entsupport.symantec.com/docs/287788.htm

Claudio_Veronez
Level 6
Partner Accredited
The problem is..

that was the first thing I look for.

I tried to run from de client (not save, exec etc.)

I 've selected "Backup and truncate transaction log" 

Ahhh..

thanks a lot.


sumanreddy
Level 4
Certified

Nice Dcoument.
very usefully.

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
If it works - let everyone know what was the solution

Claudio_Veronez
Level 6
Partner Accredited

The MSSQL dude here told me that he will need to run a script for shrink right after the backup end.

If I ĺl have to use a script I can truncate after that too...

that is correct?


Claudio_Veronez
Level 6
Partner Accredited

Ahh thanks Mouse.

I've just tested the log.. and no truncating a at all.

what else should it be? maybe something about the mssql?

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
You have to use either backup - MSSQL built-it or NetBackup but not both of them.

Otherwise you will not be able to recover your database! (check this article)
http://seer.entsupport.symantec.com/docs/241513.htm
This problem occurs because some software other than NetBackup, including the native SQL backup utility, has backed up and truncated the transaction logs.  To restore the database, either restore only the full backup and any transaction logs prior to the other software's backup and truncate, or restore only the full backup.  


However if your shrink operation does not touch transaction logs, it's ok


Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
Can you share the log output with us?

Claudio_Veronez
Level 6
Partner Accredited


Whitch log do you want to see?


Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
When you running your job from the NBU for MSSQL client gui you can see progress there.

By the way, when was your last full backup?

Claudio_Veronez
Level 6
Partner Accredited
A few minutes ago,

the backup works, status 0, but no truncate..



Claudio_Veronez
Level 6
Partner Accredited
Man. you R greate, I 'll read it all

I 'll test it and send the results here..


THANKS A LOT



Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

NetBackup for SQL Server completes successful (Status 0) backups and truncates SQL transaction logs but the amount of physical space on the SQL Server hard drive allocated to the transaction log does not decrease.

http://seer.entsupport.symantec.com/docs/263890.htm


3RD PARTY: Despite backing up and truncating the Microsoft SQL Server transaction logs with NetBackup, the size of the transaction log on the SQL server's hard disk drive does not get any smaller.


http://seer.entsupport.symantec.com/docs/263631.htm

This behavior is normal, and is the result of how SQL handles its transaction logs.  

Claudio_Veronez
Level 6
Partner Accredited
Can I use an script right after the backup to shrink the Log??



se7en
Level 3
Partner Accredited
Do you have the dbclient log?

Claudio_Veronez
Level 6
Partner Accredited
I'll run today the backup and activate de log.


I'll send it here tomorrow.

That is crazy I'm trying end the MSSQL dude is telling me that there is nothing about truncate.


Thakns for the help.

Claudio_Veronez
Level 6
Partner Accredited
I got no error in client log..


c:\program files\veritas\..... RPT


No error found.



Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified
Well, it can mean that problem is actually on SQL side and your backup is working properly.
Ask your DBA to check why MSSQL does not truncate its log.

rj_nbu
Level 6
Employee Accredited Certified
 
You need to run DBCC SHRINKDATABASE or DBCC SHRINKFILE command in Query Analyzer (SQL Server) to reduce the PHYSICAL size of the log file.
 
Netbackup backs up and truncates ONLY the logical part of the transaction log file, but the Actual shrinking part has to be done on the database itself.
 
 
Here is a MSFT article explaining the process:
 
 
 
 

Relevant snippet from the MSFT Article 873235:
 
Shrink the transaction log file

The backup operation or the Truncate method does not reduce the log file size. To reduce the size of the transaction log file, you must shrink the transaction log file. To shrink a transaction log file to the requested size and to remove the unused pages, you must use the DBCC SHRINKFILE operation. The DBCC SHRINKFILE Transact-SQL statement can only shrink the inactive part inside the log file.

http://support.microsoft.com/kb/873235


And, here is a technote as well: