Results 1 to 9 of 9

Thread: [2008] Deploy stand alone SQL Server 2008 Express database

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    [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.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    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 ?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2008] Deploy stand alone SQL Server 2008 Express database

    Quote 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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    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 ?

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Deploy stand alone SQL Server 2008 Express database

    Thanks for the explanation - I will try it

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    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 ?

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2008] Deploy stand alone SQL Server 2008 Express database

    Quote Originally Posted by Xancholy View Post
    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width