cancel
Showing results for 
Search instead for 
Did you mean: 

Log file - clear?

Former Member
0 Kudos

Good Afternoon,

I have SAP ERP 2005 (ECC 6.0) installed.

SomeInformation:

Windows Server 2003 Standard.

Sql server 2005.

My Instance name is for example ABC

my database folder

ABCDATA1 -> ABCDATA1.MDF 20.480.000

ABCDATA2 -> ABCDATA2.MDF 20.480.000

ABCDATA3 -> ABCDATA3.MDF 20.480.000

ABCLOG1 -> ABCLOG1.MDF 87.915.000

Log file is a lot.

Questions:

1) There is any problem I clear it? its using a lot of space.

2) If there is no problem clearing it, tell me how I can do it without causing any problem.

Thank You

My Best Regards,

Amit

Accepted Solutions (1)

Accepted Solutions (1)

former_member524429
Active Contributor
0 Kudos

<b>Dear Amit,</b><br />

<br />

Please refer following SAP Notes <br /> <a class="jive-link-external" href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=625546" target="_newWindow">SAP Note 625546 - Size of transaction log file is too big</a><br />

[SAP Note 1002099 - How to shrink the logfile on MSSQL server 2000|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1002099]

<br />

<u><b>Depending on whether you want to backup the active transaction log file or not, there are two different ways to solve this problem:</b></u><br />

<br />

<b>1. Backup of the active transaction log file:</b><br />

<br />

a) In SQL Management Studio, run the following statement:<br />

DBCC SHRINKFILE (&lt;name_logfile&gt;, &lt;size&gt;)<br />

<br />

o &lt;name_logfile&gt; = name of the logfile, e.g. sbodemo_us_log<br />

<br />

o &lt;size&gt; = the size the logfile should be shrunk to, e.g. 10 -&gt; 10 MB.<br />

<br />

<b>2. Shrink the file directly and do a full backup afterwards:</b><br />

<br />

a) In SQL Management Studio, run the following statement:<br />

BACKUP LOG &lt;sid&gt; WITH NO_LOG<br />

<br />

o &lt;sid&gt; = name of the database, e.g. sbodemo_us<br />

<br />

b) After success, run the following statement:<br />

DBCC SHRINKFILE (&lt;name_logfile&gt;, &lt;size&gt;)<br />

<br />

o &lt;name_logfile&gt; = name of the logfile, e.g. sbodemo_us_log<br />

<br />

o &lt;size&gt; = the size the logfile should be shrunk to, e.g. 10 -&gt; 10 MB.<br />

<br />

c) It is recommended to do a full backup afterwards.<br />

<br />

<i>To prevent this problem to appear again in the future, you must make sure that a maintenance plan is set up in MS Enterprise Manager, which will backup the transaction log regularly.</i><br />

<p />

<p />

<br />

<b>Regards,</b><br />

<b>Bhavik G. Shroff</b>

Answers (0)