How to change the location of trans. log file

  • Hi All DBAs

    I am facing one problem as

    currently both my .mdf and .ldf are on the same harddisk drive but now i am facing a problem of space as my .mdf and .ldf are growing very fast so i wants to add new hard disk or to shift one of the .mdf and .ldf to other drive so how i can do this without risk.

    Regards

    Indian_sumesh

  • Why you don't try to add secondary log file in the new location of your harddisk?

    So, you just need to add your harddisk and add a secondary log file.

  • Hi,

    Put the trans-log files on the new disk. Use DEATTACH/ATTACH.

    Bye,

    Frans.

  • Hi,

    Dettach the database and copy the logfile to diffrent location and attach again.

    HTH

    from

    Killer

  • To move a database, or database file, to another server or disk:

    1. Detach the database.
    2. Move the database file(s) to the other server or disk.
    3. Attach the database specifying the new location of the moved file(s).

    BOL for syntax.

  • Adding a secondary log file is definitely not something he should do. I have yet to see a single scenario where having multiple log files gives any advantage at all. Instead it only causes trouble down the road.

  • Thanks All u DBAs

    All u responded very quick and is very important for me .

    Regards

    Indian_sumesh

     

  • Hi,

    Clear the log file(.ldf) file periodically to avoid this problem.

    Regards,

    Prakash.S

     

Viewing 8 posts - 1 through 7 (of 7 total)

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