31
Microsoft SQL Server Microsoft SQL Server Administration for SAP Administration for SAP Administration and Administration and Troubleshooting Troubleshooting

Microsoft SQL Server Administration for SAP Administration and Troubleshooting

Embed Size (px)

Citation preview

Page 1: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

Microsoft SQL Server Microsoft SQL Server Administration for SAPAdministration for SAP

Administration and Administration and TroubleshootingTroubleshooting

Page 2: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

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

Page 3: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

3

DB02DB02

Page 4: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

4

History of DB SizeHistory of DB Size

Page 5: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

5

Adding a file to a DatabaseAdding a file to a Database

Page 6: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

6

Expanding a DatabaseExpanding a Database

Page 7: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

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

Page 8: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

8

DB02DB02

Page 9: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

9

Server PropertiesServer Properties

Page 10: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

10

Server PropertiesServer Properties

Page 11: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

11

Server PropertiesServer Properties

Page 12: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

12

Server PropertiesServer Properties

Page 13: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

13

DB Maintenance WizardDB Maintenance Wizard

Page 14: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

14

DB Maintenance WizardDB Maintenance Wizard

Page 15: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

15

DB Maintenance WizardDB Maintenance Wizard

Page 16: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

16

DB Maintenance WizardDB Maintenance Wizard

Page 17: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

17

DB Maintenance WizardDB Maintenance Wizard

Page 18: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

18

DB Maintenance WizardDB Maintenance Wizard

Page 19: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

19

DB Maintenance WizardDB Maintenance Wizard

Page 20: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

20

Errorlog from SAPErrorlog from SAP

Page 21: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

21

ErrorlogErrorlog

Page 22: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

22

ErrorlogErrorlog

Page 23: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

23

LoginsLogins

Page 24: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

24

LoginsLogins

Page 25: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

25

LoginsLogins

Page 26: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

26

LoginsLogins

Page 27: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

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

Page 28: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

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

Page 29: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

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

Page 30: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

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

Page 31: Microsoft SQL Server Administration for SAP Administration and Troubleshooting

31

SummarySummary

Write Module SummaryWrite Module Summary