I have one problem with service base database, I have used it in one of my application but I dont know if user who'll use it need to have something installed to be able to run application (like you need to have installed NET framework for c# applications)
Note: This is windows application
It depends on what database engine you're using. SQL Server/SQL Express/Oracle/MySQL require you install the application on the machine before it'll work. databases engines like SQLite and Firebird are just Dll's, so you can include then in your project.
If the file is an MDF that's a SQL Server file - you need to install SQL server, or SQL express.
You can include it with your app and do it silently:
http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/7180e4dc-5c1e-4501-83d7-6882abb1f04e/
You will need to install the relevant database engine with the correct service name, and create the database and relevant objects on installation.
Related
I have create a Windows application in WPF using Visual Studio 2013, and I'm using MySQL as database, now I want to include MySQL as a distributable package in my setup file.
I am new to development and have very little idea about deploying the software, and i have been searching over the internet but hardly finds any good article which explains the steps to perform the task.
A MySQL database is supposed to be setup on a (remote) database server that the client applications connect to. You don't (or at least you shouldn't) set up a server on each workstation where your client application is installed on.
What you probably want is a self-contained database that can be shipped with your application and run "as-is" without any remote servers or specific setup.
SQLite is a popular example of such a database.
Getting started with SQLite in C#: http://blog.tigrangasparian.com/2012/02/09/getting-started-with-sqlite-in-c-part-one/
Use this:
https://marketplace.visualstudio.com/items?itemName=UnniRavindranathan-MSFT.MicrosoftVisualStudio2013InstallerProjects
And then follow this:
http://geekswithblogs.net/TarunArora/archive/2014/04/24/visual-studio-2013-installer-projects-ndash-hello-world-installer.aspx
There will be settings which you will be setting when creating installer with the wizard, one will be like pre-requisites for the program and will ask you for a MSI location for that program. Dump the location of your LocalDB or whatever MySQL software that you are using (Popular ones are SQLite/SQL Server Express). When the user starts to install the program it will make them install your SQL prerequisite software before moving onto installing your program.
I have developed a Windows-based project using C# and MySQL. Now I want to deploy this project to my client.
How to create an Installer (package)?
How to dump the database into the client's system?
Note:
Applications will be installed across multiple systems -- each system has their own database
System doesn't have MySQL installed (installation is not preferred).
This is a completely standalone application, not related to any servers.
Problem: I cannot ask the end user to install MySQL in their system to be able to export, dump, and import in every system.
Required: A package installer which installs my project along with MySQL patches and required data in database.
You can create an installation package using install shield
Other alternatives
http://karcollection.blogspot.in/2012/05/mysql-silent-installation-in-windows.html
http://karcollection.blogspot.in/2012/05/mysql-silent-installation-in-windows.html
Hi have you used MySQL just because its a freely available database product?
by the sound of what your asking would SQL CE not be a better database option?
http://en.wikipedia.org/wiki/SQL_Server_Compact
As far as i know with SQL CE you can embed the database into the application and would not need to install a database server on the client computer.
I have developed a C# application with SQL database, now i want to package it with the database and deploy it on some other machine which does have sql installed. How should i go with it.
What should be the connectionstring for the project, currently i am using "initialcatalog".
Pls Help
I am not sure, if I understand the question well.
If this is a C# class library only, you can get the dll and deploy in the required application.
If this is a web application, you can either create a web deployment package or publish the site.
For SQL migration, you can used the database publishing wizard from microsoft.
http://www.microsoft.com/en-in/download/details.aspx?id=5498
I hope my answers helped you.
Make .bak file of your SQL database.
Publish c#.NET application.
In the folders where you programmed this application, you will find published setup of your application.
Complete wizard in that publish setup folder.
upload database backup file(.bak) where you want to install application.
In this way you can deploy your application.
there are some install maker tools like install shield, which you can make a setup for your application,
About your connection string if your sql server is on your local computer you should set the "DataSource = . "
somthing like this : "Data Source=.;Initial Catalog=yourDBName;User ID=sa;Password=1"
the dot means local computer.
to create your data base on the target computer you can right click on your database and select task\generateScript and follow the wizard to make your database script the run that script on the target computer.
It's a common practice to include mdf or sdf file directly in solution (at least that's how are a lot of MS examples like Northwind/AdventureWorks are done). So you need to detach your db and then simply reattach it to other db server. You can read more here http://goo.gl/0FV1N
You can create a set of SQL Scripts to build the database via T-SQL or you could create a script to attach a new database to the server using the MDF/LDF files you include with your project.
Examples:
C# use script to create database
http://support.microsoft.com/kb/307283
Regardless of how you do it, you'll first need to establish a connection to the SQL Server with rights to create a new database. You might want to prompt for these values during install or on the first launch of your program.
Let's suppose I made an application in .net using sql server as database.
So if I want to deploy my application to some another PC i have to instal sql server
but I want that i should not install the sql server and my database should be automatically installed
i just want to make sure that is the concept of Local Database can fulfill my requirement
if so then how is it possible for me
thanks
You can use App_Data folder in the visual studio to store your .mdf files.Once you transfer your solution to a different system , the db file will be transferred automatically.
http://msdn.microsoft.com/en-us/library/ex526337.aspx
You should run your SQL server on a separate computer (server) to avoid having to install SQL server on all client computers. This way all PCs running your application can share a single instance of SQL Server.
If you want a single user DB per application instance I would recommend using SQL Compact edition instead
You can use SQL2012 Express Edition LocalDB. This uses a self contained file for your database, and can be installed as a prerequisite. When your application installs, you can install a blank database file, and connect to it.
SQL Server is not a small application that will be installed automatically and will require setup and configuration. You can however use it remotely. Or consider using an embedded database. But if you want to use a local database, you can use your mdf file of the database as a local database.
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?
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.
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.
You can use sqlcmd for that, it installs with MSSQL server on client machine look here for details.
After you created bat file, you can run it from code use Process.Start
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.