4 Replies - 2393 Views - Last Post: 30 August 2012 - 05:30 PM

#1 Mohsin01  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 86
  • Joined: 13-April 12

How to use MS Sql server Database file without sql server?

Posted 29 August 2012 - 12:01 PM

hi guys, the header of the question doesnt describe what i want. Recently i made a library management system on visual studio 2010 in c#. and with it i attach sql server with it for database.
i deployed my software and made exe and installed it. now if i want to give this software to someone else to use it, and that person doesnt have sql server installed on his machine. is there any way there i just give him a db file with software and the software will perform all the operation with this file instead of using sql server as db. or everyone who wants to use my software,should have sql server installed??? I hope i made myself clear!!!

Is This A Good Question/Topic? 0
  • +

Replies To: How to use MS Sql server Database file without sql server?

#2 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5391
  • View blog
  • Posts: 27,387
  • Joined: 10-May 07

Re: How to use MS Sql server Database file without sql server?

Posted 29 August 2012 - 12:03 PM

That's the difference between an SQL & a flat file database. One requires an SQL engine to process looksup, manage, reference, & serve up the data.

I'm not aware of anyway to use the file without the SQL engine, or else who would pay for it? I am fairly certain that this can not be accomplished.
Was This Post Helpful? 0
  • +
  • -

#3 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3730
  • View blog
  • Posts: 6,017
  • Joined: 08-June 10

Re: How to use MS Sql server Database file without sql server?

Posted 29 August 2012 - 12:33 PM

You could redesign the app to use SQL Server Compact. It works much like it's big brother, the SQL Server itself, but it connects to a file rather than a server. The file can then be moved to another computer and used there, without having to set anything else up on that computer. (Except the app itself, obviously.)
Was This Post Helpful? 0
  • +
  • -

#4 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 591
  • View blog
  • Posts: 1,318
  • Joined: 24-April 12

Re: How to use MS Sql server Database file without sql server?

Posted 30 August 2012 - 02:50 PM

And there's always the Express edition of SQL Server which is free.

In all my years as a DBA, I think I'm aware of one person who I heard was using the Compact Edition. I thought it was pretty much a local copy of SQL Sever with a drastically cut down feature set.

The first thing you have to be aware of is that SQL Server is a bare minimum of 6 files. That's without a server. There are three databases involved just to say you have the database. The Master database is the core of the server and half of your security accounts. You can't access the database without because the server logins are in the master database. The TempDB database is also pretty much a requirement. It gets recreated every time you start the server. So "theoretically" there's nothing in there you can't do without, but SQL Server itself tends to use it and your code may use it. I assume that you have no scheduled jobs, which would be the MSDB database. Without it all your jobs and scheduling are gone. Model you can basically do without. It's mostly just a template for new databases you are creating. There's also the hidden database introduced in SQL 2005. I can't remember what's in there since I haven't had to deal with it in years. All of this is before you even get to your database. Every database has an absolute minimum of two files, the .MDF and the .LDF. No database will function without both files, although technically you could probably reattach the .MDF and get it to create a new .LDF (this is an extremly bad idea, but it can be done as a last ditch effort). So for master and your database that's an absolute minimum of 4 files, not counting any of the other system databases that I just mentioned, which are required for a fully functional SQL Server.

You might get what you want from a cut down version of SQL Server, such as Compact or Express edition. But otherwise, you'll end up recreating SQL Server before you have enough functionality to properly make use of those files.


I would check out the Compact edition, like mentioned. Also, maybe consider the Express edition which offers similar functionality to the Standard edition of SQL Server.
Was This Post Helpful? 1
  • +
  • -

#5 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,063
  • Joined: 28-December 10

Re: How to use MS Sql server Database file without sql server?

Posted 30 August 2012 - 05:30 PM

This is probably stupid and I've Google'd it too, just want to hear someone's perspective over here, are there no licensing restrictions for Express? Does that mean I can bundle it with any apps I choose to create?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1