views:

18

answers:

1

I am doing a project of a web enabled database. I have created the database file in my PC.

Now when I just want to open .mdf i.e. of the database I created, I cannot open it in other PC. I even had copied the .ldf file i.e the log file to that PC.

Since I need to transfer the database to the Server later, I don't know how I will dump the database in that server from my PC so that the company can use it.

+1  A: 

The basics of using mdf file is like this:

  1. Create a new database using SQL Server (set the path for the file as you wish)
  2. If you wish to move the file elsewhere,
    • detach the database from your server
    • copy/move the file to wherever you wish
    • attach the file as database in SQL server

You are not supposed to open the file by double-clicking as mime setting or attachment of extensions migh not be there in the target machine.

Why don't you use the decent method to copy/move database?

Kangkan
@Kangkan Thanks. I got it.. I am a new user and was learning and also doing this project. so was confused. Regarding the columns it has. i.e. it has options while dettaching "drop","update" and "keep" what does it mean? i tried option of keep being disabled and enabled it works perfectly the same!!
Nagaraj Tantri
The headers of the columns detail out what they mean. "Drop" relates to whether you wish to drop the users connected to the database at that time. "Update" is for whether you wish to update statistics and "Keep" relates to whether you wish to keep the full text catalog.
Kangkan