microsoft sql server administration for sap administration and troubleshooting
TRANSCRIPT
Microsoft SQL Server Microsoft SQL Server Administration for SAPAdministration for SAP
Administration and Administration and TroubleshootingTroubleshooting
2
OverviewOverview
SQL Server ArchitectureSQL Server Architecture SQL Server with SAPSQL Server with SAP Performance Monitoring and TuningPerformance Monitoring and Tuning Administration and TroubleshootingAdministration and Troubleshooting Database Backup and RestoreDatabase Backup and Restore
3
DB02DB02
4
History of DB SizeHistory of DB Size
5
Adding a file to a DatabaseAdding a file to a Database
6
Expanding a DatabaseExpanding a Database
7
Extending the DatabaseExtending the DatabaseDatabase must be extended
Can volume be extended?
Add new disk to volume
Add new volume
Move one old fileto new volume
Yes No
+
Expand files andset all files to autogrow
PRIMARY
<SID>DATA1
<SID>DATA2
<SID>DATA3
Expand files on old and new volumeand set all files
to autogrow
PRIMARY
<SID>DATA1
PRIMARY
<SID>DATA1
<SID>DATA2
8
DB02DB02
9
Server PropertiesServer Properties
10
Server PropertiesServer Properties
11
Server PropertiesServer Properties
12
Server PropertiesServer Properties
13
DB Maintenance WizardDB Maintenance Wizard
14
DB Maintenance WizardDB Maintenance Wizard
15
DB Maintenance WizardDB Maintenance Wizard
16
DB Maintenance WizardDB Maintenance Wizard
17
DB Maintenance WizardDB Maintenance Wizard
18
DB Maintenance WizardDB Maintenance Wizard
19
DB Maintenance WizardDB Maintenance Wizard
20
Errorlog from SAPErrorlog from SAP
21
ErrorlogErrorlog
22
ErrorlogErrorlog
23
LoginsLogins
24
LoginsLogins
25
LoginsLogins
26
LoginsLogins
27
Table / Index fragmentationTable / Index fragmentation
DBCC SHOWCONTIG <with fast>DBCC SHOWCONTIG <with fast> DBCC INDEXDEFRAGDBCC INDEXDEFRAG
~20% degradation, few % CPU~20% degradation, few % CPU less disk space / restartableless disk space / restartable
Fillfactor & Data Cache utilizationFillfactor & Data Cache utilization OLTP / OLAP requirementOLTP / OLAP requirement SORT_IN_TEMPDBSORT_IN_TEMPDB DBCC CLEANTABLEDBCC CLEANTABLE Parallel index creationParallel index creation
28
Attach and Detach DatabaseAttach and Detach Databasedetail stats.SQL Server Query Analyzer - [Query - sapprod.master.sa - (untitled)]
DB: master
sp_detach_db ‘PRD’, ‘true’1111
2222
detail stats.SQL Server Query Analyzer - [Query - sapprod.master.sa - (untitled)]
DB: PRD
sp_helpfile
3333
4444
detail stats.SQL Server Query Analyzer - [Query - sapprod.master.sa - (untitled)]
DB: master
sp_attach_db ‘PRD’,‘F:\PRDDATA1\PRDDATA1.MDF’,
‘G:\PRDDATA2\PRDDATA2.NDF’,
detail stats.C:\WINNT\System32\cmd.exe
Microsoft(R) Windows NT (TM)(C) Copyright 19985-1996 Microsoft Corp.
C:\> mv F:\PRDDATA2\PRDDATA2.NDF G:\PRDDATA2\PRDDATA2.NDF
29
Common ErrorsCommon Errors
Work process unable to loginWork process unable to login Transaction log is fullTransaction log is full SQL Server does not startSQL Server does not start Database not availableDatabase not available
30
LabLab
Expand the test databaseExpand the test database Add a file to the test databaseAdd a file to the test database Detach the test database, copy the Detach the test database, copy the
files and attach it as test1 databasefiles and attach it as test1 database
31
SummarySummary
Write Module SummaryWrite Module Summary