Deploying Windows application with SQL Server database - sql-server

I have a WPF project and I will use SQL Server database. The instance of SQL Server IT created for me is SQL Server 13 (2016 standard version) on a remove server. When I’m deploying the application on a client’s computers, what version I need to install there as a prerequisite? Can I deploy SQL Server Express 2016 on a client’s computer and access the remove SQL Server Standard edition? I am looking for a simple solution and for a lighter version I need to install on the user’s computers. I cannot install a full SQL Server on each user.

I have searched the net and a similar question has been asked many times, but I didn’t find a clear answer before. Many people started their SQL Server experience using local type databases, like SQL Server CE or LocalDB. In this case specific DLLs and redistributables must be added with the installation program. It is hard to understand at the beginning, but when an instance of SQL Server is on a remote server, this is a different story. Everything is happening on this remote server. There is no need of any SQL Server instances on a client’s machine. Just a connection string must be added. The adapter or Entity Framework will take care of everything else.

Related

LocalDB Separate Install Connection String

Our tool uses SQL Server 2012 LocalDB to store data. This as installed by the MSI, not full express. Users recently moved to new machines using other applications that connect via SQL Server 2019.
My understanding is that installing SQL Server LocalDB on top of an installation of SQL Server 2019 shouldn't cause an issue, being as how SQL Server Express installs as a named instance by default.
My concern when I look at connection strings, however, is that mine doesn't identify the server instance quite in the way I've seen recommended, only the Data Source:
Data Source=(localdb)\v11.0;Integrated Security=True;AttachDbFileName=C:\Database\Database.mdf;Connection Timeout=10000
This does connect, in case there's doubt. But referencing connectionStrings.com, I see recommended this:
Server=(localdb)\v11.0;Integrated Security=true;AttachDbFileName=C:\MyFolder\MyData.mdf;
In my mind, Data Source=(localdb)\v11.0 is already a clear designation of the instance, but I'm unsure what happens when SQL Server Express installs after SQL Server.
What should I look out for? Do I need to replace Data Source with Server? Will I need to change any part of (localdb)\v11.0 to account for the order SQL Server Express has been installed in compared with SQL Server?
EDIT 1
Updating the connection string by replacing 'Data Source' with 'Server' works. The question still remains, how will LocalDBs installing second affect what follows Server=?

Configure remote connections without sql server installation?

We have an application called IpSwitch Whatsup and it's installed in a machine that I can connect to remotely as administrator. This is all in our intranet.
We need to connect to the sql server database being used by IpSwitch Whatsup, but this particular machine doesn't have sql server installed. On the other hand, in sql server configuration manager there is indeed a sql server installation for whatsup (the entry says SQL Server (WHATSUP)).
So, two questions:
How does one go about in connecting to this database? I'm pretty sure I know the name of the database and I already know the server name and instance, so I would like to connect to this DB from a sql server installation in another machine.
How does one configure a sql server installation to receive remote connections if it doesn't have sql server installed?
Thanks.
For the first question, you just type in (or browse) the appropriate instance name and authentication options using SSMS - which is the GUI tool used to manage sql server instances. Note - the term "sql server installation" can mean different things so it is not a useful reference.
As for the second question, review the information here. Note that any task you do in SSMS can be done via tsql - you can see the appropriate commands using the script button in the SSMS dialog windows.
And you can also (and probably should based on these questions) install SSMS on the same machine as your server instance so you can do "anything" "anywhere". Now would probably be a good time to review your disaster recovery options (and start backing up your databases regularly).

Doing clean install of SQL Server Express

I installed VS 2008, VS 2012 and the community version 2013 along with the matching SQL Servers but never needed the SQL Servers and never checked if they were properly installed.
I recently picked up SQL Server Management Studio and tried to connect to a server.
Unfortunately, it does not detect any local server, even though I have about twenty different entries in programs & apps for SQL Server related stuff including SQL Server 2012 and 2014 Express Localdb, an installation of SQL Server 2008, data-tier app frameworks, native clients, transact SQL, a couple "compact" versions, tools and what's not.
One would think that something in this mess would be recognized as a server, but apparently not so. I had an entry for SQL Server in the start menu with a nice GUI with an install DB option... that requested a server media folder (lord knows which). I tried starting manually one of the many SQL Servers (sqlservr.exe) from the program files folders to no avail (I get a message about a corrupt installation)
My DB experience is pretty much exclusively with MySQL and I am lost with all these applications that look like they should do something but don't.
I would like to have a bare bones installation that works for the following use:
Coding Winform apps with local databases (compatible with Entity Framework)
Allows to distribute the apps with local databases for free (commercial use, small data volume)
Running SQL queries from SQL Server Management Studio
What is the minimum I need for this purpose?
Should I uninstall all the existing SQL Server related programs and make a clean install from a single install file (for instance, would installing the 1.1gb SQL Server 2014 Management Studio Express 64 Bit.exe give me all I need)?
Or if not, is there any way to install a recent version and ignore the underlying mess? (I don't really care for the disk space, I just want this thing to work).
I apologize if this question is a mess but I am pretty confused with this, and I could really use a hand figuring out what's what.

Can a WPF app with .sdf database run on a computer without SQL Server installed

This question may seems a bit silly. The thing is I'm programming a WPF using VS2010, which contains a .sdf database (connection is ADO.NET).
Someone told me that if I use a SQL Server Express database it can be run on any PC even it has no SQL Server installed. But after I tried executing in my virtual machine (win7 & win xp), seems it cannot even start up.
So, can someone brief me, what database do people normally use in developing WPF software? Is it true that my program using a SQL Server database file cannot execute on PC without SQL Server installed?
Much appreciate in advance!
Yes, it can!
SQL Server Compact (that produces and uses .sdf) is the only SQL Server edition that does not require a server to be installed. All its code and logic is contained in the handful of DLL's that you need to include with your application. Just ship your app with those DLL's and you should be fine.
Read more about SQL Server Compact and how to use and deploy it on MSDN.
SQL Server Express (and any of the other editions, like Web, Standard, Developer, Enterprise) on the other hand does require an installation of the SQL Server Express edition - either on that machine, or somewhere in the network where your app runs (remote connections from the network are disabled by default, but can be enabled).

Problem with deploying an application that is using sql server 2008 express

I've developed an application for my college project in Visual C# which uses SQL Server 2008 Express database. My application is desktop-based. But the problem now is deploying the application. Is it required that a SQL Server 2008 be installed on the client machine (with my tables and data inserted) or can I just have the .mdf file exported and everything works well?
Is there a way to escape the installation of SQL Server 2008 on the target machine?
Sorry, just found a duplicate: Does user need SQL 2008 Express Installed if I deploy app with .mdf file?
You can deploy SQL Server Express with your application. However, most of the time this is just the wrong thing to do. SQL Server Express is a server-class database, and likes to use up system resources as such. It also runs as service, which means it's using those resources even when your application isn't active.
Instead, you should choose a desktop (or in-process) class engine, like SQL Server Compact Edition, Sqlite, or even MS Access. In addition to being an all around better choice for your desktop program, these database will also generally be much easier to deploy.

Resources