SlideShare ist ein Scribd-Unternehmen logo
1 von 28
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
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.

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Bilal Arshad
 
NoSQL (Non-Relational Databases)
NoSQL (Non-Relational Databases)NoSQL (Non-Relational Databases)
NoSQL (Non-Relational Databases)Ehsan Javanmard
 
Oracle Query Optimizer - An Introduction
Oracle Query Optimizer - An IntroductionOracle Query Optimizer - An Introduction
Oracle Query Optimizer - An Introductionadryanbub
 
Parallel processing in data warehousing and big data
Parallel processing in data warehousing and big dataParallel processing in data warehousing and big data
Parallel processing in data warehousing and big dataAbhishek Sharma
 
Sql server-dba
Sql server-dbaSql server-dba
Sql server-dbaNaviSoft
 
Strategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisStrategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisJason Strate
 
Online Datastage training
Online Datastage trainingOnline Datastage training
Online Datastage trainingchpriyaa1
 
U-SQL Federated Distributed Queries (SQLBits 2016)
U-SQL Federated Distributed Queries (SQLBits 2016)U-SQL Federated Distributed Queries (SQLBits 2016)
U-SQL Federated Distributed Queries (SQLBits 2016)Michael Rys
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Lucas Jellema
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databasesAshwani Kumar
 
ORACLE 12C-New-Features
ORACLE 12C-New-FeaturesORACLE 12C-New-Features
ORACLE 12C-New-FeaturesNavneet Upneja
 
Database awareness
Database awarenessDatabase awareness
Database awarenesskloia
 
Mapping Data Flows Training deck Q1 CY22
Mapping Data Flows Training deck Q1 CY22Mapping Data Flows Training deck Q1 CY22
Mapping Data Flows Training deck Q1 CY22Mark Kromer
 
Student projects with open source CSQL
Student projects with open source CSQLStudent projects with open source CSQL
Student projects with open source CSQLPrabakaran Thirumalai
 

Was ist angesagt? (20)

Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)
 
NoSQL (Non-Relational Databases)
NoSQL (Non-Relational Databases)NoSQL (Non-Relational Databases)
NoSQL (Non-Relational Databases)
 
No SQL
No SQLNo SQL
No SQL
 
Oracle Query Optimizer - An Introduction
Oracle Query Optimizer - An IntroductionOracle Query Optimizer - An Introduction
Oracle Query Optimizer - An Introduction
 
Parallel processing in data warehousing and big data
Parallel processing in data warehousing and big dataParallel processing in data warehousing and big data
Parallel processing in data warehousing and big data
 
Sql server-dba
Sql server-dbaSql server-dba
Sql server-dba
 
Lecture12
Lecture12Lecture12
Lecture12
 
Cassandra Learning
Cassandra LearningCassandra Learning
Cassandra Learning
 
Strategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisStrategies for SQL Server Index Analysis
Strategies for SQL Server Index Analysis
 
Online Datastage training
Online Datastage trainingOnline Datastage training
Online Datastage training
 
U-SQL Federated Distributed Queries (SQLBits 2016)
U-SQL Federated Distributed Queries (SQLBits 2016)U-SQL Federated Distributed Queries (SQLBits 2016)
U-SQL Federated Distributed Queries (SQLBits 2016)
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
 
3 olap storage
3 olap storage3 olap storage
3 olap storage
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
ORACLE 12C-New-Features
ORACLE 12C-New-FeaturesORACLE 12C-New-Features
ORACLE 12C-New-Features
 
EDW and Hadoop
EDW and HadoopEDW and Hadoop
EDW and Hadoop
 
Database awareness
Database awarenessDatabase awareness
Database awareness
 
Mapping Data Flows Training deck Q1 CY22
Mapping Data Flows Training deck Q1 CY22Mapping Data Flows Training deck Q1 CY22
Mapping Data Flows Training deck Q1 CY22
 
Student projects with open source CSQL
Student projects with open source CSQLStudent projects with open source CSQL
Student projects with open source CSQL
 

Andere mochten auch

CloudFoundryこと始め
CloudFoundryこと始めCloudFoundryこと始め
CloudFoundryこと始めNaoto TAKAHASHI
 
Marketing communication
Marketing communicationMarketing communication
Marketing communicationSamir Yassin
 
