sql I moved database files, how do I remap the dbs
Posted on 2012-12-29
I had originally created my databases by copying the files and running the sql below. I had to move the files to a different drive.
They were in: C:\OptionDB
They are now in : J:\OptionDB
Here is the command that I used to create the database.
CREATE DATABASE HOD201210
LOG ON(NAME='HOD201210_log', FILENAME='C:\OptionDB\HOD201210_log.ldf')
FOR ATTACH WITH ENABLE_BROKER;
I am also not sure if I can open sql server management studio since I moved the files before remapping or detaching.