1

How to attach (or register) an existing MSSQL database to a server Using HeidiSQL

1 Answer 1

1

You can always do this with a query:

CREATE DATABASE [YourDB] ON ( FILENAME = N'd:\path\to\YourDB.mdf' ),( FILENAME = N'd:\path\to\YourDB_log.ldf' ) FOR ATTACH

or

EXEC sp_attach_db @dbname = N'YourDB', 
    @filename1 = 
N'd:\path\to\YourDB.mdf', 
    @filename2 = 
N'd:\path\to\YourDB_log.ldf';

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .