Script de instalación de SQL Server 2012 Core

Para realizar la instalación de SQL Server Core es necesario conocer los comandos de PowerShell, en este artículo les comparto los comandos principales para instalación.

El comando inicial que van  a necesitar es sconfig  con este utilitario van a poder fácilmente cambiar la IP de la máquina, cambiarle el nombre y unirla al dominio si es necesario.

Posteriormente necesitan instalar el .NET Framework para lo cual tiene dos opciones con  PowerShell o con DISM:

//Instalar .NET Core
Install-WindowsFeature NET-Framework-Core –Source D:\Sources\sxs

//Using DISM from the command prompt, specify the source files path parameter:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /Source:d:\sources\sxs

Posteriormente deben configurar el Firewal para permitir la conexión remota al SQL Server, los comandos son los siguientes:

//minimo firewall
netsh advfirewall firewall add rule name="Open SQL Server Port 1433" dir=in action=allow protocol=TCP localport=1433
netsh advfirewall firewall add rule name="SQL Server Analysis Services inbound on TCP 2383" dir=in action=allow protocol=TCP localport=2383 profile=domain

//excepcion de puertos dinamicos
netsh advfirewall firewall add rule name="SQL Server Browser Services inbound on TCP 2382" dir=in action=allow protocol=TCP localport=2382 profile=domain

//adminsitraicon remota

netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
netsh advfirewall firewall set rule group=“remote event log management” new enable=yes

Deben insertar el disco de SQL Server y si intentan ejecutar el setup.exe se mostrará un mensaje de error, si desean instalar utilizando la interfaz gráfica utilicen el siguiente comando:

 

//utilizar el comando para ver la interfaz grafica

setup.exe /UIMODE=EnableUIonServerCore

 

También está la opción de instalación por línea de comando, recuerden cambiarlos nombres de las cuentas y las contraseñas:

 

//por linea de comandos
Setup.exe /QS /ACTION=Install /FEATURES=SQLENGINE,REPLICATION,CONN,IS /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT=AdventureWorks\sqlservicecore /SQLSVCPASSWORD=P@ssw0rd /SQLSYSADMINACCOUNTS=AdventureWorks\Administrator /AGTSVCACCOUNT=AdventureWorks\sqlserviceCore /AGTSVCPASSWORD=P@ssw0rd /TCPENABLED=1 /IACCEPTSQLSERVERLICENSETERMS=1 /UPDATEENABLED=False

Saludos,

Ing. Eduardo Castro

Microsoft SQL Server MVP

Comments

Popular posts from this blog

Desempeño de SQL Server 2008 R2 y Max Worker Threads

Cómo identificar consultas más pesadas en SQL Server

SQL Server La longitud de los datos LOB (2200100) que se van a replicar excede el máximo configurado 65536.