Sheet1 simplified
Sheet1 simplifiedSheet1 simplified
Sheet1 simplifiedmarwan a
 
Informe general
Informe generalInforme general
Informe generalkode99
 
Hzz ve ra birlikleri defans el kitabı
Hzz ve ra birlikleri defans el kitabıHzz ve ra birlikleri defans el kitabı
Hzz ve ra birlikleri defans el kitabıhaseleonore
 
NdT inspection of wire ropes for elevators
NdT inspection of wire ropes for elevatorsNdT inspection of wire ropes for elevators
NdT inspection of wire ropes for elevatorsBruno Vusini
 
Target audience aa 1
Target audience aa 1Target audience aa 1
Target audience aa 1nctcmedia12
 
Proiectele e twinning cale spre cunoasterea culturii europene
Proiectele e twinning  cale spre cunoasterea culturii europeneProiectele e twinning  cale spre cunoasterea culturii europene
Proiectele e twinning cale spre cunoasterea culturii europeneGrigore Gheorghita
 
Create a group and Add Members using MBC
Create a group and Add Members using MBCCreate a group and Add Members using MBC
Create a group and Add Members using MBCMaryAnn Medved
 
Target audience aa 1
Target audience aa 1Target audience aa 1
Target audience aa 1nctcmedia12
 
Газовый настенный котел Baxi Luna 3 310 Fi
Газовый настенный котел Baxi Luna 3 310 FiГазовый настенный котел Baxi Luna 3 310 Fi
Газовый настенный котел Baxi Luna 3 310 FiAl Maks
 
Energitilsyn og energiklagenævn copenhagen june2013
Energitilsyn og energiklagenævn copenhagen june2013Energitilsyn og energiklagenævn copenhagen june2013
Energitilsyn og energiklagenævn copenhagen june2013consumerenergy
 
Tutorial de ingreso a plataforma curso virtual
Tutorial de ingreso a plataforma curso virtualTutorial de ingreso a plataforma curso virtual
Tutorial de ingreso a plataforma curso virtualKattia Rodriguez
 
Фундамент
ФундаментФундамент
ФундаментAl Maks
 
Media Studies - Forms and Conventions
Media Studies - Forms and ConventionsMedia Studies - Forms and Conventions
Media Studies - Forms and ConventionsThomas Hesselberg
 
Selectivos valenciano sept. 2010 y junio 2011
Selectivos valenciano sept. 2010 y junio 2011 Selectivos valenciano sept. 2010 y junio 2011
Selectivos valenciano sept. 2010 y junio 2011 javier Soto
 
Agoria delestree
Agoria delestreeAgoria delestree
Agoria delestreeCIRB_CIBG
 
Uml面向对象的分析与设计
Uml面向对象的分析与设计Uml面向对象的分析与设计
Uml面向对象的分析与设计xunhao
 

Andere mochten auch (20)

CloudFoundryこと始め
CloudFoundryこと始めCloudFoundryこと始め
CloudFoundryこと始め
 
Marketing communication
Marketing communicationMarketing communication
Marketing communication
 
Sheet1 simplified
Sheet1 simplifiedSheet1 simplified
Sheet1 simplified
 
Informe general
Informe generalInforme general
Informe general
 
Hzz ve ra birlikleri defans el kitabı
Hzz ve ra birlikleri defans el kitabıHzz ve ra birlikleri defans el kitabı
Hzz ve ra birlikleri defans el kitabı
 
NdT inspection of wire ropes for elevators
NdT inspection of wire ropes for elevatorsNdT inspection of wire ropes for elevators
NdT inspection of wire ropes for elevators
 
Target audience aa 1
Target audience aa 1Target audience aa 1
Target audience aa 1
 
Proiectele e twinning cale spre cunoasterea culturii europene
Proiectele e twinning  cale spre cunoasterea culturii europeneProiectele e twinning  cale spre cunoasterea culturii europene
Proiectele e twinning cale spre cunoasterea culturii europene
 
Create a group and Add Members using MBC
Create a group and Add Members using MBCCreate a group and Add Members using MBC
Create a group and Add Members using MBC
 
Target audience aa 1
Target audience aa 1Target audience aa 1
Target audience aa 1
 
Газовый настенный котел Baxi Luna 3 310 Fi
Газовый настенный котел Baxi Luna 3 310 FiГазовый настенный котел Baxi Luna 3 310 Fi
Газовый настенный котел Baxi Luna 3 310 Fi
 
