i have a winform application in c#on visual studio, connected to a database in sql server 2008 and i have done a deployment to it so to use it i must install the sql server management studio and restore the database backup, so Can i when doing the deployment and setup project include or take the database backup to not need to install the SQL server management studio on the PC use this application and from the application i will take a backup from the updated database which has new records So how do i make a deployment and setup project and embedded in it the database used so i'll not be needed to install the sql server in the PC which act as a server and the clients PCs as i want to use the application in a network?
-
2Excuse me, but if there's a question I'm really in trouble to understand it... Can you explain it better? :) – Marco May 11 '11 at 15:09
-
i think the OP wants to install a winforms app on a client computer and somehow embed the database into the application on deployment so that they do not have to install sql server on the client machine... this is just a guess, but thats the impression im getting. – Patrick May 11 '11 at 15:12
-
How can i do a setup and a deployment project on visual studio to a winform application connected to a database and run on a network and include in it the database backup to not need to install the sql server management studio on the PC used this application ? – mary fayek May 11 '11 at 15:14
-
@patrick what you mean by OP and how i embedded the database on the deployment project that is what i want to do :D – mary fayek May 11 '11 at 15:17
-
Just to run a few SQL scripts to install a database, you definitely **do not** need to install the full SQL Server Mgmt Studio! Every SQL Server installation comes with a [sqlcmd command line utilty](http://msdn.microsoft.com/en-us/library/ms162773.aspx) for this purpose – marc_s May 11 '11 at 15:29
-
@Marziana OP = Original Poster. – Patrick May 11 '11 at 15:34
-
@Marziana, OP stands for "Original Poster". That's you. – Joe May 11 '11 at 15:35
4 Answers
If your database is trivial, should be accessible from a single computer and is used to store local data look to the. http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx. For sure you will need to read additional articles about how to use it and deploy it, but this should be a starting point. NOTE: you will not have stored procedures and advanced SQL Server features, but you will use the same code as you do now.

- 1,425
- 2
- 13
- 24
-
in the code used in the application i used a stored procedures i done in SQL server management studio 2008 r2, you mean that i should install sql s ms. on the PC which acts as a server and the sql compact edition on the clients PCs or what? – mary fayek May 11 '11 at 16:43
Note that if you want to restored a database from backup to an arbitrary SQL Server instance, you may encounter problems if the instance to which the backup is being restored is configured with options different than the original SQL Server instance (e.g., collation sequence, case-sensitivity, ANSI settings, etc.) If the default collation sequence is different, you may have problems with indices, for instance.

- 71,308
- 16
- 93
- 135
It's not the SQL Management Studio that is needed to be installed to make the program work, it's SQLServer that must be installed.
For small applications it maybe to much of work to administrate a SQLServer, in that case its better to use other database types... I used to use XML files, lately I use Sqlite, its very good no installation required. and it integrates great into Visual Studio.
Edit: If you only need to restore a .bak you could use that http://sqlbackupandftp.com/restore/ its very nice and easy, and its a very small file.

- 2,212
- 8
- 33
- 60