none
ignore UPGRADE during fresh install? RRS feed

  • Question

  •  

    Is it possible for SQL 2005 Express SP2 to ignore the UPGRADE parameter during a commandline install?  We would like to use one commandline to handle both a fresh intstall and an upgrade depending on which is needed.

     

    Does it make any difference which order the commandline parameters are used?

     

    Do I need to write something to check if an upgrade or fresh install is needed and then feed the appropriate parameters?

     

     

    Thanks

    Monday, October 15, 2007 2:42 PM

All replies

  •  

    Hi,

     

    If I understand correctly, then the idea here is to upgrade the existing installation of SQL Express to SP2 if one is already installed and if no then go ahead and install a new instance of SQL Express.

     

    So, the first task would be to find out what versions of SQL is installed on the box. One of the ways this can be done is querying the WMI Classes to find out what SQL Services are installed.

     

    To achieve the above, please download the WMI CODE CREATOR from the Microsoft Downloads site to give you an idea of which classes to use.

     

    Based on the findings from the above script, you can use the COMMAND LINE PARAMETERS to upgrade or install a new instance.

     

    HTH

     

    Tuesday, October 16, 2007 10:49 AM
  • hi,

     Morrowless wrote:

     

    Is it possible for SQL 2005 Express SP2 to ignore the UPGRADE parameter during a commandline install?  We would like to use one commandline to handle both a fresh intstall and an upgrade depending on which is needed.

     

    Does it make any difference which order the commandline parameters are used?

     

    nope..

     

    Do I need to write something to check if an upgrade or fresh install is needed and then feed the appropriate parameters?

    yes, becouse you have to provide install OR upgrade parameters, depending to your needs.. default is install, which means a new fresh instance of SQLExpress, but you obviously get an error if you try to install an instance you already have installed with the very same name..

    regards

    Tuesday, October 16, 2007 3:21 PM
    Moderator