SlideShare a Scribd company logo
DR 101 – The Overnight DBA
2013 MUSE International
Educational Session #1093
May 30 10:00am
Presenter: Ian Proffer
Today’s Agenda
• What is a DBA?
• SQL Server & Management Studio
• MEDITECH’s expectations for you
• Administration: database maintenance, managing
growth, user access and security
• Analysis: getting data efficiently, monitoring and
optimizing performance
What is a “DBA?”
A. A database administrator
B. A database analyst
C. A database architect
D. An FTE that hasn’t been filled yet
E. A and B (or maybe D)
Microsoft SQL Server
SQL Server & Data Repository
• DR is not a typical database (it’s a relational
database without relationships)
• The DR has 6,500+ tables as of 5.6x and over
35,000+ data fields
• Security is managed through SQL Server or Windows
Active Directory (no connection to MEDITECH
security mechanisms)
• DR databases include SQL tables with primary key
clustered indexes and stored procedures
MEDITECH Wants You!
To take care of your Data Repository
The dr overnight dba
Server and Database Administration
• Server Monitoring & Maintenance
 Check the Windows Server and SQL Server logs
regularly or when you see symptoms of possible
problems
 Perform regular database maintenance, including
backups and data integrity checking
 Monitor overall disk space and usage
Backups and Data Integrity
• Database backups
 Ideally every database has a full backup done daily during
non-business hours
 Older hardware with very large databases may use differential
backups
 Do I need to back up the transaction log?
 The “Simple” recovery model
 In the event of a system failure, how quickly can the database
be brought back to a given point in time?
• Data integrity checking (DBCC)
 Check data integrity regularly (weekly, monthly)
 DBCC, SQL Maintenance Wizard
 Analyze and address index fragmentation
glass = database
water = your data
coaster = disk drive
Managing Disk and Database Space
How to Check Database & File Space
1. Management Studio Report
How to Check Database & File Space
2. Database Properties
How to Check Database & File Space
3. T-SQL sp_spaceused
Managing Disk and Database Space
• Disk space vs. database space
 Make sure primary data drive has plenty of capacity for
livedb growth
 MT recommends you keep 25% free space for the
livedb (typically the E: drive)
 Database auto-growth options
 Percentage vs. amount of space
 Unrestricted vs. restricted space
• What happens when the drive is full?
 Transfers stop (crash) until the db can grow
 Avoid this at all costs!
Using DR Manager to Plan for Growth
Managing Security & Access
• Create your own database for report
objects (stored procedures, functions, views, etc.)
 This avoids co-mingling your code and objects with Meditech’s
 This allows you to limit direct access to livedb
• Use Active Directory groups for easier administration
 e.g. ReportAdmins group, ReportViewer group
• For those that need access to livedb data consider:
 Using views in your database to selectively expose livedb data
 Using SQL database-level roles for direct table access
 ReportAdmins: db_owner, db_denydatawriter (read all data from
livedb, ability to create indexes but no INSERT, UPDATE or DELETE)
 ReportViewers: db_datareader (SELECT from tables)
 ReportViewers_NoPP: db_datareader with further DENY SELECT
permissions*
USE livedb
GO
SELECT 'DENY SELECT ON ' + name + ' TO
ReportViewers_NoPP'
FROM livedb.dbo.sysobjects
WHERE xtype = 'U'
AND name LIKE 'Pp%'
ORDER BY name
Database Analysis
• Optimizing queries
 Query execution plans
• Creating your own indexes
• Handling index fragmentation
• Other performance tools
Optimizing Queries
• Viewing the query execution plan
Creating Your Own Indexes
• Clustered vs. non-clustered
 All DR tables already have a primary key clustered index.
Don’t change them!
 Non-clustered indexes can be added wherever you like
• Document and save scripts for your indexes
• General guidelines for new non-clustered indexes
 SourceID, VisitID in any non-ADM (or EDM) top-level table
 AbstractData, BarVisits, LabSpecimens, PhaRx, OeOrders
 DateTime columns (AdmitDateTime, BatchDateTime,
CollectedDateTime)
• Multi-column (“covering”) vs. single column indexes
Index Fragmentation
• The SQL Maintenance Wizard can address this, but…
 Every table in the database is analyzed and acted upon
 Indexes may be dropped and recreated (REBUILD vs.
REORGANIZE)
• Doing your own, targeted index maintenance is better
 Assemble a list of tables you use regularly for reports
 If maintenance hasn’t been done, address tables selectively
