0

How do I import data in the Database.mdf file into a SQL Server? I am using RazorSQL to access the MSSQL database, and tried to "import" the data, but did not know which "separator" to use.

I presume that my DotNetNuke data is in the Database.mdf file since WebMatrix was running locally and the web.config files references it.

I have an LDF file as well.

Using WebMatrix Migrate is not an option. This is a manual procedure I am looking for.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
sandraqu
  • 1,428
  • 1
  • 14
  • 31

1 Answers1

1

Open up SQL Server Management Studio and connect to your database server.

Then follow these steps:

Attaching a MDF file

Attaching an MDF file without LDF

This will get your database into SQL Server then you can export the data or do whatever you want with it from SQL Server management studio.

Ryan Doom
  • 2,407
  • 1
  • 16
  • 13
  • You might run into issues (at least I have) with connecting to the dotnetnuke database (mdf) while the website is running, so you may have to kill the web server in order to connect with SSMS, the same goes going the other way. – Chris Hammond Nov 17 '11 at 03:33
  • Thank you. How would I "kill" the server if the website is on an online hosting provider? – sandraqu Nov 17 '11 at 17:57
  • Working with online SQL Server providers is often a terrible experience. You usually will be able to connect remotely via SQL management studio. I tend to connect to my local box and script out my database schema and all data. Then make a new database on my hosted server. Connect via SQL management studio and run the scripts. – Ryan Doom Nov 20 '11 at 00:49