database attach/detach

  • i have my database with data file in "M:\sql\data" folder and log file in "L:\logs" folder.

    now after detaching the database, i moved across files to another server. i have to attach this database copy on this server. the problem is that i dont have "L:\" on the destination server where i could put the log file.

    will there be any problem if i put both log and data files onto one drive say "M:\" drive and then change the log file path. will i be able to attach the database like this.

  • anam (11/14/2008)


    i have my database with data file in "M:\sql\data" folder and log file in "L:\logs" folder.

    now after detaching the database, i moved across files to another server. i have to attach this database copy on this server. the problem is that i dont have "L:\" on the destination server where i could put the log file.

    will there be any problem if i put both log and data files onto one drive say "M:\" drive and then change the log file path. will i be able to attach the database like this.

    No problem dear, just select the Attach option and select the mdf file you want to attach. dont worry about the extensions, SQL will manage that according to its path

    kshitij kumar
    kshitij@krayknot.com
    www.krayknot.com

  • thanks krayknot. while i was waiting for the response i have created the test and it worked for me and your response gave me confidence that it would be right to move ahead.

    cheers

  • When attaching the db in the new server you will just need to specify (re-locate) the individual files (mdf and ldf).

    Should be fine after that. 🙂

    Adam Zacks-------------------------------------------Be Nice, Or Leave

Viewing 4 posts - 1 through 3 (of 3 total)

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