Install sql server express database engine only - visual-studio

I am deploying a wpf application that requires sql server 2008 as a prerequisite. As a result I am embedding the sql server installer in my application. When that launches the SQL Server Installation window shows up:
I don't want the user to have to go through out this installation. That program will install SQL Express and many other things like SQL Management Studio.
Is there a place where I can download SQL Express 2008 the database engine only? so that the user will just have to click next, Agree, Ok... etc... without having to make complicated decisions. Or maybe is it possible to install sql server express throughout the command line?
I am including the installer in my application because my application is supposed to be able to be installed without having an interenet connection. Also I cannto seem to find a place where I can download SQL Server express the database engine only.

Go here and download the appropriate version of SQL Express. Then see the How to: Install SQL Server 2008 R2 Using a Configuration File article on MSDN. Note that after you generate the config file for the installation, changing the following keys in the config will probably be of particular interest to you:
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only without any user interaction.
QUIETSIMPLE="True"
; Automatically accept the license terms
IAcceptSQLServerLicenseTerms="True"

Related

Advice on creating a local instance of Azure Website

I have, I admit, done things the wrong way round and created an Umbraco installation on Azure, developed multiple websites on that installation and only just decided I want a local instance for further development purposes.
Given that that's where I am, does anyone have any advice for how to go about achieving this? I have tried installing Visual Studio Community 2017 and MS SQL Server 2017 Developer and while I can connect to Azure with Visual Studio I don't seem to be able to work out how to view the installation, much less copy it down to my PC (something which I my searches seem to suggest isn't possible with Visual Studio).
I think you will need to copy down the site via FTP and the database using SQL Server Management Tools (assuming you are using SQL Server and not SQL CE).
You can get the FTP connection information from the Azure portal. The web root is in /site/wwwroot. Copy it down locally and you will be able to open it in Visual Studio as a Web Site. For the database, you can connect to the Azure SQL database with SQL Server Management Tools (you should have the connection info from when you created the database) and then right click on the database, select "Tasks" > "Export Data-tier application..." which will allow you to save a 'bacpac' file your local machine. You can then connect to your local SQL Server instance, and then right click on the "Databases" node in the Object Explorer and select "Import Data-tier application..." Once the database is imported, you may need to create/update a SQL Server user and grant it access to the database you just imported. For local development I just set the user to be owner of the the db. Back in Visual Studio, you should update the "umbracoDbDSN" connection string to use the new local database. At this point you should be able to run the website locally.

Turn on SQL Server Change Tracking in a SQL Compact 3.5 Database

Is there a way to enable change tracking in a SQL Compact 3.5 SP2 database from Visual Studio or SQL Server Management Studio? The best I have been able to find is this link, but as I go through the setup and configuration process I don't want to have to run it through a utility application each time. Especially since the database is being built by a team member of mine, I would like to have him enable change tracking before sending me the updates after NHibernate builds it.

Install Sql Server Express Conditionally during Window Application setup process

I have 2 queries..
Can I include one of my own interfaces, not the custom dialog the setup project provides, in the setup project? The interface will help user to choose an option for installing Sql Server Express during setup or not.
If the user select to install it, what are the steps do I need to follow
See Embedding SQL Server Express into Custom Applications.
Run setup.exe of Express with a Templete.ini parameter, from within your application installer. This ini file is easily created by first running the installer of Express separately, but cancel at the last step. That step mentions the location and name of the ini file.

Making script to create database skeleton for SQL Server 2008

I'm making Visual Studio setup for my project.
I want it automatically create empty database inside some SQL Server 2008 (Express)
Is there some tool / way to automatic generate such script of my database (sadly my database structure isn't stable yet)
How can I add it to installation process ? I know that I can run programs and scripts during installation but how can I specify SQL Server for my script ?
thank you.
In SSMS, Right-Click on database -> Tasks... -> Generate Scripts....
Suggest you also look at using the Database GDR R2 projects (if using VS 2008) or the built-in database project if using VS 2010.

VS2010 Database Compare. How do you create a *.DBSchema extensioned file?

I'd like to take a snapshot of my database, make some changes and then use the db compare functionality to identify the changes, and who knows, maybe even generate scripts to make the change.
I'd like to avoid having to backup the current db and restore it as a separate db just to have a "before" snapshot. I'm guessing I shouldn't have to.
Obsviously, I'm clueless about db projects and am looking to be pointed in the right direction.
ty!
On the machine which you will generate the schemafile, do the following:
Download Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows Desktop. Install 32 bit version first, then 64 bit (if your server is 64 bit)
Copy the files in (Program Files\Microsoft Visual Studio 10.0\VSTSDB\Deploy) to the machine on which you will run VSDBCMD.EXE, ignore the CE files in step 2, you have already installed these in the Compact SQL install above.
Read and understand Command-Line Reference for VSDBCMD.EXE http://msdn.microsoft.com/en-us/library/dd193283.aspx
Generate the dbschema file by running this from the command prompt: VSDBCMD /a:import /cs:"DbConnectionString" /dsp:SQL /ModelFile: outputfilname.dbschema
I'm using VS2010 Premium and I was able to do the following:
In Server Explorer, add a Data Connection to database A and database B
Right click on database A and choose Compare Schema
Pick database B as the Target, set the options/variables, then click OK
I also have SQL Server Developer Edition installed...so maybe that is what adds this functionality.
Not sure why, but this didn't work for a SQL Azure database.

Resources