wtorek, 8 listopada 2016

[PL] SQL Server 2014 SP2 - instalacja nienadzorowana / [EN] SQL Server 2014 SP2 - unattend installation

Wersja polska (Polish version, English version is below)

Jeżeli posiadamy do zainstalowania większą ilość instancji SQL Server możemy jednorazowo przejść proces instalacji używając graficznego instalatora do etapu "Ready to Install", na którym zwracamy uwagę na ścieżkę do pliku ConfigurationFile.ini


Wspomniany plik możemy wykorzystać na potrzeby przeprowadzania tzw. instalacji nienadzorowanych SQL Server - czyli wywoływanych z wiersza polecenia i nie wymagających interakcji użytkownika za pośrednictwem graficznego instalatora.

W tym celu kopiujemy wspomniany plik na przykład na dysk C i edytujemy usuwając linię UIMODE="Normal". Następnie z poziomu wiersza polecenia (CMD) możemy wywołać instalację korzystając z następującego polecenia:

D:\setup.exe /ConfigurationFile=C:\ConfigurationFile.ini /Q /IACCEPTSQLSERVERLICENSETERMS /SAPWD="test" /SQLSVCPASSWORD="test" /AGTSVCPASSWORD="test"

gdzie:
  • D:\setup.exe to lokalizacja instalatora SQL Server
  • /Q oznacza tzw. instalację cichą, nie wymagającą interakcji użytkownika
  •  /SAPWD - określamy hasło użytkownika SA o ile korzystamy w trybu uwierzytelniania MIXED a nie Windows
  •  /SQLSVCPASSWORD - określamy hasło dla konta usługi SQL Server Database Engine
  •  /AGTSVCPASSWORD - określamy hasło dla konta usługi SQL Server Agent
Po uruchomieniu powyższego polecenia zostanie uruchomiona instalacja SQL Server, a w przypadku wystąpienia błędów zostanie wyświetlony komunikat. Brak komunikatów z błędami i znak zachęty do wprowadzenia kolejnego polecenia w wierszu polecenia oznacza powodzenie instalacji.


Oprócz tego warto wspomnieć, że istnieją parametry:
  • /ASSVCPASSWORD - gdzie możemy określić hasło dla konta usługi Analysis Services
  • /ISSVCPASSWORD - gdzie możemy określić hasło dla konta usługi Integration Services
  • /RSSVCPASSWORD - gdzie możemy określić hasło dla konta usługi Reporting Services

Istnieje także możliwość określenia nazw kont serwisowych dla konkretnych usług bezpośrednio z wiersza polecenia. Służą do tego parametry /AGTSVCACCOUNT (dotyczy SQL Server Agent), /ASSVCACCOUNT (dotyczy Analysis Services), /SQLSVCACCOUNT (dotyczy SQL Server Database Engine), /ISSVCACCOUNT (dotyczy Integration Services), /RSSVCACCOUNT (dotyczy Reporting Services).

Prezentowana metoda została przetestowana w środowisku: Windows Server 2012 R2 Standard x64 i SQL Server 2014 SP2.
Więcej informacji na temat możliwości przeprowadzania instalacji nienadzorowanych znajdziemy w dokumentacji SQL Server w artykule Install SQL Server 2014 from the Command Prompt.

English version

In order to prepare unattend installtion when you want install SQL Server many times, you can run the graphical installer and proceed to "Ready to install" page on which the is "Configuration file path".



ConfigurationFile.ini can be used to prepare unattend installation SQL Server - made of from command line (CMD) and not requiring answers to questions in graphical installer. To do this:
1. Copy ConfigurationFile.ini to - for example - local disk C.
2. Edit ConfigurationFile.ini - remove UIMODE="Normal" and save it
3. Open Command Line (CMD.EXE) and run follow command:


D:\setup.exe /ConfigurationFile=C:\ConfigurationFile.ini /Q /IACCEPTSQLSERVERLICENSETERMS /SAPWD="test" /SQLSVCPASSWORD="test" /AGTSVCPASSWORD="test"

where:
  • D:\setup.exe - means the location of the installer SQL Server
  • /Q - means quiet type of installation, without interaction from user
  •  /SAPWD - specify password for SA user (if you use Mixed mode authentication  instead Windows)
  •  /SQLSVCPASSWORD - specify password for  service account of SQL Server Database Engine
  •  /AGTSVCPASSWORD - specify password for  service account of SQL Server Agent
No information about the error and the possibility of introducing the next command in the CMD means that the installation was successful.

Except that, also exist command-line parameters listed below:
  • /ASSVCPASSWORD - where we can specify password for  service account of Analysis Services
  • /ISSVCPASSWORD - where we can specify password for  service account of Integration Services
  • /RSSVCPASSWORD - where we can specify password for  service account of Reporting Services
We can also specify service account name from command line parameters. To do this we can use follow parameters: /AGTSVCACCOUNT (for SQL Server Agent), /ASSVCACCOUNT (for Analysis Services), /SQLSVCACCOUNT (for SQL Server Database Engine), /ISSVCACCOUNT (forIntegration Services), /RSSVCACCOUNT (for Reporting Services).

The presented method was tested on: Windows Server 2012 R2 Standard x64 and SQL Server 2014 SP2.

Additional information about unattend installations of SQL Server we find at documentation of SQL Server in article: Install SQL Server 2014 from the Command Prompt.

Brak komentarzy:

Prześlij komentarz