0

I have a SQL Server backup from my server and I have a comfortable way to access the daily SQL Server backups.

I want to do some asp.net coding using Visual Studio 2012, and I do not want to install SQL Server on my machine since it is too heavy and slowing down the system.

I see that you can add .mdf file to a project and use it as a standard database:

  • is it possible to do the same with SQL Server backup?
  • is it possible to extract .mdf file from SQL Server backup without SQL Server?

Thank you in advance, M.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
mdm
  • 43
  • 4
  • Have you thought about installing the Express edition of SQL? – ChrisF Jan 01 '13 at 11:57
  • **No**, you cannot directly "link" to a `.bak` file. And **no**, you cannot use a `.mdf` without installing SQL Server - even if you use the `.mdf` "directly" from Visual Studio, you **must have** SQL Server Express installed. – marc_s Jan 01 '13 at 13:01

1 Answers1

0

SQL Server is one programs runs only in service mode, so you need to have it's server running to gain it's services. The answer is NO, but you can use SQL Server Express or other stuff.

After you had a server running, you can use SQL Assembly to access .mdf file directly, not bu addressing server. You will need to create a connection string like :

Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;

And put mydbfile.mdf into the Data directory.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mohsen Rabieai
  • 244
  • 3
  • 17