on a series of first passes, then on a regular schedule
(weekly, monthly, after initial loads)
 After important tables are done, address the others
• Limit amount of work done based on a fragmentation
threshold or set number of tables (based on size) per
session
Analyzing Index Fragmentation (Old School)
Logical Scan
Fragmentation – lower is
better, anything above
25-30% would be a
candidate to defragment.
Avg. Page Density –
higher is better, ideally
90-95%. The fuller each
page is, the denser (less
fragmented) the data are.
-- Analyze fragmentation
DBCC SHOWCONTIG ('dbo.AdmVisits')
-- Defragment index if necessary
DBCC INDEXDEFRAG ( DBNAME, TABLENAME, INDEXNAME)
Analyzing Index Fragmentation (New School)
• Use SQL System Management Views
• ALTER INDEX with REORGANIZE
 Replaces DBCC INDEXDEFRAG
• ALTER INDEX with REBUILD
 Replaces DBCC DBREINDEX
• You can use Management Studio or use T-SQL
commands
Other Performance & Monitoring Tools
• Activity Monitor
Other Performance & Monitoring Tools
• SQL Profiler
Other Performance & Monitoring Tools
• Database Engine Tuning Advisor
Discussion, Questions & Answers
Come see our MUSE sessions and visit us at Booth
#603 in the Exhibit Hall!
• Today at 1:30
 1149 - Data Repository: The Journey to 6.0 and Beyond
• Fri 5/31 3:30
 1179- EHR Meaningful Use 2014 (Stage 2) DR Reporting Strategies
Thank you.

More Related Content

PPTX
Sql server introduction
Riteshkiit
 
PPTX
ABCs of CDC with SSIS 2012
Steve Wake
 
PPTX
Group Members
Farhan Shahani
 
PPTX
OLAP
Slideshare
 
PPTX
Sql – pocket guide
Santhosh Kumar
 
PPT
Ch 7 Physical D B Design
guest8fdbdd
 
PPT
Oracle DBA Priority Tasks
santosh kodandapani
 
PDF
Discover Database
Wayne Weixin
 
Sql server introduction
Riteshkiit
 
ABCs of CDC with SSIS 2012
Steve Wake
 
Group Members
Farhan Shahani
 
Sql – pocket guide
Santhosh Kumar
 
Ch 7 Physical D B Design
guest8fdbdd
 
Oracle DBA Priority Tasks
santosh kodandapani
 
Discover Database
Wayne Weixin
 

What's hot (20)

PPTX
Introduction to oracle database (basic concepts)
Bilal Arshad
 
PPTX
NoSQL (Non-Relational Databases)
Ehsan Javanmard
 
PPTX
No SQL
The lazy hoplite
 
PPTX
Oracle Query Optimizer - An Introduction
adryanbub
 
PPTX
Parallel processing in data warehousing and big data
Abhishek Sharma
 
DOC
Sql server-dba
NaviSoft
 
PPT
Lecture12
Châu Thanh Chương
 
PPTX
Cassandra Learning
Ehsan Javanmard
 
PDF
Strategies for SQL Server Index Analysis
Jason Strate
 
PPTX
Online Datastage training
chpriyaa1
 
PPTX
U-SQL Federated Distributed Queries (SQLBits 2016)
Michael Rys
 
PPT
Java Developers, make the database work for you (NLJUG JFall 2010)
Lucas Jellema
 
PPTX
Introduction to NOSQL databases
Ashwani Kumar
 
PDF
3 olap storage
Claudia Gomez
 
PPT
NoSQL databases
Meshal Albeedhani
 
PPT
ORACLE 12C-New-Features
Navneet Upneja
 
ODP
EDW and Hadoop
Tapio Vaattanen
 
PPTX
Database awareness
kloia
 
PPTX
Mapping Data Flows Training deck Q1 CY22
Mark Kromer
 
PPT
Student projects with open source CSQL
Prabakaran Thirumalai
 
