none
SQL Server Express Silent Installation RRS feed

  • Question

  • Hi all.

    I develop a software in c# and Sql Express 2008,Now I want to publish the application and I need to install sql express 2008 before application installation.I want to use a silent installation for sql express 2008,I searched for it and found some solution that used cmd,but I coulnt understand how use it for sql server express 2008.

    1. Can I use Install shield for sql express 2008 silent installation?how?

    2. How could I use cmd for silent installtion?

    thanks.

    Sunday, July 10, 2011 4:51 PM

Answers

  • Hi ,

    From your summary file, I would like to confirm with you whether you have the previous version of SQL Server like 2005 before.
    If yes, please remove it from Programs and Features or manually. There may be some conflict sometime.

    Hope this helps.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by sajjadrad Thursday, July 21, 2011 7:29 AM
    Wednesday, July 20, 2011 2:14 AM

All replies

  • Since you mentioned that you have SQL Server 2008 Express that is being used by your application, I suggest you to refer: http://msdn.microsoft.com/en-us/library/dd981032(SQL.100).aspx [Embedding SQL Server 2008 Express in an Application]

    Additionally to install SQL Express in quiet mode, is similar to the way you do for other editions, it is:

    Setup.exe /q /Action=Install /Hideconsole /Features=SQL,Tools
    /InstanceName=SQLExpress /SQLSYSADMINACCOUNTS="Builtin\Administrators"
    /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="<StrongPassword>

    In the preceding example:

    • /q– specifies that Setup run in a quiet mode without any user interface.
    • /Action– specifies which action to perform. In this example, the action is Install.
    • /Hideconsole– specifies that the console window is hidden or closed during the install.
    • /Features– specifies which parent features and features to install. In this example, the parent feature SQL is installed, which includes SQLEngine, Replication, and Fulltext components. The Tools feature installs all of the tools components.
    • /InstanceName– specifies a SQL Server instance name.
    • /SQLSYSADMINACCOUNTS–provisions logins to be members of the system administrators role.
    • /SQLSVCACCOUNT– specifies the startup account for the SQL Server service.
    • /SQLSVCPASSWORD– specifies the password for SQLSVCACCOUNT.

     

    For more details refer: http://msdn.microsoft.com/en-us/library/ms144259.aspx [How to: Install SQL Server 2008 R2 from the Command Prompt]

     

    Hope this helps..


    Chaitanya( Twitter | Blogs )

    Any documentation bug? Tell us about it at Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    The next CTP for SQL Server Code Name "Denali" is coming soon. Sign up now to be notified of the next CTP release.
    Monday, July 11, 2011 4:34 AM
  • so thanks,your answer help me to introducing console and silent installation,but I have some problems.

    how could I know the progress of installation ( the process value )?

    how could I control the errors in installation progress?


    Monday, July 11, 2011 7:36 AM
  • You can use /QS switch as an installation parameter, the /QS switch only shows progress, does not accept any input, and displays no error messages if encountered..

    What do you exactly mean by controlling an error message?


    Chaitanya( Twitter | Blogs )

    Any documentation bug? Tell us about it at Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    The next CTP for SQL Server Code Name "Denali" is coming soon. Sign up now to be notified of the next CTP release.
    Monday, July 11, 2011 8:18 AM
  • /q mode doesnt support /qs.I removed /q switch but when setup loaded it will be closed.

    can you help me to writing command with /qs for show progress?

    as you know the sql installation errors are not specified.for example when the windows drive havnt any free space we havent a specified error.all errors have a same messege.

    now I have a problem in installing sql express silently and setup will be closed after loading.






    Monday, July 11, 2011 1:53 PM
  • Hi,

    If you want the setup to be unattended installations and run in a quiet mode without any user interface, you should input /Q . If you want the setup to run and show progress through the UI, but does not accept any input or show any error messages,  you should input /QS.

    Here is a tested silent installation example which uses command line and configuration file .

    Command line :

    D:\ SQLEXPR32_x86_ENU.exe /QS/SAPWD="C0mp!ex"/ConfigurationFile="D:\Configuration.ini"

    Configuration.ini :

    [SQLSERVER2008]
    INSTANCEID="MSSQLSERVER"
    ACTION="Install"
    FEATURES=SQLENGINE,REPLICATION,SNAC_SDK
    HELP="False"
    INDICATEPROGRESS="False"
    IACCEPTSQLSERVERLICENSETERMS="True"
    X86="False"
    ROLE="AllFeatures_WithDefaults"
    ENU="True"
    ERRORREPORTING="False"
    INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
    INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
    SQMREPORTING="False"
    INSTANCENAME="MSSQLSERVER"
    AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
    AGTSVCSTARTUPTYPE="Disabled"
    ISSVCSTARTUPTYPE="Automatic"
    ISSVCACCOUNT="NT AUTHORITY\NetworkService"
    ASSVCSTARTUPTYPE="Automatic"
    ASCOLLATION="Latin1_General_CI_AS"
    ASDATADIR="Data"
    ASLOGDIR="Log"
    ASBACKUPDIR="Backup"
    ASTEMPDIR="Temp"
    ASCONFIGDIR="Config"
    ASPROVIDERMSOLAP="1"
    FARMADMINPORT="0"
    SQLSVCSTARTUPTYPE="Automatic"
    FILESTREAMLEVEL="0"
    ENABLERANU="True"
    SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
    SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"
    SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"
    SECURITYMODE="SQL"
    ADDCURRENTUSERASSQLADMIN="True"
    TCPENABLED="1"
    NPENABLED="0"
    BROWSERSVCSTARTUPTYPE="Disabled"
    RSSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
    RSSVCSTARTUPTYPE="Automatic"
    RSINSTALLMODE="FilesOnlyMode"


    If you want to check the detail installation error ,you could go to SQL Server setup log file ‘%ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\LOG\Summary.txt’  to identify which part of installation failed.
    here is the Book Online Document about how to view SQL 2008 R2 setup log .
    For general solution about SQL Server 2008 installation issue, please refer to this KB.

    Hope this helps.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Tuesday, July 12, 2011 3:13 AM
  • Thank you

    when I used this command sql setup runs and after extracting I had this error :

    TITLE: SQL Server Setup failure.
    ------------------------------

    SQL Server Setup has encountered the following error:

    The argument '/QS/SAPWD=C0MP!EX/CONFIGURATIONFILE=C:\12\CONFIGURATION.INI' is formatted incorrectly.  The delimiter '=' is missing.

    Error code 0x84B40006.

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    • Proposed as answer by a1max1 Friday, August 8, 2014 6:58 PM
    Wednesday, July 13, 2011 6:46 PM
  • In addition how can I use this Configuration file in installshield? there is a specify field for command line in /prerequistis/SQL Express propertice/application to run
    Wednesday, July 13, 2011 7:22 PM
  • Hi ,

    The error "The argument '/QS/SAPWD=C0MP!EX/CONFIGURATIONFILE=C:\12\CONFIGURATION.INI' is formatted incorrectly.  The delimiter '=' is missing." is just a format issue.

    Please add "" aroung parameter SAPWD and CONFIGURATIONFILE like "C0MP!EX" and "C:\12\CONFIGURATION.INI". I have tried this in cmd command line. If you embed this installation in .Net code .The delimeter will be '" like '"C0MP!EX'".

    And you could add this configuration file in your installation package. This file will extract to some folder specified by yourself. All these steps could be customized in installshield.

    Hope this helps.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, July 14, 2011 1:53 AM
  • I created my Configuration file,Can I use this command line for install shield?

    /QS/SAPWD="C0mp!ex"/ConfigurationFile="Configuration.ini"

    I copied your command to cmd,but I have this error yet.

     

    Friday, July 15, 2011 1:56 PM
  • Hi ,

    That depends on your own need. If you run this command in cmd, don't forget the setup EXE file at the beginning. "C0mp!ex" is the SA password  and "Configuration.ini" is the name of the configuration file ,you could change them by your own setting.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, July 15, 2011 2:29 PM
  • I have this error yet,I used this command in cmd exlactly:

    SQLEXPR_x64_ENU.EXE /QS /SAPWD="C0mp!ex" /ConfigurationFile="c:\12\ConfigurationFile.ini"

    http://s1.picofile.com/file/6966362172/sqlerror.jpg

    :((((((

    Friday, July 15, 2011 8:29 PM
  • refer to this page: http://msdn.microsoft.com/en-us/library/dd239405.aspx I run the setup with this command:

    c:\12>SQLEXPR_x64_ENU.EXE \ConfigurationFile=ConfigurationFile.ini

    But when setup loaded,there is no auto installation.

    Why doesnt work this command?:((

    Sunday, July 17, 2011 9:08 AM
  • I used this command: SQLEXPR_x64_ENU.EXE /QUIET /INSTANCEID="MSSQLSERVER" /ACTION="Install" /FEATURES=SQLENGINE,REPLICATION /ISSVCACCOUNT="NT AUTHORITY\NetworkService" /ASCOLLATION="Latin1_General_CI_AS" /SQLCOLLATION="Arabic_CI_AS"

     

    then the console shown this error and closed:

     http://s1.picofile.com/file/6977163978/error_sqls.jpg

    then I added this parameter to command:

    /INSTANCENAME="MSSQLSERVER"

    then console closed suddenly without any error!!!

     :(( please help me

    Sunday, July 17, 2011 8:13 PM
  • Hi ,

    I have tested the command and configuration in my machine again. It all works.

    For trouble shooting :
    1)  You could find the summary.txt at your folder C:\ProgramFiles\Microsoft SQL Server\100\Setup Bootstrap\Log\  . And you need to open summary.txt, and then you can generally search for “error” or “failed” keywords.
    2)  For more information about details of the failure, open the file that is listed in the line starting with “Log with failure” in summary.txt. You could see file named like Summary_<%ComputerName%_YYYYMMDD_HHMMSS>.txt which could be found in C:\ProgramFiles\Microsoft SQL Server\100\Setup Bootstrap\Log\<YYYYMMDD_HHMMSS>\Summary_<%ComputerName%_YYYYMMDD_HHMM>.txt
    3) To find errors in this file, you can generally search for “error” or “failed” keywords in Summary_<%ComputerName%_YYYYMMDD_HHMM>.txt. For more information about details of the failure, open the file that is listed in the line starting with “Log with failure”.  That file is named like Detail.txt which located in c:\ProgramFiles\Microsoft SQL Server\100\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\Detail.txt

    Hope this helps.

     


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Tuesday, July 19, 2011 1:55 AM
  • Thank you

    I have used this command :

    SQLEXPR_x64_ENU.EXE  /QS /INSTANCEID="MSSQLSERVER" /INSTANCENAME="MSSQLSERVER" /ACTION="Install" /FEATURES=SQLENGINE,REPLICATION /ISSVCACCOUNT="NT AUTHORITY\NetworkService" /ASCOLLATION="Latin1_General_CI_AS" /SQLCOLLATION="Arabic_CI_AS" /ADDCURRENTUSERASSQLADMIN=True /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"

    but the console closed suddenly without any error.

    this is my summary file:

    http://www.mediafire.com/?p2ftg6414lgjfyi

    As you see,the error massage is passed

    Tuesday, July 19, 2011 4:31 PM
  • Hi ,

    From your summary file, I would like to confirm with you whether you have the previous version of SQL Server like 2005 before.
    If yes, please remove it from Programs and Features or manually. There may be some conflict sometime.

    Hope this helps.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by sajjadrad Thursday, July 21, 2011 7:29 AM
    Wednesday, July 20, 2011 2:14 AM
  • Thanks a lot.

    It worked fine.

    How can I check that sql express is already installed?

    Thursday, July 21, 2011 7:32 AM
  • How can I check that sql express is already installed?

    You could find it under control panel->Programs and Features .
    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, July 21, 2011 7:57 AM
  • I want use the registry or programming.

    I readed this page: http://msdn.microsoft.com/en-us/library/dd981032(SQL.100).aspx 

    But I want to know my installation was successfully or not. is there a registry key for checking?

    Thursday, July 21, 2011 9:03 AM