1

I am wondering if you can use Linq to SQL using a .mdf file on a machine without a SQL Server instance installed?

Tim Stone
  • 19,119
  • 6
  • 56
  • 66
David Basarab
  • 72,212
  • 42
  • 129
  • 156

3 Answers3

1

You have to attach the database to some instance of Sql server. You'll probably want to do this on the same machine, otherwise you add in network latency (which can be extreme in some cases) when writing to the database.

1

Nope, you need to attach the file to some instance of MSSQL. You can do it with MsSQL Express.

backslash17
  • 5,300
  • 4
  • 31
  • 46
  • Sorry I forgot the link: http://www.microsoft.com/Sqlserver/2005/en/us/express-down.aspx – backslash17 May 17 '09 at 20:04
  • So do you think its possible that .mdf file can be used as a sql database without sql express installation ? I am working on a project in which sql express taking pretty long time and making software bulky in size – ANIL MANE Jun 22 '09 at 15:19
  • You need to attach the file always to a SQL server, don't confuse the MSSQL Express edition with the MSSQL Management Studio Express Edition. You always need an SQL server, the Management Studio can be installed in any machine to administer the SQL instance but it is not an SQL instance at all. – backslash17 Jun 22 '09 at 17:40
1

If the cost of SQL Server is an issue, you can probably use SQL Server Express. It's free. The download for the 2008 version is here. Or you can use the 2005 version here.

DOK
  • 32,337
  • 7
  • 60
  • 92