Link to home
Start Free TrialLog in
Avatar of gleads
gleadsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL Server transaction log

I have 2 servers configured in a primary secondary model with transaction logs shipped from the primary to the secondary every 10 minutes.  The log file on the primary is 32Gb.  Is it possible to reduce this without breaking the log shipping? and if so what is the best way
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand 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
Avatar of gleads

ASKER

Can you be more specific?  Shrink it or truncate it?  What load will this place on the server (primary especially) while this occurs?
truncate does not shink the file size, but marks the space as unused within the file

shrink if your log contains free space and you want to free it

so do one then the other

CHECKPOINT first will make it possible to truncate
Avatar of gleads

ASKER

deisn't truncating break log shipping though?
Avatar of dervishi
dervishi

You can make a full backup of database then the log file will be truncated after full backup.
Avatar of gleads

ASKER

their is a full backup taken each evening of the datatbase, do i need to take one of the log fil - will this not break the log shipping though?
What's the size of this DB to begin with.. if you have a large Trn every 10 minutes then either there is something wrong or log-shipping is not suitable for this purpose and should choose replication ... if your tables have proper primary keys that are also suitable for replication purposes... otherwise depending upon your bandwidth .. you may not even get a chance copying the first Trn to the second server..