Quickly create a lot of SQL Instances
'Recently I delivered a demo on Policy Based Management for a customer. To show this off well, I really wanted to have a larger number of SQL servers to show how PBM can be used to manage SQL Server sprawl. I can only fit a few VMs in my laptop and Azure would burn though my $150 MSDN credit too quickly, so I decided to look for other options. I then remembered that SQL Server supports up to 50 instances on the same machine.
I’m too lazy to click Next > Next > Next that many times, so I made a script to automatically install 50 instances of SQL on the same machine.
!!WARNING!!! – This will blow up the size of your SQL install directory significantly! (about 1GB per instance with SQL 2016). Do not run this on production servers or any server that you even remotely care about!'...
https://blogs.msdn.microsoft.com/sql_pfe_blog/2016/08/17/quickly-create-a-lot-of-sql-instances/
cls
@echo off
SET ADMIN_ACCOUNT1="CHARLIE\Administrator"
SET ADMIN_ACCOUNT2="SQL2016-1\Administrator"
ECHO:
ECHO:
ECHO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO: ! THIS WILL INSTALL 50 Instances of SQL !
ECHO: ! Ctrl-C to cancel!! Any other key to continue !
ECHO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO:
ECHO:
pause
FOR %%I IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50) DO (START /wait D:\Setup.exe /q /ACTION=Install /FEATURES=SQL /INSTANCENAME=inst%%I /SQLSVCACCOUNT="NT SERVICE\MSSQL$inst%%I" /SQLSYSADMINACCOUNTS="%ADMIN_ACCOUNT1%" "%ADMIN_ACCOUNT2%" /AGTSVCACCOUNT="NT SERVICE\SQLAGENT$inst%%I" /IACCEPTSQLSERVERLICENSETERMS)
Trackbacks
Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.
Kommentare
Ansicht der Kommentare: Linear | Verschachtelt