|
-
Dec 10th, 2008, 02:34 PM
#1
Thread Starter
Fanatic Member
[2008] Deploy stand alone SQL Server 2008 Express database
How can I deploy and reference a stand-alone SQL Server 2008 Express database with my vb.net 2008 Express app ?
Thanks for any help.
-
Dec 10th, 2008, 06:28 PM
#2
Re: [2008] Deploy stand alone SQL Server 2008 Express database
What exactly does that mean? If you're saying that you want to be able to access a SQL Server 2008 database without your users having to install SQL Server 2008 then you're out of luck. SQL Server 2008 is a server-based databased, i.e. you must have a server installed to interact with the data files. If you don't want to install a database server then you can't use a server-based database. You could use SQL Server CE, where you deploy a few extra DLLs directly with your app to interact with the database, or you could use Access, where the database engine is essentially a Windows component.
-
Dec 10th, 2008, 09:15 PM
#3
Thread Starter
Fanatic Member
Re: [2008] Deploy stand alone SQL Server 2008 Express database
That answered part of my question. I could get my app to do a SQL Server 2008 Express install as a pre-requesite.
My question is : after the app & SQL Server 2008 is installed - how do I reference the instance of SQLServer ?
-
Dec 10th, 2008, 09:31 PM
#4
Re: [2008] Deploy stand alone SQL Server 2008 Express database
 Originally Posted by Xancholy
after the app & SQL Server 2008 is installed - how do I reference the instance of SQLServer ?
It is ALWAYS your connection string that controls what database you connect to. SQL Server Express is always installed with the instance name SQLEXPRESS by default and you should always accept that name unless you have a very good reason for doing otherwise. That means that your connection string will use ".\SQLEXPRESS" as the server name on your development system and it will be the same on any system you deploy to.
The only issue might arise if users already have SQL Server 2005 Express installed with that instance name. In that case they should probably uninstall that before installing your app. If they can't do that for some reason then I don't really know what instance name would be used. You could always test that out to see.
If they do use a different instance name then you will have to have stored the server name somewhere that they can change it. That's why storing the connection string in the config file is a good idea.
-
Dec 10th, 2008, 10:12 PM
#5
Thread Starter
Fanatic Member
Re: [2008] Deploy stand alone SQL Server 2008 Express database
Yes, I saw your posting on config file use.
Would it be safer to use SQLServer 2005 Express instead ?
How do I test to see what instance name end users may have used ?
-
Dec 10th, 2008, 10:22 PM
#6
Re: [2008] Deploy stand alone SQL Server 2008 Express database
The way I would handle this is to simply tell your users that they need SQL Server 2008 Express installed with an instance name of SQLEXPRESS. There really is no reason for anyone to have multiple versions of SQL Server Express installed on a workstation and there's no reason for anyone to use a different instance name. Anyone who already has SQL Server 2005 Express installed should simply uninstall it, because 2008 will handle any existing apps just as well.
Using 2005 may be a way to lessen the chance of issues but there's still the chance of installing that on a system that already has 2008 installed. To be honest, I really don't know exactly what would happen if you installed one on a system that already had the other. They'd coexist fine, I'm sure, but I'm not sure what would happen with the instance names. There's one easy way to find out though: test it for yourself.
-
Dec 11th, 2008, 09:34 AM
#7
Thread Starter
Fanatic Member
Re: [2008] Deploy stand alone SQL Server 2008 Express database
Thanks for the explanation - I will try it
-
Apr 24th, 2009, 04:03 PM
#8
Thread Starter
Fanatic Member
Re: [2008] Deploy stand alone SQL Server 2008 Express database
I need to deploy VB.Net Express frontends to multiple users each of which must connect to a SQLServerExpress2008 database stored on a shared network drive.
Could you please suggest the best way that this should be done ?
-
Apr 24th, 2009, 09:46 PM
#9
Re: [2008] Deploy stand alone SQL Server 2008 Express database
 Originally Posted by Xancholy
I need to deploy VB.Net Express frontends to multiple users each of which must connect to a SQLServerExpress2008 database stored on a shared network drive.
Could you please suggest the best way that this should be done ?
This is the same as any regular SQL Server backed application. You install SQL Server on your server and then create your database, either manually, by running scripts or by restoring an existing backup. You then install your app on the clients and tell them to connect to your server by configuring your connection string appropriately. If you know what the connection details will be before deployment you can configure the connection string at design time, otherwise you can edit the config file after deployment.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|