Skip to content

Commit a50d7b4

Browse files
[windows] reverting SQL LocalDB warmup (#8505)
1 parent 4d6ce38 commit a50d7b4

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

images/win/scripts/Installers/Warmup-User.ps1

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,5 @@ if (-not(Test-Path -Path $registryKeyPath)) {
2929
New-ItemProperty -Path $RegistryKeyPath -Name CacheType -PropertyType DWORD -Value 0
3030
reg.exe copy HKCU\Software\TortoiseSVN HKLM\DEFAULT\Software\TortoiseSVN /s
3131

32-
33-
# warmup SQL LocalDB
34-
# https://github.com/actions/runner-images/issues/8164
35-
36-
sqllocaldb create MSSQLLocalDB
37-
38-
$localDBInstance = Get-ChildItem -Path 'HKCU:\Software\Microsoft\Microsoft SQL Server\UserInstances'
39-
$instanceName = ($localDBInstance.Name).Split('\').where({ $true },'Last')
40-
$instancePath = 'HKCU:\Software\Microsoft\Microsoft SQL Server\UserInstances\' + $instanceName
41-
$dataDirectory = (Get-ItemProperty -Path $instancePath -Name 'DataDirectory').DataDirectory
42-
$localDBPath = 'C:\LocalDB'
43-
New-Item -ItemType 'Directory' -Path $localDBPath
44-
Move-Item -Path "$dataDirectory\*" -Destination $localDBPath
45-
Set-ItemProperty -Path $instancePath -Name 'DataDirectory' -Value $localDBPath
46-
47-
reg.exe copy 'HKCU\Software\Microsoft\Microsoft SQL Server' 'HKLM\DEFAULT\Software\Microsoft\Microsoft SQL Server' /s
48-
4932
reg.exe unload HKLM\DEFAULT
5033
Write-Host "Warmup-User.ps1 - completed"

0 commit comments

Comments
 (0)