SCUG.be Setting up & Configuring SQL Server to support your SCCM & SCOM environment.

Post on 18-Dec-2015

237 views 0 download

Transcript of SCUG.be Setting up & Configuring SQL Server to support your SCCM & SCOM environment.

SCUG.beSetting up & Configuring SQL Server to support your SCCM &

SCOM environment

SCUG.BE introduction• Mission

• “To be the single point of entry for the Belgian System Center Community”

• Founders:• Alexandre Verkinderen (SCUG.BE Founder, MVP, SCOM Expert)• Kenny Buntinx (SCCM Expert)• Kim Oppalfens (MVP, SCCM Expert)• Yves Janssens (Webmaster)

ActivitiesOnline presenceEventsLive Meetings

Agenda Introduction Session objectives and Key Takeaways Setting up SQL Configuring SQL Maintaining SQL Useful SQL Queries Summary Q&A

Session Objectives and Key Takeaways

How to setup SQL for System CenterTips to have a good initial setup and configurationWhat do you need to configure on your SQLBest practices for maintaining your SQL

Setting Up your SQL

Installing SQLChoose the correct Hardware ConfigChoose the correct SQL VersionClustering and Replica’sSQL Reporting Services for SCCM/SCOMNamed InstancesFirewallsSQL Services accountsSQL CollationsAuthentication modes

Hardware configSCOM SCCM

• X64 Processor• 3 disk Minimum

• 1 OS, 1 SCOM + SQL; 1 Transaction logs

• Ideal RAID 10• Ideal

• Separate box for SCOM & DB• X OS; Y SQL; Z TEMPDB; X SCOM• Multiple files for the db (equal to

number of cpu’s)• Multiple files for tempdb

(number of cpu’s /2)• Raid Controller with BBWC

• Allocate 75% to write caching

• 3 disk Minimum• 1 OS; 1 SQL + SCCM; 1

Transaction logs• Ideal RAID 10

• Ideal• Single box for SCCM & DB• X OS; Y SQL; Z TEMPDB; X

SCCM• Multiple files for the db

(equal to number of cpu’s)• Multiple files for tempdb

(number of cpu’s /2)

SQL VersionSCOM 2007 SP1 SCCM

SQL 2005 SP1/SP2/SP3No hotfixes required

SQL 2005 SP2/SP3No hotfixes required

SQL 2008 RTM /SP1RTM - apply hot fix KB955229 SP1  - apply hot fix KB955262

SCCM With SQL technologyStandard edition should be fine for just about anybody

SCOM 2007 R2

SQL 2005 SP1/SP2/SP3No hotfixes required

SQL 2008 SP1No hotfixes required

SCOM With SQL technologyStandard edition should be fine for just about anybody exeption for ACS

SQL Reporting ServicesSCOM SCCM

SSRS can only be used for SCOMDon’t use Sharepoint Integration (KB946419)ResetSRS.exe

Added to SCCM 2007 R2 for reporting functionalityWeb reporting still availableOnly reporting tool for SCCM v.Next

Clustering and replicasSCOM SCCM

Replica’s supported for MP, SLP and SUPClustering only for SQL

Installs VSS serviceRequires sysadmin for Site serverWBEM provider not “clusterable”

Server Role Cluster

Operations database

Single Active-Passive cluster

Root management server

Single Active-Passive cluster

Opsmgr Reporting data warehouse

Single Active-Passive cluster

Audit collection database

Single Active-Passive cluster

Log shippingClustering

Run DBCreateWizard.exe

Firewall ConfigurationSCOM SCCM

TCP 1433 by defaultNamed Instance of SQL

UDP 1434Custom TCP port of named instance

If Static port is defined after installation

Edit the dbo.MT_ManagementGroup table with the static port number.Edit the registry to configure the static port number on the RMS

TCP 1433 by defaultNamed Instance of SQL

UDP 1434Custom TCP port of named instance

Named instancesSCOM SCCM

Supported Supported since ConfigMgr 2007Support for SQL Reporting

Named SRS installed firstDefault instance installed afterwards

SQL Service AccountsIf SQL is running as a domain user

setspn –A MSSQLSvc/<SQL Netbiosname>:<SQLPORT> <Domain\Account>setspn –A MSSQLSvc/<SQL FQDN>:<SQLPORT> <Domain\Account>

SQL CollationsSCOM SCCM

SQL_Latin1_General_CP1_CI_ASDictionary order, case-insensitive, for use with 1252 Character Set (default)

Dictionary order, case-insensitive, for use with 1252 Character Set (default)Other collations including case-sensitive supported, yet impractical

Authentication modesSCOM SCCM

Windows authentication mode

Minimizes attack surface

Reporting DW across a firewall

Create Run-As accountUse SQL Authentication

