Инструменты пользователя

Инструменты сайта


playground:win2012r2

Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
playground:win2012r2 [2023/02/25 11:01]
vvp [Windows Core]
playground:win2012r2 [2023/02/25 13:30] (текущий)
vvp [SQL server]
Строка 41: Строка 41:
 изменения в реестр. Выполните команды:​ изменения в реестр. Выполните команды:​
 <​code>​ <​code>​
-Powershell.exe 
 Set-ItemProperty -Path Set-ItemProperty -Path
 '​HKLM:​\Software\Microsoft\Windows NT\CurrentVersion\WinLogon'​ '​HKLM:​\Software\Microsoft\Windows NT\CurrentVersion\WinLogon'​
Строка 51: Строка 50:
 </​code>​ </​code>​
  
 +Включить,​ отключить,​ проверить статус поддержки IPv6 для сетевого адаптера:​
 +<​code>​
 +Disable-NetAdapterBinding -Name "​Ethernet0"​ -ComponentID ms_tcpip6
 +Enable-NetAdapterBinding -Name "​Ethernet0"​ -ComponentID ms_tcpip6
 +Get-NetAdapterBinding -ComponentID ms_tcpip6
 +</​code>​
 +==== SQL server ====
 +To install .NET Framework 3.5 from installation media located on a network share, use the following command:
 +<​code>​
 +Install-WindowsFeature Net-Framework-Core -source .\windows2012cd\sxs
 +</​code>​
  
 +Чтобы разрешить удаленные соединения,​ выполните следующие инструкции для экземпляра Server Core в локальной программе SQLCMD.exe.
 +<​code>​
 +EXEC sys.sp_configure N'​remote access',​ N'​1'  ​
 +GO
 +RECONFIGURE WITH OVERRIDE
 +GO
 +</​code>​
 +
 +Включите и запустите службу браузера SQL Server browser service
 +<​code>​
 +Set-service sqlbrowser -StartupType Auto
 +Start-service sqlbrowser
 +</​code>​
 +
 +Включите поддержку TCP/IP на экземпляре SQL Server
 +<​code>​
 +Import-Module SQLPS
 +$smo = '​Microsoft.SqlServer.Management.Smo.'  ​
 +$wmi = new-object ($smo + '​Wmi.ManagedComputer'​)  ​
 +# Enable the TCP protocol on the default instance. ​ If the instance is named, replace MSSQLSERVER with the instance name in the following line.  ​
 +$uri = "​ManagedComputer[@Name='"​ + (get-item env:​\computername).Value + "'​]/​ServerInstance[@Name='​MSSQLSERVER'​]/​ServerProtocol[@Name='​Tcp'​]"  ​
 +$Tcp = $wmi.GetSmoObject($uri)  ​
 +$Tcp.IsEnabled = $true  ​
 +$Tcp.Alter()  ​
 +$Tcp
 +</​code>​
 +You can enable the sa login with T-SQL.
 +
 +<​code>​
 +ALTER LOGIN sa ENABLE ;  ​
 +GO  ​
 +ALTER LOGIN sa WITH PASSWORD = '<​enterStrongPasswordHere>'​ ;  ​
 +GO
 +</​code>​
 +
 +See the following example to open TCP port 1433 and UDP port 1434 for SQL Server default instance, and SQL Server Browser Service:
 +<​code>​
 +New-NetFirewallRule -DisplayName "​SQLServer default instance"​ -Direction Inbound -LocalPort 1433 -Protocol TCP -Action Allow
 +New-NetFirewallRule -DisplayName "​SQLServer Browser service"​ -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow
 +</​code>​
 +
 +LoginMode values:
 +
 +  * 1: Windows Authentication
 +  * 2: SQL Server and Windows Authentication mode
 +<​code>​
 +Set-ItemProperty -Path
 +'​HKLM:​\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQLServer'​
 +-Name LoginMode -Value 2 -Type dword
 +</​code>​
playground/win2012r2.1677312095.txt.gz · Последние изменения: 2023/02/25 11:01 — vvp