Loading...


bookmark - How To Install Sql Server Express In Package Deployment With Different Instance Name

How To Install Sql Server Express In Package Deployment With Different Instance Name

 
 Discussion by innosia with 5 Replies.
 Last Update: March 23, 2011, 8:58 pm ( View Rated (15) )
 
bookmark - How To Install Sql Server Express In Package Deployment With Different Instance Name  
Quickly Post to How To Install Sql Server Express In Package Deployment With Different Instance Name  w/o signup Share Info about How To Install Sql Server Express In Package Deployment With Different Instance Name  using Facebook, Twitter etc. email your friend about How To Install Sql Server Express In Package Deployment With Different Instance Name Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

.NET programmer can easily build Setup and Deployment package using existing wizards in VS 2005 or 2008, thus when the setup.exe is run in client, it detects that whether SQL Express is installed or not on the system, and it can install it if requires. The fact is, programmer does not have any options such as

- Changing the database instance name, the default instance name is SQLExpress and cannot be changed (it is restricted)
- Cannot change the SQL user and password
- Thus this makes SQL Express application hard to be configured automatically, and it causes programmer must do some manual configuration.

In this Tutorial, I have a class name BusinessSQLEXPRInstaller, to use it as installer
- First build your windows form application and add app.config entry
<appSettings>
<add key="IsInstall" value="0"/>
<add key="IsRestart" value="1"/>
</appSettings>

Add both isinstall and isrestart key in app.config, and let the value like that as default

in your windows form, there must be a start up form, in this start up form constructor add
JohnKenedy.BusinessSQLEXPRInstaller _ins = new JohnKenedy.BusinessSQLEXPRInstaller("<Installation Display Name>", "localhost", "<New database instance name>", "<new database name>", "<database password>", "<database backup filename>");
if (_ins.IsDone == false) _ins.ShowDialog();
if (_ins.IsRestart == true)
{
Application.Exit();
this.Close();
return;
}

Change <..> to match with your value.

- After your project is ready, create setup and deployment application
- Then Download SQL Express for free at http://download.microsoft.com/download/e/a...e/SQLEXPR32.EXE
- use command line to go to the exe folder and type : SQLEXPR32.EXE /x
- nows all the files contain in exe resources, will be extracted, and add these extracted files into your Setup and Deployment Application Folder\SQLEXPR2005 folder (create this new folder)
- add your database backup filename (for example mydb.bak which is created from SQL Server Enterprise manager or management studio) and put it in this folder too
- Build your setup and deployment project

The resulted setup.exe now includes the SQLExpress that can be installed by your application using BusinessSQLEXPRInstaller class.
This helps you automate several things
- restore your database to the client without user configuring
- install the database engine without user knowing
- as developer you know the database engine username and password and can be controlled by you as developer
- User does not need to know programming languages, they just click and install, and no need to understand how to setup your application to connect with the database.

   Sun Aug 31, 2008    Reply         

vb.net db sql projectHow To Install Sql Server Express In Package Deployment With Different Instance Name

dears How can I create a setup file in (VB.Net SQL 2005 database project), without installing sql server on another PC and running the program.

thanks,

-reply by Wura

   Thu Aug 6, 2009    Reply         

can we use sqlserver database without using serverHow To Install Sql Server Express In Package Deployment With Different Instance Name

My dear friends,

I have developed an application using visual basic as front end and sql server as Back end. How can I create a setup file in (VB SQL server database project), without installing sql server on another PC and running the program.

thanks,

 

-question by ghulam haider malik








   Thu Aug 27, 2009    Reply         


Bravo!How To Install Sql Server Express In Package Deployment With Different Instance Name

