|
Home > Archive > MS SQL Server > March 2006 > how to clear up log file in primary database in log shipping ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how to clear up log file in primary database in log shipping ?
|
|
| lovexueer@gmail.com 2006-03-31, 7:24 am |
| our database system is runninig in log shipping mode.
currently, primary database log file get much more bigger,
but I dare not shrink log file in primary database ,
because do this will affect log shipping.
any way reslove this?
regards!
| |
|
| Backup Log has Active and Inactive Portions. To Truncate Inactive
portion user the following command in SQL Query Analyser
USE The following Command
BACKUP LOG { database_name | @database_name_var }
WITH TRUNCATE_ONLY
| |
| Tibor Karaszi 2006-03-31, 9:23 am |
| That would break the log shipping!
AFAIK, shrinking of log file should be OK in a log shipping scenario...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/
"Rex" <r.ghodasara@gmail.com> wrote in message
news:1143808657.133001.205870@u72g2000cwu.googlegroups.com...
> Backup Log has Active and Inactive Portions. To Truncate Inactive
> portion user the following command in SQL Query Analyser
>
> USE The following Command
> BACKUP LOG { database_name | @database_name_var }
> WITH TRUNCATE_ONLY
>
| |
| lovexueer@gmail.com 2006-03-31, 9:23 am |
| thanks ,
but according to your point
as time goes, the logfile will get bigger and bigger,
shrinking logfile is not the best way?
do you think so ?
I meant how to clear up logfile and don't affect log shipping?
| |
| Tibor Karaszi 2006-03-31, 9:23 am |
| The log file is emptied each time you do backup of the transaction log. So, it will grow until it
has the size needed to accommodate the modifications you do between two log backups, so just let it
be the size it need to be. If you see it grow beyond that, you can perhaps have had a long running
transaction in the log preventing the file to be emptied to a high degree. See
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more information.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/
<lovexueer@gmail.com> wrote in message news:1143814572.962154.266770@g10g2000cwb.googlegroups.com...
> thanks ,
> but according to your point
> as time goes, the logfile will get bigger and bigger,
> shrinking logfile is not the best way?
> do you think so ?
> I meant how to clear up logfile and don't affect log shipping?
>
|
|
|
|
|