Energitilsyn og energiklagenævn copenhagen june2013
Energitilsyn og energiklagenævn copenhagen june2013Energitilsyn og energiklagenævn copenhagen june2013
Energitilsyn og energiklagenævn copenhagen june2013
 
Tutorial de ingreso a plataforma curso virtual
Tutorial de ingreso a plataforma curso virtualTutorial de ingreso a plataforma curso virtual
Tutorial de ingreso a plataforma curso virtual
 
Фундамент
ФундаментФундамент
Фундамент
 
Jeyakumar Narashimman
Jeyakumar NarashimmanJeyakumar Narashimman
Jeyakumar Narashimman
 
Media Studies - Forms and Conventions
Media Studies - Forms and ConventionsMedia Studies - Forms and Conventions
Media Studies - Forms and Conventions
 
R&p
R&pR&p
R&p
 
Selectivos valenciano sept. 2010 y junio 2011
Selectivos valenciano sept. 2010 y junio 2011 Selectivos valenciano sept. 2010 y junio 2011
Selectivos valenciano sept. 2010 y junio 2011
 
Agoria delestree
Agoria delestreeAgoria delestree
Agoria delestree
 
Uml面向对象的分析与设计
Uml面向对象的分析与设计Uml面向对象的分析与设计
Uml面向对象的分析与设计
 

Ähnlich wie The dr overnight dba

KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersTobias Koprowski
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersTobias Koprowski
 
Database management system (part 1)
Database management system (part 1)Database management system (part 1)
Database management system (part 1)KavithaA19
 
Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Tushar Wagh
 
DataBase Management systems (IM).pptx
DataBase Management systems (IM).pptxDataBase Management systems (IM).pptx
DataBase Management systems (IM).pptxGooglePay16
 
Database administrator
Database administratorDatabase administrator
Database administratorTech_MX
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL AzureShy Engelberg
 
Tech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesTech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesRalph Attard
 
7 Things To Know About Database Testing.pdf
7 Things To Know About Database Testing.pdf7 Things To Know About Database Testing.pdf
7 Things To Know About Database Testing.pdfEnov8
 
Implementing the Databese Server session 02
Implementing the Databese Server session 02Implementing the Databese Server session 02
Implementing the Databese Server session 02Guillermo Julca
 
Database Management Systems 2
Database Management Systems 2Database Management Systems 2
Database Management Systems 2Nickkisha Farrell
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemEddyzulham Mahluzydde
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CoursePiyush sachdeva
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptxAshmitKashyap1
 
Presentation cloud control enterprise manager 12c
Presentation   cloud control enterprise manager 12cPresentation   cloud control enterprise manager 12c
Presentation cloud control enterprise manager 12cxKinAnx
 
Week 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptxWeek 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptxRiannel Tecson
 

Ähnlich wie The dr overnight dba (20)

KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
 
Database management system (part 1)
Database management system (part 1)Database management system (part 1)
Database management system (part 1)
 
Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
MS ACCESS.pptx
MS ACCESS.pptxMS ACCESS.pptx
MS ACCESS.pptx
 
DataBase Management systems (IM).pptx
DataBase Management systems (IM).pptxDataBase Management systems (IM).pptx
DataBase Management systems (IM).pptx
 
Database administrator
Database administratorDatabase administrator
Database administrator
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Tech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesTech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL Databases
 
MS-ACCESS.pptx
MS-ACCESS.pptxMS-ACCESS.pptx
MS-ACCESS.pptx
 
7 Things To Know About Database Testing.pdf
7 Things To Know About Database Testing.pdf7 Things To Know About Database Testing.pdf
7 Things To Know About Database Testing.pdf
 
Implementing the Databese Server session 02
Implementing the Databese Server session 02Implementing the Databese Server session 02
Implementing the Databese Server session 02
 
Database Management Systems 2
Database Management Systems 2Database Management Systems 2
Database Management Systems 2
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management System
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full Course
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptx
 
Presentation cloud control enterprise manager 12c
Presentation   cloud control enterprise manager 12cPresentation   cloud control enterprise manager 12c
Presentation cloud control enterprise manager 12c
 
Week 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptxWeek 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptx
 

Kürzlich hochgeladen

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

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
  • 7.
  • 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.