SA Developer .NET

Welcome to SA Developer .NET Sign in | Join | Help
in Search

Install package

Last post 08-19-2008, 9:49 by riccardospagni. 7 replies.
Sort Posts: Previous Next
  •  08-04-2008, 10:28 13872

    Install package

    Hi guys

    I'm creating an install package and I need the package to run a SQL script to create a database on install.  Unfortunately, my knowledge on this subject is so limited, I don't even know what to google...  Please help.

    Thanks,
    A*


    Someone once told me love makes the world go around and, well, I just had to laugh in their face because EVERYBODY knows what REALLY makes the world go around is a mutant gerbil on a treadmill.
  •  08-04-2008, 10:43 13873 in reply to 13872

    Re: Install package

    Go have a look at the SQL2005 command line utility:

     

    http://www.databasejournal.com/features/mssql/article.php/3654176

  •  08-04-2008, 10:48 13874 in reply to 13873

    Re: Install package

    You are an angel!  Thank you so much!
    Someone once told me love makes the world go around and, well, I just had to laugh in their face because EVERYBODY knows what REALLY makes the world go around is a mutant gerbil on a treadmill.
  •  08-04-2008, 10:57 13875 in reply to 13872

    Re: Install package

    Cool. No problem.
  •  08-15-2008, 12:25 14057 in reply to 13872

    Re: Install package

    Ah yes.

     

    Well, you could blatantly assume the user has OSQL or SQLCMD living somewhere on their PC, but that may not always be the case.

     

    HOW are you deploying?? You could write a custom action in C# to use SMO (SQL Management Objects) to execute the script; this will provide all sorts of SMO goodness that you could exploit. If you want some idea behind SMO and how it fits together, take a look Bill Graziano and my SQL scripting tool (http://www.codeplex.com/scriptio) - source code is there, obviously.


    And so the kief looked and lo, it was kief.
  •  08-18-2008, 10:03 14074 in reply to 14057

    Re: Install package

    riccardospagni:

    Well, you could blatantly assume the user has OSQL or SQLCMD living somewhere on their PC, but that may not always be the case.

    The client will always have MSSQL when they install our package.  It's a software requirement.  And the companies that use our software will have it installed for them by a technician.  Thankfully, it's not as complicated as all that Big Smile.


    Someone once told me love makes the world go around and, well, I just had to laugh in their face because EVERYBODY knows what REALLY makes the world go around is a mutant gerbil on a treadmill.
  •  08-18-2008, 12:21 14081 in reply to 14074

    Re: Install package

    What are you using to create the install package?

    Wix has some nice sql extensions that does most of this type of work for you. On the other hand you can create custom actions both with wix and most other installers that you can do pretty much what you like !

     

     

    Niel

  •  08-19-2008, 9:49 14103 in reply to 14081

    Re: Install package

    Yeah - I was going to point out that NSIS (Nullsoft Scriptable Installer System) has a stack of addons for this kind of thing, as well as checking the installed framework version and silently updating it if necessary etc. etc.

    And so the kief looked and lo, it was kief.
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems