Deployment of SQL Server: installing a second instance? - sql-server-2005

Simple problem. I'm working on a Delphi 2007/WIN32 application which now uses MS Access as simple data store. I have to modify it to support SQL Server Express, which is easy. These modifications are working so the application can be deployed using either SQL Server or MS Access. (Whatever the user prefers.) I did consider deploying the whole application together with the SQL Compact but this is not practicak. Using SQL Server Express 2008 instead of 2005 is an option, but also has a few nasty side-effects which we don't want to resolve for now.
The problem is deploying the whole project. The installation with SQL Server would need a quiet installation so the user won't notice it. SQL Server is mentioned in the documentation so they know it's there. We just don't want to bother them with technical issues. In most cases, such an installation will go just fine.
But what if the user already has an SQL Server (2005) installation which is used for something else? Personally, I would prefer to just install a second instance of SQL Server on their system so it won't conflict with the other installation. (Thus, if they uninstall the other app, the SQL instance will just stay installed.)
While SQL Server 2005 and 2008 can be installed on the same system simply by using two different names for the instance, I wonder if it's also possible to install SQL Server 2005 twice on a single system to get two instances. And if possible, how?

To answer your question: yes SQL2005/SQL2008 and SQLExpress2005/2008 can all live happily side by side. The default instance name for the SQLExpress install is [machine name]\SQLEXPRESS. But having said that, you should consider giving your customer the option to use the sql instance they already have, and only install a new instance if they choose to.
I don't know if SQLExpress can be installed silently (most likely it can as long as you specify the right properties on the command line when you install it). But we have rolled it out to lots of customers, and they have very few issues installing it normally.
Edit: I have added this as an edit because a comment doesn't allow enough.
I understand your reluctance to both having the user install SQL manually, and to sharing another instance. To address these points:
uninstalling a product should never automatically uninstall the SQL instance, even if that SQL instance was put there when installing that product. By all means the database can be blown away, but uninstalling a SQL instance should be a manual process, as it is a server product that may be used by many other products
you can make your task a lot easier by using a decent installer product. For instance, we use InstallShield. It has a sql browse dialog built in (its a baked in feature of InstallShield) that the user can use to select which sql instance and database they want to use for our product. The details the user enters are then inserted in to the web.config file using an XML file change task (also functionality baked into InstallShield). By using dialogs like this you eliminate a lot of potential user errors.
if there is already an existing sql instance, use it. The only dependence your database should have on the instance is that it is the right version (i.e. SQL2005, and 2008 is fine for a 2005 database). The only time you should demand your own instance is if you are processing/storing enough data that you require your own server, or if you are depending upon undocumented features. If the existing instance is already under heavy load, then insisting on a new instance on a different server is fine, but then you have also avoided that whole side-by-side situation. Alternatively you could just install in to the existing instance and get the customer to commit to upgrading the hardware.
I hope this helps somewhat - i'm just trying to persuade you that there are limited reasons for needing a separate instance and that 99% of the time you will be fine installing in to an existing instance. It's nice to have your own instance but in reality it brings you few real benefits, especially if you are using a robust installer.

You can install SQL Server Express in silent mode using the /Q command line switch or use the /QS command line switch to see setup progress without user input. You can install a named instance on a system that already has SQL Server installed.
http://msdn.microsoft.com/en-us/library/ms144259.aspx

