cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Backup or deleting of logfiles

Former Member
0 Kudos

Hi Experts,

We are using ecc 6.0 and Ms SqlServer 2005 as database on windows platform.I had kept D Drive(30Gb) for logs now it is (26 Gb)near by ,so want to clean the logs .Please tell me procedure how to do it and give sujjestions on it.

Regards,

Naveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Check

regards,

kaushal

Answers (3)

Answers (3)

Former Member
0 Kudos

Thnx.

Former Member
0 Kudos

To clean the log :

1) the best way : perform regular (hourly) backup to file/tape

2) emergency , to empty log without backup :

BACKUP LOG <DBNAME> WITH NO_LOG;

If you want to shring empty log file for DB with FULL recovery mode :

USE <DBNAME>

GO

-- Truncate the log by changing the database recovery model to SIMPLE.

ALTER DATABASE <DBNAME>

SET RECOVERY SIMPLE;

GO

-- Shrink the truncated log file

DBCC SHRINKFILE (<LOGFILE>, <desired size in MB>);

GO

-- Reset the database recovery model.

ALTER DATABASE <DBNAME>

SET RECOVERY FULL;

regards,

Wojtek

Former Member
0 Kudos

Hi,

There is option in your SQL management studio to trim the log file(could not recollect exactly, i think select log file and right click you can see the option there), but you can specify upto what size you want log to be trimmed, just make sure SAP is down while trimming the log.

Regards,

Raju..........

Former Member
0 Kudos

Hi ,

Thanks for your replies Mr.Kaushal &Sita

Regards,

Naveen

Former Member
0 Kudos

Hi Naveen

You can refer

SAP Note Number 16083 - Standard jobs, reorganization jobs

SAP Note Number 16513 File system is full - what do I do?

SAP Note Number 18307 Batch input logs and reorganization

Also Refer

Top 10 Best Practices for SQL Server Maintenance for SAP

http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/sap-top-10.mspx

Hope this will help you ,,

cheers

dEE