How do i configure my sql server logs.

  • Hi guys,

    Please help me. I am running out of diskspace. I already set my server logs and limit it to only 9 error files. yesterday i had free 1Gb of disk space on my drive C. This morning after i log onto my sql and made some queries i had only 27mb remaining...please help..Thanks in advance

    Ching

  • The SQL Server error logs do not require must space. I doubt that those lots are taking up that much space, but check the amount of space in your error log files under the log directory of the installation.

    Your database logs, which are separate, might be taking up space. You need to schedule regular backups of these logs. A database backup does not clear space from them.

  • Is C2 tracing enabled on ur SQL server?

  • Steve,

    Thanks... i try checking it now... be back if i still have concerns... thanks again..

    Ching

  • Mayank Khatri,

    Where can i find the C2 tracing please help...

    Ching

  • Run sp_configure (you might need to enable advanced settings) or check the server properties. c2 Audit more is a configuration setting.

  • Steve,

    What do you consider may cause the eating of my disk space aside from the log file? i made a couple of transaction queries a while ago and now i have only 8 mb on disk space available. Can you help me with this please...

    Ching

  • Hi Steve,

    I try the method of changing the default directory of the data file into my D drive. Fortunately, now i can continue with my work. But still if you can advice some alternative or better ways rather is very much appreciated... Thank you...

    Best,

    Ching

  • Hello Ching,

    not sure which of the files is taking space... is it .mdf, .ldf or both?

    Also, if you can tell me the growth rate.....

    Please reply so that i can move further....

    Rgds,
    Pankaj

  • 1) Do you have any idea what file or files is taking up the space you had yesterday?

    2) select * from master.sys.databases and look for files that are in FULL recovery mode but which you are not backing up the transaction log

    3) select * from master.sys.master_files and look for files with a large size.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • TheSQLGuru has the advice I would give. You need to determine where your space is being taken up. We can't help you until you determine if this is an audit log, a transaction log, a data file, etc. You need to record the file sizes, and then track them to determine what is being changed.

    Changing the default data directory wouldn't matter unless you created a new database. Did you do that?

  • Hi pankaj.baluni,

    The .ldf is taking most of the space than the .mdf

    Regards,

    Ching

  • Hi TheSQLGuru,

    The .log file is taking up most of the spaces than the .mdf... i already made a backup of the database...

    Thank you.

    Best

  • For Steve,

    I have posted reply on Sql guru what file taking most of the spaces its the .ldf ... i hadnt tried changing the database. but i already made a backup (*.bak) of the database.

    Ching

  • A backup of the database does not affect the log file. You need to schedule a log backup separately.

    You need to know what files are "changing" size, not which is larger. A log file might need to be larger than a data file in a busy environment. It depends on how they are being used.

    My guess is that you have a database in full recovery model, and you are not doing log backups. So the log file keeps growing. If you do log backups, then the space in the log file will get reused.

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic. Login to reply