Skip to Content
avatar image
Former Member

Regarding Backup or deleting of logfiles

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 30, 2008 at 05:43 AM

    HI,

    Check drop-transation-log-files-in-sql-server

    regards,

    kaushal

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 06, 2008 at 11:30 AM

    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..........

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 28, 2008 at 12:53 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 05, 2008 at 10:05 AM

    Thnx.

    Add comment
    10|10000 characters needed characters exceeded