Introduction to oracle database (basic concepts)
Bilal Arshad
 
NoSQL (Non-Relational Databases)
Ehsan Javanmard
 
Oracle Query Optimizer - An Introduction
adryanbub
 
Parallel processing in data warehousing and big data
Abhishek Sharma
 
Sql server-dba
NaviSoft
 
Cassandra Learning
Ehsan Javanmard
 
Strategies for SQL Server Index Analysis
Jason Strate
 
Online Datastage training
chpriyaa1
 
U-SQL Federated Distributed Queries (SQLBits 2016)
Michael Rys
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Lucas Jellema
 
Introduction to NOSQL databases
Ashwani Kumar
 
3 olap storage
Claudia Gomez
 
NoSQL databases
Meshal Albeedhani
 
ORACLE 12C-New-Features
Navneet Upneja
 
EDW and Hadoop
Tapio Vaattanen
 
Database awareness
kloia
 
Mapping Data Flows Training deck Q1 CY22
Mark Kromer
 
Student projects with open source CSQL
Prabakaran Thirumalai
 
Ad

Viewers also liked (20)

PDF
CloudFoundryこと始め
Naoto TAKAHASHI
 
PPTX
Marketing communication
Samir Yassin
 
PDF
Sheet1 simplified
marwan a
 
PDF
Informe general
kode99
 
PPTX
Hzz ve ra birlikleri defans el kitabı
haseleonore
 
PDF
NdT inspection of wire ropes for elevators
Bruno Vusini
 
PPTX
Target audience aa 1
nctcmedia12
 
PPTX
Proiectele e twinning cale spre cunoasterea culturii europene
Grigore Gheorghita
 
PPTX
Create a group and Add Members using MBC
MaryAnn Medved
 
PPTX
Target audience aa 1
nctcmedia12
 
PDF
Газовый настенный котел Baxi Luna 3 310 Fi
Al Maks
 
PPT
Energitilsyn og energiklagenævn copenhagen june2013
consumerenergy
 
DOCX
Tutorial de ingreso a plataforma curso virtual
Kattia Rodriguez
 
PDF
Фундамент
Al Maks
 
PPT
Jeyakumar Narashimman
☁ Jeyakumar NARASHIMMAN
 
KEY
Media Studies - Forms and Conventions
Thomas Hesselberg
 
PPTX
R&p
nctcmedia12
 
PDF
Selectivos valenciano sept. 2010 y junio 2011
javier Soto
 
PDF
Agoria delestree
CIRB_CIBG
 
PPT
Uml面向对象的分析与设计
xunhao
 
CloudFoundryこと始め
Naoto TAKAHASHI
 
Marketing communication
Samir Yassin
 
Sheet1 simplified
marwan a
 
Informe general
kode99
 
Hzz ve ra birlikleri defans el kitabı
haseleonore
 
NdT inspection of wire ropes for elevators
Bruno Vusini
 
Target audience aa 1
nctcmedia12
 
Proiectele e twinning cale spre cunoasterea culturii europene
Grigore Gheorghita
 
Create a group and Add Members using MBC
MaryAnn Medved
 
Target audience aa 1
nctcmedia12
 
Газовый настенный котел Baxi Luna 3 310 Fi
Al Maks
 
Energitilsyn og energiklagenævn copenhagen june2013
consumerenergy
 
Tutorial de ingreso a plataforma curso virtual
Kattia Rodriguez
 
Фундамент
Al Maks
 
Jeyakumar Narashimman
☁ Jeyakumar NARASHIMMAN
 
Media Studies - Forms and Conventions
Thomas Hesselberg
 
Selectivos valenciano sept. 2010 y junio 2011
javier Soto
 
Agoria delestree
CIRB_CIBG
 
Uml面向对象的分析与设计
xunhao
 
Ad

Similar to The dr overnight dba (20)

PPTX
Database Maintenance Optimization Brad Mc Gehee
Pratik joshi
 
PPTX
Dba101
Pratik joshi
 
PPTX
Managing SQLserver for the reluctant DBA
Concentrated Technology
 
PPT
Managing SQLserver
Concentrated Technology
 
