Fast SQL on Azure – nutshell: TempDB on fast local disk At least 3 disks for data and logs Read-only caching for data disks One of the most important things for SQL Server is to store TempDB on a fast ephemeral local – temporary disk. How to do it: Install SQL and configure it to use D:TempDB for TempDB. Create two files on c: dirive: StartSQL.bat: PowerShell -Command “Set-ExecutionPolicy Unrestricted” >> “%TEMP%StartupLog.txt” 2>&1 PowerShell C:StartSQL.ps1 >> “%TEMP%StartupLog.txt” 2>&1 StartSQL.ps1: PowerShell -Command “Set-ExecutionPolicy Unrestricted” >> “%TEMP%StartupLog.txt” 2>&1 PowerShell C:StartSQL.ps1 >> “%TEMP%StartupLog.txt” 2>&1 StartSQL.ps1: $SQLService=”SQL Server (MSSQLSERVER)” $SQLAgentService=”SQL Server Agent (MSSQLSERVER)” $tempfolder=”D:SQLTEMP” if (!(test-path -path $tempfolder)) { New-Item -ItemType directory -Path $tempfolder } Start-Service $SQLService #Start-Service $SQLAgentService #remove # for non Express version Set Startup Type – Manual for the following Services: SQL Server (MSSQLSERVER) SQL Server Agent (MSSQLSERVER) Configure Task Scheduler (Run as SYSTEM with highest privileges): Additional tip is to use at least 3 disks for Data and Logs. Just create 3 data disk and run this PowerShell that configure it for you: $disks = Get-PhysicalDisk -CanPool $true New-StoragePool –FriendlyName StoragePool1 –StorageSubsystemFriendlyName “*” –PhysicalDisks (Get-PhysicalDisk –CanPool $True) New-VirtualDisk -FriendlyName “sql-stripe” -StoragePoolFriendlyName “StoragePool1” -Interleave 65536 -AutoNumberOfColumns -ProvisioningType Fixed -ResiliencySettingName “Simple” … MS SQL also Express on Azure VM – TempDB on ephemeral local diskRead more
Month: September 2020
WebPage for stopping and starting Azure VMs / WWW pozwalająca zatrzymywać i uruchamiać maszyny wirtualne
WebPage for stopping and starting Azure VMs Quite often, there are cases of requests to do various types of automation that allow you to start and stop virtual machines by people who do not have access to the Azure environment. I do not think that it is a very safe solution, but it may be useful to someone – and certainly for training purposes regarding: Static Web Apps Azure identity platform and authorization services – App Registrations identity and access management (IAM) https://github.com/MariuszFerdyn/AzureStartStopVM WWW pozwalająca zatrzymywać i uruchamiać maszyny wirtualne Dosyć często mi się zdarzają przypadki próśb robienia różnego rodzaju automation, które pozwalają uruchamiać i zatrzymywać maszyny wirtualne poprzez osoby które nie mają dostępu do środowiska Azure. Nie uważam, że to zbytnio bezpieczne rozwiązanie, ale może się komuś przyda – a już na pewno w celach szkoleniowych dotyczących: Static Web Apps Azure identity platform and authorization services – App Registrations identity and access management (IAM) https://github.com/MariuszFerdyn/AzureStartStopVM