There are a number of reasons why it is very useful to have your own instance of an SQL Server.
You can decide for yourself what type of authentication you use (SQL authentication or Windows authentication). Although Windows authentication is recommended, scenario's exist where this is simply not an option. And enabling SQL authentication for an instance where other products use the same instance is a security risk.
You can safely assume that your product is the only user of the installed instance. So with installing and uninstalling the instance you know the version and databases in use by that instance. No extra detection needed, as long as different versions of your product use the same SQL configuration and version.
Isolation of your installments (files, registry keys, dll's and other products) is a very good practice!
Also, uninstalling an SQL Server instance doesn't lead to data loss, because the data files of the databases will not be removed. After reinstalling, you can attach the data files again if needed.
that being said, SQL Server express can be installed in three different interaction modes:
Full UI, including SQL license agreement acceptance
Silent, but with detailed progress UI
Silent, without any progress UI (and suppressed errors!)
Detailed instructions for installation can be found at http://msdn.microsoft.com/en-us/library/ms144259(SQL.90).aspx

Related

Can't connect to SQL Server local database and can't find the SQL Server browser

My problem is that after I installed SQL Server Management Studio and use .\SQLEXPRESS as a server name. It says that it can't connect it.
I read lots of things about that problem and one thing was to go to computer management and check the sql server browser if it is started.
When I go there I do not find any files for sql. On time of the installing I do everything correct as it is supposed to be. That's why I cannot understand why it doesn't work. Any ideas ?
I suspect that you have installed the tools only (SQL Management Studio) and not SQL Server itself. If you want to connect to your own SQL Server (any instance starting with a dot ".") then you will need to install it on your machine.
You can download the full installation SQL Express package direct from Microsoft. There are several editions available to suit your environment and needs.
http://www.microsoft.com/en-au/server-cloud/products/sql-server-editions/sql-server-express.aspx
It gets a little complicated trying to find what you want since there are so many variants and editions. I recommend that you head over to Scott Hanselman's blog where he has laid it all out very nicely by release version, edition and environment (32/64 bit)
His preferred link: http://downloadsqlserverexpress.com
Original post: http://www.hanselman.com/blog/DownloadSQLServerExpress.aspx
So, it seems it isnt installed... was it installed? Check google what it's folders are for your system and go look if the folders exist. Make a backup of existing folders and re-install if need be. then attach any existing files to to recreate the databases, if any.

Cannot connect to server - SQL Server 2014 Management Studio

I'm quite a newbie, just trying to learn some new things. I've recently started learning c# etc and I'd also like to create a new SQL Server database using SQL Server Management Studio.
The thing is that for some reason I am not able to connect to the server. I might have done something wrong (or haven't done something that I should have done). Been researching the problem a lot on google and I found some tips but I still can't make it work.
I even found some installation tutorial in here: http://www.sqlcoffee.com/SQLServer2014_0005.htm and I only noticed that I used some different options (I used default, didn't change anything) like for example in "Database Engine Config" I chose "Windows authentication mode".
So that's what I get: http://imgur.com/2ftOdSB
Also I think I may have some problem with services, because when I go to the server configuration manager, the list is completely empty.
Thanks for any tips. If I don't solve this, I can always uninstall SQL Server Management Studio and reinstall it - this time following the steps in the tutorial. Hopefully that wont be necessary so help me please:)!
I've had a look at the link you posted about the installation instructions. As I mentioned before SQL server enterprise (database engine) won't install on a non-Server OS, You'll need at least Windows Server 2008. Have a look at msdn.microsoft.com/en-us/library/ms143506(v=sql.120).aspx for the system requirements. During the installation there must have been an option to install the database engine, but it was probably disabled because of your OS.
I suggest you uninstall 2014 Enterprise and download SQL Server 2014 express microsoft.com/en-gb/download/details.aspx?id=42299 and make sure you select database engine as part of the installation.
If you want to get into SQL, I would suggest trying out MySQL first. I've utilized it a little bit and found it to be fairly simple with a decent amount of documentation. This version of SQL will still function with various languages. It doesn't utilize Windows authentication, but rather lets you set a root password specific to the database itself. I don't know if your software is similar to that but there may be an option to not use Windows authentication and instead authenticate within the database software itself.

Installing SharePoint 2010 on a dev machine with an external database

I've been following Microsoft's guide for installing a dev environment on Windows 7:
http://msdn.microsoft.com/en-us/library/ee554869.aspx
In order for it to not run like a dog I've created a SQL Server 2008 instance on our database server specifically for this dev machine. The article does mention that you might be wanting to use an external database in regard to making sure the database cumulative update is installed. It doesn't make any other mention of configuring it to use a external database. I was hoping that the configuration wizard would then prompt about which database to use but annoyingly it just set-up the configuration database locally.
How do I go about installing SharePoint on a dev environment with an external database, and will I need to reformat this machine and do it all again?
Well, this depends on what your environment looks like. For instance, is this machine part of a domain?
If so, it should be as simple as selecting "Server Farm Install", or something like that when you did the binaries installation. Then, when you run Products and Configuration Wizard, it will ask you for DB info. Note: if you are doing this, I would recommend you to be part of the 'sa' role on the database server as you will be creating databases.
If you are not part of a domain, it gets a little trickier, but not too bad. Check out this article.
http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=112
-= Plan B =-
You can always give this a whirl. This is the method we use to keep the DB guys from screaming. It also allows us to give our databases nice names.
http://technet.microsoft.com/en-us/library/cc262869.aspx

How to bootstrap sql server express and my database into my custom c# applicaiton

I am designing a database using sql server express. Once completed how can I include sql server express and my database into the msi package to automatically install in the client's machine?
You may find life is simpler to go another way - the last time I needed something similar I decided SQLite would do better for me, requiring nothing more than a single DLL to be referenced.

Develop for SQL Server Standard using SQL Server Express?

I'm working on a web service project, and I'm coding at home, where I have SQL Express 2008 installed, but the app needs to interface with an SQL Server Standard. I've never done the transition before, and I haven't been able to find any resources on the subject - plenty of stuff about upgrading, but nothing about how to deploy.
For instance, Visual C# Express, I don't seem to be able to connect to a database without a database file - is that how Standard works as well? Do I just deploy the file with the application?
You can use the Express version also as a stand-alone installation. See here for example. In fact, there is also a free edition of Management Studio. You can manage your database the same way as any other edition. If you install SQL server express in this way, you can move to another version of SQL server without a hitch!
Unless you are doing something very very unusual or something hacky, the deployment will be very easy. Anything that I know of that you can do in the Express version works exactly the same in the full version.
All different ways of connecting to the database are available in both the Express version and full version. You don't need any database file to make a connection, unless the framework that you use requires it. You always connect to the database server through the network, never through the file system.
When you deploy the application you just change the connection string so that it points to the live server. If the login is set up the same way on that server, it works without any other changes.
I think you'll have to manually create the connection string as the IDE won't automatically generate ones connecting to SQL Server Standard Edition. But you can easily record two in the app - one for testing that points to the EXPRESS instance, and one for the live that points to the real one. As long as you're connecting to the same objects and interacting with them in the same way, it should be fine.
You can manually amend your connection string AFTER the IDE has generated its own to something like :
Data Source=ServerName;Initial Catalog=AppDatabase;Integrated Security=True;Persist Security Info=True;Connect Timeout=30
replacing ServerName and AppDatabase as required, and with possible authentication changes. You'll have to watch for the IDE recreating the original connection string, though, as I can't see a way to modify the connection string used in the Database Explorer and if you use the IDE to drag datasources into your app it'll keep using the original connection string.
SQL Server Developer Editions are pretty cheap, though - easily less than £50.