Universal SQL Installations Framework (Script review and Demo) SQL Saturday, San Diego – Sep 19 2015 Prakash Heda Www.sqlfeatures.com
Email/Facebook/LinkedIN: Prakash@SQLfeatures.com MCDBA/MCITP Prakash Heda Database Team Lead at Advent Software Blog: www.SQLfeatures.com Twitter @PrakashHeda Email/Facebook/LinkedIN: Prakash@SQLfeatures.com MCDBA/MCITP Speaker Evaluation
Agenda Why Supported Configuration DEMO Part 1 Advance Preparation Script Review How to Execute Script DEMO Part 2
Why Consistency in ENVs Developers knows what to expect in DEV/QA/Stage/Prod Anyone in IT can deploy a new envs Smooth coordination between different IT departments Minimizing production issues Minimizing support hours Easy upgrades Optimal Setup for dedicated SQL Host Easy troubleshooting Minimize mundane tasks
Standard/Enterprise/Developer Supported Configuration Infrastructure Amazon AWS EC2 Windows Azure VMware Hyper-V Physical servers OS Versions Windows 2008 R2 Windows 2012 Windows 2012 R2 SQL Version SQL Server 2008 R2 SQL Server 2012 SQL Server 2014 Any Service Pack/Cumulative update/Hotfix Standard/Enterprise/Developer
Demo Application: SQERA Version 4 – Windows 2012 R2– SQL 2016 Enterprise Edition – CTP2.3 Version 3 – Windows 2012 R2– SQL 2014 Enterprise Edition – SP1CU2 Version 2 – Windows 2012– SQL 2012 Standard Edition – SP2CU7HF Version 1 – Windows 2008 R2– SQL 2008 R2 Standard Edition – SP2CU1
Demo How to Execute Script powershell \\W12R2HV\SQLSetup\Demo\InstallSQL\InstallSQL.ps1 <SQL Service startup account> #sqlfeatures\svcSQLfeatures <SQL Service startup account Password> #Tester1! <<Minimum 8 digit toupgh password>> <SA Password> #SAtemp2014 <Product Code> #SQERA_V2 <SQL Binary Top Location> #\\W12R2HV\SQLSetup\SQLBinaries\ (Optional) powershell \\W12R2HV\SQLSetup\Demo\InstallSQL\InstallSQL.ps1 sqlfeatures\svcSQLfeatures Tester1! SAtemp2014 SQERA_V2 "sqlfeatures\SQLDBA" Demo
Preparation: Windows Template Pick an OS Update OS with latest patches Dot Net 3.5 installed Add E drive with 50GB as thick Add F drive as 20GB for file stream – Optional (XML) Disable Automatic Windows update Grant PowerShell unrestricted and bypass rights Disable UAC Disable Internet
Preparation: Accounts Installation user account should have local admin access SQL service startup account should be a domain account Windows domain group represent DBA team should have SA And Local administrator access to SQL Server
Not using configuration files Preparation: SQL Slipstreaming SQL Server 2008 - R2 Service Pack: PCUSOURCE CU and Hotfix: CUSource SQL Server 2012/2014/2016 Cumulative updates: CU folder Not using configuration files
Preparation: SQL Binaries Folder
Preparation: Install.XML (Basic SQL Installation Template) Template detail Values Usage Id 51 Unique Number SQLVersion SQL2014 SQL Edition Product SQL_2014_ENT Unique Product Name SQLComponents SQLENGINE,REPLICATION,FULLTEXT,DQ,RS,RS_SHP,RS_SHPWFE ,DQC,CONN,IS,BC,SDK,BOL,SSMS,ADV_SSMS,SNAC_SDK,MDS Features installed SQLBinaries SQL2014\Ent SQL Binary location RTM SP SQL Binary location SP (only valid for SQL 208 R2) CU SQL2014\SPs\CU6_HF SQL Binary location for all patches INSTANCEDIR E:\SQLData SQL Instance Directory SQLUSERDBDIR SQL Data File Directory SQLUSERDBLOGDIR E:\SQLLogs SQL Log File Directory SQLTEMPDBDIR E:\MSSQL\SQLTempDBData SQL TempDB Data File Directory SQLTEMPDBLOGDIR E:\MSSQL\SQLTempDBLog SQL TempDB Log File Directory SQLBACKUPDIR E:\SQLBackup SQL Backup Directory FilestreamFolder E:\Filestream SQL File-Stream Directory CLTRESULTDIR E:\MSSQL\DRC\CLTRESULTDIR Replay load folder CLTWORKINGDIR E:\MSSQL\DRC\CLTWORKINGDIR INSTANCENAME MSSQLSERtVER Default Installation Collation Default SQL Server Collation DotNet4Location if DotNet 4.0 needed to be installed on DB server Note: Values in RED can be changed to suit a product requirement
Script Review: Pre SQL Steps Install Failover Cluster Install Telnet client Install Dot Net Framework Disable IE security Disable UAC Disable Firewall Disable IPV6 TempDB data files for each CPU (Max 4) Create folders based on XML configuration Grant Local Administrator access to SQL Startup account and DBA Group
Grant privileges Lock Pages in Memory Perform Volume Maintenance Tasks Script Review: Post SQL Steps (1) Grant privileges Lock Pages in Memory Perform Volume Maintenance Tasks Log on as a service Log on as a batch job
Validate Demo Setups Script Review: Post SQL Steps (2) Configure Min/Max Memory 4GB = 2.7 GB set for Min and Max RAM 8GB = 6.5 GB set for Min and Max RAM More than 8GB: keep 2GB for OS rest set for Min and Max RAM Creating additional TempDB data files based on CPU (Max 4) Grant sysadmin access to SQL Service startup account Grant sysadmin access to DBA group Enable backup compression Update MAXDOP to 4 Create SSPI entry Update windows patches again Validate Demo Setups
Q & A
Thank You Speaker Evaluation Script & Presentation DAC SQL Saturday, San Diego – Sep 19 2015 Blog: www.SQLfeatures.com Thank You For attending this session… Twitter @PrakashHeda Facebook/Email/LinkedIN: Prakash@SQLfeatures.com Speaker Evaluation Script & Presentation DAC