PPT
Optimizing Data Accessin Sq Lserver2005
rainynovember12
 
PPT
Performance Tuning And Optimization Microsoft SQL Database
Tung Nguyen Thanh
 
PPT
Sql server basics
Dilfaroz Khan
 
PPTX
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
IDERA Software
 
PPSX
database_maintenance sequential plot.ppsx
gauravsaxena850349
 
PDF
SQL Server 2014 Monitoring and Profiling
Abouzar Noori
 
PPTX
Understanding indices
Richard Douglas
 
PPTX
SQL Server Admin Best Practices with DMV's
Sparkhound Inc.
 
PPT
SQL Server Basics Hello world iam here.ppt
nanisaketh
 
PPTX
Query Optimization in SQL Server
Rajesh Gunasundaram
 
PPTX
How not to be a cranky dba
Mike Hillwig
 
PPTX
Sql interview question part 5
kaashiv1
 
PPTX
Ebook5
kaashiv1
 
PPT
Sql Server Performance Tuning
Bala Subra
 
PDF
Advanced tips for making Oracle databases faster
SolarWinds
 
PPTX
Database Performance Tuning| Rahul Gulab Singh
Rahul Singh
 
Database Maintenance Optimization Brad Mc Gehee
Pratik joshi
 
Dba101
Pratik joshi
 
Managing SQLserver for the reluctant DBA
Concentrated Technology
 
Managing SQLserver
Concentrated Technology
 
Optimizing Data Accessin Sq Lserver2005
rainynovember12
 
Performance Tuning And Optimization Microsoft SQL Database
Tung Nguyen Thanh
 
Sql server basics
Dilfaroz Khan
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
IDERA Software
 
database_maintenance sequential plot.ppsx
gauravsaxena850349
 
SQL Server 2014 Monitoring and Profiling
Abouzar Noori
 
Understanding indices
Richard Douglas
 
SQL Server Admin Best Practices with DMV's
Sparkhound Inc.
 
SQL Server Basics Hello world iam here.ppt
nanisaketh
 
Query Optimization in SQL Server
Rajesh Gunasundaram
 
How not to be a cranky dba
Mike Hillwig
 
Sql interview question part 5
kaashiv1
 
Ebook5
kaashiv1
 
Sql Server Performance Tuning
Bala Subra
 
Advanced tips for making Oracle databases faster
SolarWinds
 
Database Performance Tuning| Rahul Gulab Singh
Rahul Singh
 

Recently uploaded (20)

PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 