Congratulations on being the first person willing to talk about how to deploy the actual database. Everyone else tells you all about how to get SQL Express to install, but surely a new database for your application, without the users having to know anything about databases, servers etc (most don't know the difference between the data and the program let alone the client and the server).

Thanks.

-reply by Stuart

 

   Sun Jan 31, 2010    Reply         

answer How To Install Sql Server Express In Package Deployment With Different Instance Name

use connectionstring in your VB application..And make a .Ini file for the connection and other initialization variables..Email me for other more info...Isagani_quino@yahoo.Com

-reply by Isagani

   Mon Mar 15, 2010    Reply         

QUOTE (innosia)


.NET programmer can easily build Setup and Deployment package using existing wizards in VS 2005 or 2008, thus when the setup.exe is run in client, it detects that whether SQL Express is installed or not on the system, and it can install it if requires. The fact is, programmer does not have any options such as

- Changing the database instance name, the default instance name is SQLExpress and cannot be changed (it is restricted)
- Cannot change the SQL user and password
- Thus this makes SQL Express application hard to be configured automatically, and it causes programmer must do some manual configuration.

In this Tutorial, I have a class name BusinessSQLEXPRInstaller, to use it as installer
- First build your windows form application and add app.config entry
<appSettings>
<add key="IsInstall" value="0"/>
<add key="IsRestart" value="1"/>
</appSettings>

Add both isinstall and isrestart key in app.config, and let the value like that as default

in your windows form, there must be a start up form, in this start up form constructor add
JohnKenedy.BusinessSQLEXPRInstaller _ins = new JohnKenedy.BusinessSQLEXPRInstaller("<Installation Display Name>", "localhost", "<New database instance name>", "<new database name>", "<database password>", "<database backup filename>");
if (_ins.IsDone == false) _ins.ShowDialog();
if (_ins.IsRestart == true)
{
Application.Exit();
this.Close();
return;
}

Change <..> to match with your value.

- After your project is ready, create setup and deployment application
- Then Download SQL Express for free at http://download.microsoft.com/download/e/a...e/SQLEXPR32.EXE
- use command line to go to the exe folder and type : SQLEXPR32.EXE /x
- nows all the files contain in exe resources, will be extracted, and add these extracted files into your Setup and Deployment Application Folder\SQLEXPR2005 folder (create this new folder)
- add your database backup filename (for example mydb.bak which is created from SQL Server Enterprise manager or management studio) and put it in this folder too
- Build your setup and deployment project

The resulted setup.exe now includes the SQLExpress that can be installed by your application using BusinessSQLEXPRInstaller class.
This helps you automate several things
- restore your database to the client without user configuring
- install the database engine without user knowing
- as developer you know the database engine username and password and can be controlled by you as developer
- User does not need to know programming languages, they just click and install, and no need to understand how to setup your application to connect with the database.

Link: view Post: 405709


but i dont understand that how to add constructor and ur BusinessSQLEXPRInstaller ?please tell me as soon as possible

   Wed Mar 23, 2011    Reply         


Quickly Post to How To Install Sql Server Express In Package Deployment With Different Instance Name  w/o signup Share Info about How To Install Sql Server Express In Package Deployment With Different Instance Name  using Facebook, Twitter etc. email your friend about How To Install Sql Server Express In Package Deployment With Different Instance Name Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

Similar Topics:

Idea For Using A Cron Job To Grab D...

Here is an idea that I have been toying with for a while now, and I'd really appreciate some help with it, as I'm not a great coder. I can get by, and will probably work out the intricacies of implementing this, all b ...more

   22-Aug-2008    Reply         

Resolving Can 39 t Login To Sqlexp...

When installing Visual Studio 2005 or Visual Studio 2008, the installer will automatically install for us one instance of SQL Server 2005 Express. But we can't actually connect the database without extra tools and we can't login except using Integrated Security. In this article I will explai ...more

   20-Oct-2008    Reply         

Can 39 t Install Anything Due To A...

I'm encountering errors if I try to install/remove anything — after I tried to install gcdemu via the package manager, because I needed to extract a .mdf/.mds compressed archive as cdemu is the only software I know that does that in Linux. I use Ubuntu in this problem. I get t ...more

   08-Jan-2009    Reply         

C# Enable Winform Plugin This article enables your C# Winform application to have flexible menu   C# Enable Winform Plugin This article enables your C# Winform application to have flexible menu (1) (1) Image In Vb.net From Url   Image In Vb.net From Url