SDX Help
Knowledge Base > SQLServer > Create a New Log file from a Command Line |
If the log file is too large and you want to create a new log. Detach the database. Rename the old log file to something like jpegger_log1.ldf (or move it to another directory). Then from Management Studio, open a new query and enter the command:
create database [jpegger] on (FILENAME = ‘C:\jpegger.mdf‘) for attach_rebuild_log
where jpegger is the name of the database and ‘C:\jpegger.mdf‘ is the path for the mdf file surrounded by single quotes(‘).