The dr overnight dba

  • 1. DR 101 – The Overnight DBA 2013 MUSE International Educational Session #1093 May 30 10:00am Presenter: Ian Proffer
  • 2. Today’s Agenda • What is a DBA? • SQL Server & Management Studio • MEDITECH’s expectations for you • Administration: database maintenance, managing growth, user access and security • Analysis: getting data efficiently, monitoring and optimizing performance
  • 3. What is a “DBA?” A. A database administrator B. A database analyst C. A database architect D. An FTE that hasn’t been filled yet E. A and B (or maybe D)
  • 5. SQL Server & Data Repository • DR is not a typical database (it’s a relational database without relationships) • The DR has 6,500+ tables as of 5.6x and over 35,000+ data fields • Security is managed through SQL Server or Windows Active Directory (no connection to MEDITECH security mechanisms) • DR databases include SQL tables with primary key clustered indexes and stored procedures
  • 6. MEDITECH Wants You! To take care of your Data Repository
  • 8. Server and Database Administration • Server Monitoring & Maintenance  Check the Windows Server and SQL Server logs regularly or when you see symptoms of possible problems  Perform regular database maintenance, including backups and data integrity checking  Monitor overall disk space and usage
  • 9. Backups and Data Integrity • Database backups  Ideally every database has a full backup done daily during non-business hours  Older hardware with very large databases may use differential backups  Do I need to back up the transaction log?  The “Simple” recovery model  In the event of a system failure, how quickly can the database be brought back to a given point in time? • Data integrity checking (DBCC)  Check data integrity regularly (weekly, monthly)  DBCC, SQL Maintenance Wizard  Analyze and address index fragmentation
  • 10. glass = database water = your data coaster = disk drive Managing Disk and Database Space
  • 11. How to Check Database & File Space 1. Management Studio Report
  • 12. How to Check Database & File Space 2. Database Properties
  • 13. How to Check Database & File Space 3. T-SQL sp_spaceused
  • 14. Managing Disk and Database Space • Disk space vs. database space  Make sure primary data drive has plenty of capacity for livedb growth  MT recommends you keep 25% free space for the livedb (typically the E: drive)  Database auto-growth options  Percentage vs. amount of space  Unrestricted vs. restricted space • What happens when the drive is full?  Transfers stop (crash) until the db can grow  Avoid this at all costs!
  • 15. Using DR Manager to Plan for Growth
  • 16. Managing Security & Access • Create your own database for report objects (stored procedures, functions, views, etc.)  This avoids co-mingling your code and objects with Meditech’s  This allows you to limit direct access to livedb • Use Active Directory groups for easier administration  e.g. ReportAdmins group, ReportViewer group • For those that need access to livedb data consider:  Using views in your database to selectively expose livedb data  Using SQL database-level roles for direct table access  ReportAdmins: db_owner, db_denydatawriter (read all data from livedb, ability to create indexes but no INSERT, UPDATE or DELETE)  ReportViewers: db_datareader (SELECT from tables)  ReportViewers_NoPP: db_datareader with further DENY SELECT permissions*
  • 17. USE livedb GO SELECT 'DENY SELECT ON ' + name + ' TO ReportViewers_NoPP' FROM livedb.dbo.sysobjects WHERE xtype = 'U' AND name LIKE 'Pp%' ORDER BY name
  • 18. Database Analysis • Optimizing queries  Query execution plans • Creating your own indexes • Handling index fragmentation • Other performance tools
  • 19. Optimizing Queries • Viewing the query execution plan
  • 20. Creating Your Own Indexes • Clustered vs. non-clustered  All DR tables already have a primary key clustered index. Don’t change them!  Non-clustered indexes can be added wherever you like • Document and save scripts for your indexes • General guidelines for new non-clustered indexes  SourceID, VisitID in any non-ADM (or EDM) top-level table  AbstractData, BarVisits, LabSpecimens, PhaRx, OeOrders  DateTime columns (AdmitDateTime, BatchDateTime, CollectedDateTime) • Multi-column (“covering”) vs. single column indexes
  • 21. Index Fragmentation • The SQL Maintenance Wizard can address this, but…  Every table in the database is analyzed and acted upon  Indexes may be dropped and recreated (REBUILD vs. REORGANIZE) • Doing your own, targeted index maintenance is better  Assemble a list of tables you use regularly for reports  If maintenance hasn’t been done, address tables selectively on a series of first passes, then on a regular schedule (weekly, monthly, after initial loads)  After important tables are done, address the others • Limit amount of work done based on a fragmentation threshold or set number of tables (based on size) per session
  • 22. Analyzing Index Fragmentation (Old School) Logical Scan Fragmentation – lower is better, anything above 25-30% would be a candidate to defragment. Avg. Page Density – higher is better, ideally 90-95%. The fuller each page is, the denser (less fragmented) the data are. -- Analyze fragmentation DBCC SHOWCONTIG ('dbo.AdmVisits') -- Defragment index if necessary DBCC INDEXDEFRAG ( DBNAME, TABLENAME, INDEXNAME)
  • 23. Analyzing Index Fragmentation (New School) • Use SQL System Management Views • ALTER INDEX with REORGANIZE  Replaces DBCC INDEXDEFRAG • ALTER INDEX with REBUILD  Replaces DBCC DBREINDEX • You can use Management Studio or use T-SQL commands
  • 24. Other Performance & Monitoring Tools • Activity Monitor
  • 25. Other Performance & Monitoring Tools • SQL Profiler
  • 26. Other Performance & Monitoring Tools • Database Engine Tuning Advisor
  • 28. Come see our MUSE sessions and visit us at Booth #603 in the Exhibit Hall! • Today at 1:30  1149 - Data Repository: The Journey to 6.0 and Beyond • Fri 5/31 3:30  1179- EHR Meaningful Use 2014 (Stage 2) DR Reporting Strategies Thank you.