Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Fast and Easy Methods to Automate your SQL Server builds

Similar presentations


Presentation on theme: "The Fast and Easy Methods to Automate your SQL Server builds"— Presentation transcript:

1

2 The Fast and Easy Methods to Automate your SQL Server builds
Sitotpal Sarkar Pronunciation: (Sit-Oat-Paul Sar-Car) Senior SQL Database Administrator Health Information Technology Keck Medicine University of Southern California

3 Microsoft SQL Server Download Center

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18 Fusion Active Template Library (ATL): Checks if a computer restart is required because of broken fusion ATL. A pending restart can cause SQL Server Setup to fail. Consistency Validation for SQL server Registry keys in the Install Rule: Basically checks if User Account doesn't have required permission to edit the registry keys or it does. Issue will occur when the installer unable to update the registry entries due to lack of permission.

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37 Why SQL command line install? No Clicks Next, Next and Nnneexxt
Consistent Skills with command line is helpful in working in the Microsoft Core Box where there is limited or no GUI at all or any other GUI free environment.

38 Our SQL Server Install command line!
--MSA Account SQL Server 2017 C:\windows\system32>E:\Setup.exe /q /ACTION=Install /UpdateEnabled=True /UpdateSource=F:\SQL2017\Updates /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER /INSTALLSQLDATADIR="D:\Program Files\Microsoft SQL Server" /SQLTEMPDBDIR="T:\TEMPDB\DATA" /SQLTEMPDBLOGDIR="T:\TEMPDB\LOGS" /SQLTEMPDBFILECOUNT=4 /SQLTEMPDBLOGFILESIZE=1024 /SQLTEMPDBLOGFILEGROWTH=1024 /SQLSVCINSTANTFILEINIT="TRUE" /TCPENABLED=1 /SQLTEMPDBFILESIZE=1024 /SQLTEMPDBFILEGROWTH=0 /SQLUSERDBDIR="D:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA" /SQLUSERDBLOGDIR="L:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\LOGS" /SQLSVCACCOUNT="CONTOSO\sql_msa_srv123$" /SQLSYSADMINACCOUNTS="CONTOSO\DBA" /AGTSVCACCOUNT="CONTOSO\SQL_msa_agt123$" /AGTSVCSTARTUPTYPE="Automatic" /IACCEPTSQLSERVERLICENSETERMS /INDICATEPROGRESS

39 Parameter/Switches Defined below:
command Prompt. C:\windows\system32> Install File location: E:\Setup.exe Parameters/Switches: /q (Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations.) /ACTION=Install (Required to indicate the installation workflow. Which in this case Install) /UpdateEnabled=True (Specify whether SQL Server setup should discover and include product updates. The valid values are True and False or 1 and 0. By default, SQL Server setup will include updates that are found.) /UpdateSource=F:\SQL2017\Updates (Specify the location where SQL Server setup will obtain product updates.) /FEATURES=SQLEngine (Specifies components to uninstall.) /INSTANCENAME=MSSQLSERVER (Specifies a SQL Server instance name.) /INSTALLSQLDATADIR="D:\Program Files\Microsoft SQL Server" (Specifies the data directory for SQL Server data files.) /SQLTEMPDBDIR="T:\TEMPDB\DATA" (Specifies the directories for tempdb data files. ) /SQLTEMPDBLOGDIR="T:\TEMPDB\LOGS" (Specifies the directory for tempdb log file.) /SQLTEMPDBFILECOUNT=4 (Specifies the number of tempdb data files to be added by setup. This value can be increased up to the number of cores.)

40 /SQLTEMPDBLOGFILESIZE=1024 (Specifies the initial size of the tempdb log file in MB. Setup allows the size up to 1024.) /SQLTEMPDBLOGFILEGROWTH=1024 (Introduced in SQL Server 2016 (13.x). Specifies the initial size of each tempdb log file.) /SQLSVCINSTANTFILEINIT="TRUE" (Enables instant file initialization for SQL Server service account. For security and performance considerations,) /TCPENABLED=1 (Specifies the state of the TCP protocol for the SQL Server service. Supported values: 0=disable the TCP protocol, 1=enable the TCP protocol) /SQLTEMPDBFILESIZE=1024 (Introduced in SQL Server 2016 (13.x). Specifies the initial size of each tempdb data file.) /SQLTEMPDBFILEGROWTH=0 (Specifies the file growth increment of each tempdb data file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to Default value: 64 Allowed range: Min = 0, Max = 1024) /SQLUSERDBDIR="D:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA" (Specifies the directory for the data files for user databases.) /SQLUSERDBLOGDIR="L:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\LOGS" (Specifies the directory for the log files for user databases.) /SQLSVCACCOUNT="CONTOSO\sql_msa_srv123$" (Specifies the startup account for the SQL Server service.) /SQLSYSADMINACCOUNTS="CONTOSO\DBA" (Use this parameter to provision logins to be members of the sysadmin role.)

41 /AGTSVCACCOUNT="CONTOSO\sql_msa_agt123$" (Specifies the account for the SQL Server Agent service.)
/AGTSVCSTARTUPTYPE="Automatic" (Specifies the  startup  mode for the SQL Server Agent service.) /IACCEPTSQLSERVERLICENSETERMS (Required to acknowledge acceptance of the license terms.) /INDICATEPROGRESS (Specifies that the verbose Setup log file is piped to the console.) Install SSMS through Command Line: C:\windows\system32>C:\SSMS\SSMS-Setup-ENU-18-Preview7.exe /install /quiet /norestart /log C:\SSMS18\LOGS\ssmslog.txt

42 Microsoft SQL Server 2017 Commandline Install Demo

43 Now that SQL server 2017, Its updates and
SQL Server Management Studio has been installed successfully. We should implement the Database Backup jobs, Database index optimization, Database integrity checks etc. through SQL server Agent jobs. We use Ola Hallengren script. Follow this link to go to the website where this Maintenance Solution is available.

44

45 This is the best starting point for building your own maintenance plan is the comprehensive and free and Open source script from Ola Hallengren. This is the script we use at Keck Medicine of USC, of course we tailor the script to our needs by modifying it a little and adding a lot of additional stuff. I will use his Script (Customized by USC) here to set up all the Database maintenance procedures.

46 list of additional stuff we add to the Ola Hallengran Script.
Include the server to our Central Management Server Resize System Databases Resize TempDB Set Up Sql Server Database Mail Set up SQL Server Agent Service Restart Alert Create Job Failure Report Script The SQL server Logins and Database users

47 Support Our Sponsors

48 Local User Groups Orange County Data Professionals
2nd Thursday of each month 6:30—8:30 PM Irvine BigPASS.pass.org Los Angeles SQL 3rd Thursday of each odd month 7:00—8:30 PM USC Campus Sql.la Orange County Power BI 3rd Thursday of the month 7:00—8:30 PM Irvine Meetup.com Malibu SQL 3rd Wednesday of each month 6:30—9:00 PM sqlMalibu.pass.org San Diego User Groups 1st & 3rd Thursday 6:00—8:30 PM Los Angeles—Korean Every other Tuesday 8:00—9:00 PM El Segundo sqlAngeles.pass.org

49 PASS Summit Annual International Conference 2 Days of Pre-Cons
Nov | Seattle, WA 2 Days of Pre-Cons 200+ sessions over 3 days Over 5,000 SQL Professionals Evening Networking Activities


Download ppt "The Fast and Easy Methods to Automate your SQL Server builds"

Similar presentations


Ads by Google