Link to home
Start Free TrialLog in
Avatar of ICT Engineer
ICT EngineerFlag for Ireland

asked on

Backing up an SQL Transaction Log

Hi,

I am looking to backup an SQL Transaction Log [130GB in size] to reduce the size of the log file. Can you tell me what I should expect to see happen during this process, will the Transaction Log backup process write to the existing Full Database backup file or will it write to its own LOG backup file?

Thanks.
SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ICT Engineer

ASKER

All,  have made a full backup, then a transaction log, all successful, but the log doesn't reduce in size.
I get the below message on why it;s not shrinking.

The log was not truncated because records at the beginning of the log are pending replication or Change Data Capture. Ensure the Log Reader Agent or capture job is running or use sp_repldone to mark transactions as distributed or captured.

Any ideas?
You need to review the replication and/or cdc in place for that table and either remove it temporarily, so you can shrink the log, or otherwise clear that first.  SQL is keeping the log records because you "told" it to.
User generated imageThere was replication set up on it for a test but it's not in use.  Is it safe to just delete this?
Should be, if it's not in use.  Just be sure to follow the steps in the right order, as specified in Books Online.
User generated image" Just be sure to follow the steps in the right order, as specified in Books Online."

Do you have any links, I have zero experience with this.  What is the risk of just deleting from the GUI?
As you can see, we've never actually used it.
Presumably the gui would do whatever is necessary to properly remove the replication, and that's undoubtedly the easiest way.  Go ahead and try that first.

[I'm a DBA so I simply don't use the gui for those types of tasks.  The gui's had its quirks and flakiness in the past, but no doubt gets better over time.]
ICT Engineer, a feedback will be appreciated.
Cheers
Needed to delete replication via command, then set recovery model to simple, then shrink, then set RM to full again. This shrunk the logfile.  Thanks for your help.