How to automate a SQL Server Express deployment as prerequisite for an app deployment
I have an application that uses a SQL Server DB, and I wish to de开发者_运维知识库ploy SQL Server Express to the target site. How can I automate this so the end-user/installer has minimum exposure to any technicalities of the SQL Server Express installation, even such as choosing an sa password? We're assuming the end-user can barely operate a mouse.
The exact correct information on how to do this depends on SQL server version you want to install, but in general words you can call the Express installer with the /settings modifier, providing a INI file containing all the relevant configuration parameters you want to apply to that particular installation including SA Password, instance name and things like that.
You can also call the setup with passing all the relevant settings as parameters on the command line, from setup /? for 2008 express (in spanish)
Ejemplo de instalación desatendida completa, mostrando todos los parámetros necesarios: setup.exe /Q /ACTION=install /PID= /FEATURES=SQL,AS,RS,IS,Tools /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="MyDomain\MyAccount" /SQLSVCPASSWORD="************" /SQLSYSADMINACCOUNTS="MyDomain\MyAccount " /AGTSVCACCOUNT="MyDomain\MyAccount" /AGTSVCPASSWORD="************" /ASSVCACCOUNT="MyDomain\MyAccount" /ASSVCPASSWORD="************" /RSSVCACCOUNT="MyDomain\MyAccount" /RSSVCPASSWORD="************" /ISSVCAccount="MyDomain\MyAccount" /ISSVCPASSWORD="************" /ASSYSADMINACCOUNTS="MyDomain\MyAccount"
free translation: Unattended full installation example, showing all needed parameters
To perform this actions, you can include the SQL Server Express installation file in your application own installer and call it passing the parameters when appropriate.
You'll find more information on the SQL Server 2005: Unattended installation article series at database journal.
How to: Install SQL Server 2008 R2 from the Command Prompt:
/SAPWD
Specifies the password for the SQL Server sa account.
All the other parameters for an untended installation are documented in the article linked.
精彩评论