Windows authentication mode

Minimizes attack surface

Configuring SQL

Configuring SQLConfigure memory limit so SQL can’t use it all

Leave 2 GB minimum for the OS & SCOM or SCCM

Protocols (tcp/ip – named pipes)

Configuring SCOM DB’sOpsmgr DB grooming

Default 7 days => 2 daysp_PartitioningAndGroomingPartitionAndGroomingSettings table

Opsmgr DW grooming10 to 400 daysData is not always groomed row-by-row

Report CachingSchedule reports with “Null Delivery Provider”

DB HotfixesKB 969130KB 960363

SecurityIf administrators != SA

Create Login [Domain\siteserver$] from windowsCreate Login [Domain\sqlserver$] from windows

Demo

Maintaining

HealthchecksSCOM SCCM

SQLDisk space of DB’s

SCOMRegular healtchecksClean up LocalizedText table (boost UI performance ! )

SCCMBuilt-in tasks

BackupSCOM SCCM

Opsmgr VSS WriterSQL

Master, MSDBReportserverDB

SCOMOperationsManagerDBOperationsManagerDWOperationsManagerAC

EncryptionkeysSecurestoragebackup

Management packsCustom reports

Database Recovery models

SimpleBulk-loggedFull

SCCMBuilt-in task (once a day)On demand start backup service

Useful SQL Query’sDBCC CHECKDB, sp_monitor, sp_spaceused, sp_who, xp_sqlmaintLarge table query, with rowcount

SELECT so.name, si.rowcnt as row_count, 8 * Sum(CASE WHEN si.indid IN (0, 1) THEN si.reserved END) AS data_kb, Coalesce(8 * Sum(CASE WHEN si.indid NOT IN (0, 1, 255) THEN si.reserved END), 0) AS index_kb, Coalesce(8 * Sum(CASE WHEN si.indid IN (255) THEN si.reserved END), 0) AS blob_kb FROM dbo.sysobjects AS so JOIN dbo.sysindexes AS si ON (si.id = so.id) WHERE 'U' = so.type GROUP BY so.name, si.rowcnt  ORDER BY data_kb DESC

Examine Data Warehouse grooming settingsSELECT AggregationIntervalDurationMinutes, BuildAggregationStoredProcedureName, GroomStoredProcedureName, MaxDataAgeDays, GroomingIntervalMinutes FROM StandardDatasetAggregation

Is SQL broker enabled?SELECT is_broker_enabled FROM sys.databases WHERE name = 'OperationsManager‘

How to identify your version of SQL serverSELECT  SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

Update StatisticsEXEC sp_updatestats

Reindex the databaseUSE OperationsManager go SET ANSI_NULLS ONSET ANSI_PADDING ON SET ANSI_WARNINGS ON SET ARITHABORT ON SET CONCAT_NULL_YIELDS_NULL ON SET QUOTED_IDENTIFIER ON SET NUMERIC_ROUNDABORT OFF EXEC SP_MSForEachTable "Print 'Reindexing '+'?' DBCC DBREINDEX ('?')"

Demo

C:\Users\alexandre\Documents\scug\sessies

SumarySCOM SCCM

SQLConfigure memory limitsSeparate from your SCOM box

SCOMGrooming jobsLocalizedText TableKeep your DB’s small

ACSSeperate ACS boxTight filters

SQL

Thanks• Cameron Fuller• Http://ops-mgr.spaces.live.com• System Center Operations Manager 2007 Unleashed

• Arie de Haan• Kerrie Meyler

• Http://ops-mgr.spaces.live.com• System Center Operations Manager 2007 Unleashed

• Pete Zerger• Founder, System Center Central:

http://www.systemcentercentral.com• Founder System Center Virtual User Group

http://www.systemcenterusergroup.com

ResourcesSCOM SCCM

Opsmgr Communityhttp://technet.microsoft.com/en-us/opsmgr/bb499673.aspx

Opsmgr Support Team Bloghttp://blogs.technet.com/operationsmgr/

Opsmgr Product Team Bloghttp://blogs.technet.com/momteam/default.aspx

Contact InformationEmail: Alexandre@Verkinderen.com

IM: Alexandre@Verkinderen.com

Blog: http://scug.be/blogs/scom

Configmgr communityhttp://technet.microsoft.com/en-us/configmgr/bb625749.aspx

ConfigMgr Team bloghttp://blogs.technet.com/configmgrteam/

ConfigMgr Forumshttp://social.technet.microsoft.com/Forums/en-US/category/configurationmanager/

Myitforum communityhttp://myitforum.com/articles/42/section.asp

Contact InformationEmail: kim@oscc.be

IM: kim@oppalfens.be

Blog: http://scug.be/blogs/sccm

Q&A

SCUG.beThank You!