SlideShare uma empresa Scribd logo
1 de 25
…and be a happy team
DBA & dev’s, let’s get along
• Constant struggle
• Immediacy vs Security
• Urgency vs Availability
For whatever reason one constant has always been the conflict
between DBA's and developers. It may not be as open a conflict in
every place, but there is always an undeniable tension between the
two groups. Following some simple guidelines can bring everyone
together for a more pleasant work experience.
Lets check on how you can keep your DBA's happy, work all together
as a team and therefore, keep the business running smoothly.
Why are we talking about this?
This doesn’t help me learn SQL Server; does it?
DBA BEFOREOMG!!! OH! NO again and NO once again!
DBA AFTER
• Security
• Availability
• Integrity
• Recoverability
• Performance
• Development support
What is a DBA?
A person who is responsible for the environmental aspects of a database
• we’re on the same team
• It’s all about the data
• he can help tuning your tsql code
• he can turn down code
changes/releases if it affects
production (Security! Availability!)
Why does the DBA matter?
Do you even have to ask?
• It can do anything
• It can house any data
• ….BUT…
Interaction
When do (should) developers and DBAs come together?
MS SQL Server is a multi-purpose, multi-database RDMS
That doesn't mean that the defaults for EVERYTHING are
good for EVERYONE and EVERY database
• Planning
• Design
• Development
• Deployment
• Support
Interaction
When do (should) developers and DBAs come together?
• To prepare for increased capacity
• To conduct proper time management
• To assess hardware and licensing needs
• To address budgetary issues
Planning
They need to know!
The earlier you can let the DBAs know that you are planning,
something the better.
Those responsible for the vital subject matter of any project
should never be an after-thought during planning.
• Optimal database construction
• Keys and indexes
• Performance pitfalls
• Things you can’t possibly know
– systems interactions
– maintenance schedules
– process priority
Design
They can help!
• DBA’s can really help
– They know performance implications of using different
methods
– They can suggest new features that you may not know of
• Writing TSQL *is* development
– Treat it as you would any other code
– Tune for performance now, not after deployment (when
it’s causing problems).
Development
Probably what most of you are waiting for
• Formatting (or rather not formatting)
– This alone can move you up on the DBA happy list
• Use of poor aliases
– Initials, generic letters, etc.
• Use of meaningless variable names
– For your own benefit, and the DBAs
Bad Habits
There had to be something technical in this talk, right?
Bad Habits
There had to be something technical in this talk, right?
• Being case insensitive
– No reason not to develop on a CS database
• SELECT *
– Readability
– You don’t always need *everything*
– Causes lookups!
• Using a query designer
– Keep scripting skills sharp
– Generates unformatted, messy, chatty code
• Lots of cursors and/or RBAR
• Availability
– If you really want things to go as smoothly as possible,
be there to help things along, and communicate
– If you want the best, fastest resolution, be available to
help
• Script construction
– DBAs like to know what is going onto the servers.
Provide well documented, well formatted, readable
scripts
Deployment
Most development shops fall short here
• Back-out/Rollback scripts
– Along with the deployment script, provide
another script that will undo every single change
that the deployment script did (ROLLBACK script)
Hint: Providing your DBA with a rollback of a
deployment gone bad will imprint a fond memory of
you in their mind.
Deployment
Most development shops fall short here
• Trustworthiness
– Trying to hi-jack sysadmin rights is bad
– Sliding undocumented changes into
deployment scripts, also bad
Support
An ongoing commitment
Support
An Ongoing Commitment
• Do not deflect into databases
– Auto-blaming the database server for poor
performance doesn’t help anyone (and usually are
not the guilty ones ;)
• Reasonable expectations
– You can’t restore my 500GB database in 5 minutes?
Why?!
– You can’t add change the clustered index to my 40
million row table at 10AM on Monday? What??!!
Support
An Ongoing Commitment
• BEGIN TRAN..COMMIT/ROLLBACK TRAN
– When troubleshooting code wrap UPDATES / DELETE
statements in a transaction, and always rollback.
• Take care when troubleshooting
– Poorly written test queries run in SSMS can add to the
problem
Support
An Ongoing Commitment
tSQL tuning/optimization is a wide subject.
• lot of information/recommendations but take
those recommendations with a grain of salt
• Each environment/workload is different
• before jumping to code and applying that brand
new amazing optimization technique be sure
you have tested and really tested it on a pre-
production or staging environment
Support
An ongoing commitment
• Query execution plans
– Learn how to translate (at least) the more important operations to look
for a query execution plans. Not in every case, but in general, some
words that should get your attention are “scan”, “sort”, “lookup”.
– Check this article by Grant Fritchey on Execution Plan Basics
http://www.simple-talk.com/sql/performance/execution-plan-basics/
– Recommend using the 100% free tool from SQL Sentry called Plan
Explorer. It’s going to save you a lot of time over the plan features in
SSMS, especially once you are tuning a lot of larger queries.
http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp
Support
An ongoing commitment
Execution plans screen captures (comparison)
Quiz time!
1. When I’ve a hard problem: One point for each
2. When someone has a complaint…
1. 0 pts
2. 0 pts
3. 0 pts
4. 5 pts
3. Being woken at 4am
1. 0 pts
2. 5 pts
3. 5 pts
4. A DBA job might kill you, zero points
4. After you fix something…
1. 0 pts
2. 5 pts
3. 5 pts
4. DBA are too sarcastic to celebrate, 0 pts
5. You must write a troubleshooting guide
1. 5 pts
2. 0 pts
6. Have you ever done any of these?
• One point for each
7. There’s a new dev project
1. 0 pts
2. 5 pts
3. 5 pts
8. A server is repeatedly crashing
1. 0 pts
2. 0 pts
3. 5 pts
4. 0 pts
Quiz time!
Scoring your quiz:
0 – 25: sql might not be the right path for you
26 – 39: pretty darn good fit for a heavily
oriented sql related job
40: what are you doing here? You’re a DBA ;)
References:
• Jason Hall: jhall@sqlsentry.net
• jasonhall.blogs.sqlsentry.net
• http://goo.gl/u6YO9f
• Kendra Little: Should you be a SQL Server DBA?
http://goo.gl/ggIXVg
• Brent Ozar: Watch Brent Tune Servers
http://goo.gl/bR06vL
• Aaron Bertrand’s series: Bad habits to kick
Let's get along

Mais conteúdo relacionado

Mais procurados

Mujeebur rahmansaher introduction-to-scrum_v2
Mujeebur rahmansaher introduction-to-scrum_v2Mujeebur rahmansaher introduction-to-scrum_v2
Mujeebur rahmansaher introduction-to-scrum_v2Mujeebur Rahmansaher
 
Building on the Shoulders of Giants: the Story of Bitbucket Pipelines
Building on the Shoulders of Giants: the Story of Bitbucket PipelinesBuilding on the Shoulders of Giants: the Story of Bitbucket Pipelines
Building on the Shoulders of Giants: the Story of Bitbucket PipelinesAtlassian
 
Scrum and-xp-from-the-trenches 04 sprint demo & retrospective
Scrum and-xp-from-the-trenches 04 sprint demo & retrospectiveScrum and-xp-from-the-trenches 04 sprint demo & retrospective
Scrum and-xp-from-the-trenches 04 sprint demo & retrospectiveHossam Hassan
 
Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015
Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015
Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015Peter Beck
 
Top 5 DB2 Support Nightmares 2018 #1
Top 5 DB2 Support Nightmares 2018  #1Top 5 DB2 Support Nightmares 2018  #1
Top 5 DB2 Support Nightmares 2018 #1Carol Davis-Mann
 
Top 5 DB2 Support Nightmares 2018 #2
Top 5 DB2 Support Nightmares 2018 #2Top 5 DB2 Support Nightmares 2018 #2
Top 5 DB2 Support Nightmares 2018 #2Carol Davis-Mann
 
Scrum and-xp-from-the-trenches 02 sprint planning
Scrum and-xp-from-the-trenches 02 sprint planningScrum and-xp-from-the-trenches 02 sprint planning
Scrum and-xp-from-the-trenches 02 sprint planningHossam Hassan
 
Adopting agile via continuous improvement with workshop
Adopting agile via continuous improvement with workshopAdopting agile via continuous improvement with workshop
Adopting agile via continuous improvement with workshopPriyank Shah
 
Agile Anti-patterns
Agile Anti-patternsAgile Anti-patterns
Agile Anti-patternsAndrew Cox
 
Game Producer - How hard can that be?
Game Producer - How hard can that be?Game Producer - How hard can that be?
Game Producer - How hard can that be?Ed Magnin
 
JIRA 101 - Over(our)head No Longer!
JIRA 101 - Over(our)head No Longer!JIRA 101 - Over(our)head No Longer!
JIRA 101 - Over(our)head No Longer!Frank Caron
 
Start to finish - Building Games Step-by-Step
Start to finish - Building Games Step-by-StepStart to finish - Building Games Step-by-Step
Start to finish - Building Games Step-by-StepEd Magnin
 
Scrum Walkthrough Internship Course
Scrum Walkthrough Internship CourseScrum Walkthrough Internship Course
Scrum Walkthrough Internship CourseZoltan Iszlai
 
User-Centered Design with Pragmatic Personas
User-Centered Design with Pragmatic PersonasUser-Centered Design with Pragmatic Personas
User-Centered Design with Pragmatic PersonasPavel Dabrytski
 
Welcome to Agile - Taipei Regent 2016/05/20
Welcome to Agile - Taipei Regent 2016/05/20Welcome to Agile - Taipei Regent 2016/05/20
Welcome to Agile - Taipei Regent 2016/05/20Adam Laskowski
 
Balance Demand Against Throughput: Kanban Recipe for Success Step 4
Balance Demand Against Throughput: Kanban Recipe for Success Step 4Balance Demand Against Throughput: Kanban Recipe for Success Step 4
Balance Demand Against Throughput: Kanban Recipe for Success Step 4Jason Yip
 

Mais procurados (20)

FAST Agile
FAST AgileFAST Agile
FAST Agile
 
Mujeebur rahmansaher introduction-to-scrum_v2
Mujeebur rahmansaher introduction-to-scrum_v2Mujeebur rahmansaher introduction-to-scrum_v2
Mujeebur rahmansaher introduction-to-scrum_v2
 
Building on the Shoulders of Giants: the Story of Bitbucket Pipelines
Building on the Shoulders of Giants: the Story of Bitbucket PipelinesBuilding on the Shoulders of Giants: the Story of Bitbucket Pipelines
Building on the Shoulders of Giants: the Story of Bitbucket Pipelines
 
Scrum and-xp-from-the-trenches 04 sprint demo & retrospective
Scrum and-xp-from-the-trenches 04 sprint demo & retrospectiveScrum and-xp-from-the-trenches 04 sprint demo & retrospective
Scrum and-xp-from-the-trenches 04 sprint demo & retrospective
 
Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015
Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015
Workshop 'Facilitation Dojo' at ScrumGathering Praque_2015
 
Top 5 DB2 Support Nightmares 2018 #1
Top 5 DB2 Support Nightmares 2018  #1Top 5 DB2 Support Nightmares 2018  #1
Top 5 DB2 Support Nightmares 2018 #1
 
Top 5 DB2 Support Nightmares 2018 #2
Top 5 DB2 Support Nightmares 2018 #2Top 5 DB2 Support Nightmares 2018 #2
Top 5 DB2 Support Nightmares 2018 #2
 
Scrum and-xp-from-the-trenches 02 sprint planning
Scrum and-xp-from-the-trenches 02 sprint planningScrum and-xp-from-the-trenches 02 sprint planning
Scrum and-xp-from-the-trenches 02 sprint planning
 
Coaching Anti-Pattens and common smells
 Coaching Anti-Pattens and common smells Coaching Anti-Pattens and common smells
Coaching Anti-Pattens and common smells
 
Adopting agile via continuous improvement with workshop
Adopting agile via continuous improvement with workshopAdopting agile via continuous improvement with workshop
Adopting agile via continuous improvement with workshop
 
Agile Anti-patterns
Agile Anti-patternsAgile Anti-patterns
Agile Anti-patterns
 
Game Producer - How hard can that be?
Game Producer - How hard can that be?Game Producer - How hard can that be?
Game Producer - How hard can that be?
 
JIRA 101 - Over(our)head No Longer!
JIRA 101 - Over(our)head No Longer!JIRA 101 - Over(our)head No Longer!
JIRA 101 - Over(our)head No Longer!
 
Start to finish - Building Games Step-by-Step
Start to finish - Building Games Step-by-StepStart to finish - Building Games Step-by-Step
Start to finish - Building Games Step-by-Step
 
Scrum Walkthrough Internship Course
Scrum Walkthrough Internship CourseScrum Walkthrough Internship Course
Scrum Walkthrough Internship Course
 
User-Centered Design with Pragmatic Personas
User-Centered Design with Pragmatic PersonasUser-Centered Design with Pragmatic Personas
User-Centered Design with Pragmatic Personas
 
Scrum
ScrumScrum
Scrum
 
Welcome to Agile - Taipei Regent 2016/05/20
Welcome to Agile - Taipei Regent 2016/05/20Welcome to Agile - Taipei Regent 2016/05/20
Welcome to Agile - Taipei Regent 2016/05/20
 
Agile Retrospective & review
Agile Retrospective & review Agile Retrospective & review
Agile Retrospective & review
 
Balance Demand Against Throughput: Kanban Recipe for Success Step 4
Balance Demand Against Throughput: Kanban Recipe for Success Step 4Balance Demand Against Throughput: Kanban Recipe for Success Step 4
Balance Demand Against Throughput: Kanban Recipe for Success Step 4
 

Destaque

Nexus G
Nexus GNexus G
Nexus Gnagms1
 
Edmmedia op-tcd-2010-the-conversion-machine2670
Edmmedia op-tcd-2010-the-conversion-machine2670Edmmedia op-tcd-2010-the-conversion-machine2670
Edmmedia op-tcd-2010-the-conversion-machine2670EDM
 
E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...
E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...
E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...guestc2076f9
 
Web2.0 Project: Convert Software Introduction
Web2.0 Project: Convert Software IntroductionWeb2.0 Project: Convert Software Introduction
Web2.0 Project: Convert Software Introductionguest13a760
 
'Bright Lights, Big City' Contemporary Roof Garden by Earth Designs
'Bright Lights, Big City' Contemporary Roof Garden by Earth Designs'Bright Lights, Big City' Contemporary Roof Garden by Earth Designs
'Bright Lights, Big City' Contemporary Roof Garden by Earth Designsguestf545148
 
Coursework Feedback
Coursework FeedbackCoursework Feedback
Coursework Feedbackguestc93e61
 
Smartcase & Tecx Specx
Smartcase & Tecx SpecxSmartcase & Tecx Specx
Smartcase & Tecx SpecxGene Lewis
 
97 2003 Presentation
97 2003 Presentation97 2003 Presentation
97 2003 Presentationguestd44cfa
 
Frank de Beun | Automotive seminar | Brandswitch-matrix
Frank de Beun | Automotive seminar | Brandswitch-matrix Frank de Beun | Automotive seminar | Brandswitch-matrix
Frank de Beun | Automotive seminar | Brandswitch-matrix EDM
 
Nu Rn International Application Ces Vermont
Nu Rn International Application Ces VermontNu Rn International Application Ces Vermont
Nu Rn International Application Ces Vermontjeffy1988
 
The American Dream Slide Share Version
The American Dream Slide Share VersionThe American Dream Slide Share Version
The American Dream Slide Share Versionguest7bb41c
 

Destaque (17)

Nexus G
Nexus GNexus G
Nexus G
 
Edmmedia op-tcd-2010-the-conversion-machine2670
Edmmedia op-tcd-2010-the-conversion-machine2670Edmmedia op-tcd-2010-the-conversion-machine2670
Edmmedia op-tcd-2010-the-conversion-machine2670
 
E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...
E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...
E:\Hasbros 2010 Star Wars Brand\Hasbro Star Wars Presentation\Star Wars 2010 ...
 
Me
MeMe
Me
 
Web2.0 Project: Convert Software Introduction
Web2.0 Project: Convert Software IntroductionWeb2.0 Project: Convert Software Introduction
Web2.0 Project: Convert Software Introduction
 
TSC Art Program
TSC Art ProgramTSC Art Program
TSC Art Program
 
'Bright Lights, Big City' Contemporary Roof Garden by Earth Designs
'Bright Lights, Big City' Contemporary Roof Garden by Earth Designs'Bright Lights, Big City' Contemporary Roof Garden by Earth Designs
'Bright Lights, Big City' Contemporary Roof Garden by Earth Designs
 
BNOW 112 MISTIA
BNOW 112 MISTIABNOW 112 MISTIA
BNOW 112 MISTIA
 
Coursework Feedback
Coursework FeedbackCoursework Feedback
Coursework Feedback
 
Smartcase & Tecx Specx
Smartcase & Tecx SpecxSmartcase & Tecx Specx
Smartcase & Tecx Specx
 
97 2003 Presentation
97 2003 Presentation97 2003 Presentation
97 2003 Presentation
 
Frank de Beun | Automotive seminar | Brandswitch-matrix
Frank de Beun | Automotive seminar | Brandswitch-matrix Frank de Beun | Automotive seminar | Brandswitch-matrix
Frank de Beun | Automotive seminar | Brandswitch-matrix
 
Nu Rn International Application Ces Vermont
Nu Rn International Application Ces VermontNu Rn International Application Ces Vermont
Nu Rn International Application Ces Vermont
 
Informe de gestión citur Mayo 2016
Informe de gestión citur Mayo   2016Informe de gestión citur Mayo   2016
Informe de gestión citur Mayo 2016
 
Liderazgo y motivación en turismo
Liderazgo y motivación en turismoLiderazgo y motivación en turismo
Liderazgo y motivación en turismo
 
Competencia De Gerentes Inteligentes
Competencia De Gerentes InteligentesCompetencia De Gerentes Inteligentes
Competencia De Gerentes Inteligentes
 
The American Dream Slide Share Version
The American Dream Slide Share VersionThe American Dream Slide Share Version
The American Dream Slide Share Version
 

Semelhante a Let's get along

Top 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerTop 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerKevin Kline
 
The 5 Minute MySQL DBA
The 5 Minute MySQL DBAThe 5 Minute MySQL DBA
The 5 Minute MySQL DBAIrawan Soetomo
 
Challenges and best practices of database continuous delivery
Challenges and best practices of database continuous deliveryChallenges and best practices of database continuous delivery
Challenges and best practices of database continuous deliveryDBmaestro - Database DevOps
 
11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL DevelopersIke Ellis
 
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...Citrix
 
Development Environment Tips
Development Environment TipsDevelopment Environment Tips
Development Environment TipsAdam Culp
 
How to make change happen in your organisation by talking your devs language
How to make change happen in your organisation by talking your devs languageHow to make change happen in your organisation by talking your devs language
How to make change happen in your organisation by talking your devs languageBuiltvisible
 
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarGeek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarIDERA Software
 
Challenges and Best Practices of Database Continuous Delivery
Challenges and Best Practices of Database Continuous DeliveryChallenges and Best Practices of Database Continuous Delivery
Challenges and Best Practices of Database Continuous DeliveryDBmaestro - Database DevOps
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven developmentEinar Ingebrigtsen
 
Extreme Salesforce Data Volumes Webinar (with Speaker Notes)
Extreme Salesforce Data Volumes Webinar (with Speaker Notes)Extreme Salesforce Data Volumes Webinar (with Speaker Notes)
Extreme Salesforce Data Volumes Webinar (with Speaker Notes)Salesforce Developers
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16Christian Berg
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionJeff Smith
 
SQL Server High Availability and DR - Too Many Choices!
SQL Server High Availability and DR - Too Many Choices!SQL Server High Availability and DR - Too Many Choices!
SQL Server High Availability and DR - Too Many Choices!Mike Walsh
 
Redgate How to be Friends with Developers
Redgate How to be Friends with DevelopersRedgate How to be Friends with Developers
Redgate How to be Friends with DevelopersKellyn Pot'Vin-Gorman
 
Data Governance in an Agile SCRUM Lean MVP World
Data Governance in an Agile SCRUM Lean MVP WorldData Governance in an Agile SCRUM Lean MVP World
Data Governance in an Agile SCRUM Lean MVP WorldDATAVERSITY
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleSteve Karam
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dbaOsama Mustafa
 
The Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesThe Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesEric Kavanagh
 

Semelhante a Let's get along (20)

Top 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerTop 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL Server
 
The 5 Minute MySQL DBA
The 5 Minute MySQL DBAThe 5 Minute MySQL DBA
The 5 Minute MySQL DBA
 
Challenges and best practices of database continuous delivery
Challenges and best practices of database continuous deliveryChallenges and best practices of database continuous delivery
Challenges and best practices of database continuous delivery
 
11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers
 
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
 
Development Environment Tips
Development Environment TipsDevelopment Environment Tips
Development Environment Tips
 
How to make change happen in your organisation by talking your devs language
How to make change happen in your organisation by talking your devs languageHow to make change happen in your organisation by talking your devs language
How to make change happen in your organisation by talking your devs language
 
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarGeek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
 
Challenges and Best Practices of Database Continuous Delivery
Challenges and Best Practices of Database Continuous DeliveryChallenges and Best Practices of Database Continuous Delivery
Challenges and Best Practices of Database Continuous Delivery
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
Extreme Salesforce Data Volumes Webinar (with Speaker Notes)
Extreme Salesforce Data Volumes Webinar (with Speaker Notes)Extreme Salesforce Data Volumes Webinar (with Speaker Notes)
Extreme Salesforce Data Volumes Webinar (with Speaker Notes)
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data Edition
 
SQL Server High Availability and DR - Too Many Choices!
SQL Server High Availability and DR - Too Many Choices!SQL Server High Availability and DR - Too Many Choices!
SQL Server High Availability and DR - Too Many Choices!
 
Redgate How to be Friends with Developers
Redgate How to be Friends with DevelopersRedgate How to be Friends with Developers
Redgate How to be Friends with Developers
 
Data Governance in an Agile SCRUM Lean MVP World
Data Governance in an Agile SCRUM Lean MVP WorldData Governance in an Agile SCRUM Lean MVP World
Data Governance in an Agile SCRUM Lean MVP World
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
 
12363 database certification
12363 database certification12363 database certification
12363 database certification
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dba
 
The Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesThe Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning Queries
 

Let's get along

  • 1. …and be a happy team DBA & dev’s, let’s get along
  • 2. • Constant struggle • Immediacy vs Security • Urgency vs Availability For whatever reason one constant has always been the conflict between DBA's and developers. It may not be as open a conflict in every place, but there is always an undeniable tension between the two groups. Following some simple guidelines can bring everyone together for a more pleasant work experience. Lets check on how you can keep your DBA's happy, work all together as a team and therefore, keep the business running smoothly. Why are we talking about this? This doesn’t help me learn SQL Server; does it?
  • 3. DBA BEFOREOMG!!! OH! NO again and NO once again!
  • 5. • Security • Availability • Integrity • Recoverability • Performance • Development support What is a DBA? A person who is responsible for the environmental aspects of a database
  • 6. • we’re on the same team • It’s all about the data • he can help tuning your tsql code • he can turn down code changes/releases if it affects production (Security! Availability!) Why does the DBA matter? Do you even have to ask?
  • 7. • It can do anything • It can house any data • ….BUT… Interaction When do (should) developers and DBAs come together? MS SQL Server is a multi-purpose, multi-database RDMS That doesn't mean that the defaults for EVERYTHING are good for EVERYONE and EVERY database
  • 8. • Planning • Design • Development • Deployment • Support Interaction When do (should) developers and DBAs come together?
  • 9. • To prepare for increased capacity • To conduct proper time management • To assess hardware and licensing needs • To address budgetary issues Planning They need to know! The earlier you can let the DBAs know that you are planning, something the better. Those responsible for the vital subject matter of any project should never be an after-thought during planning.
  • 10. • Optimal database construction • Keys and indexes • Performance pitfalls • Things you can’t possibly know – systems interactions – maintenance schedules – process priority Design They can help!
  • 11. • DBA’s can really help – They know performance implications of using different methods – They can suggest new features that you may not know of • Writing TSQL *is* development – Treat it as you would any other code – Tune for performance now, not after deployment (when it’s causing problems). Development Probably what most of you are waiting for
  • 12. • Formatting (or rather not formatting) – This alone can move you up on the DBA happy list • Use of poor aliases – Initials, generic letters, etc. • Use of meaningless variable names – For your own benefit, and the DBAs Bad Habits There had to be something technical in this talk, right?
  • 13. Bad Habits There had to be something technical in this talk, right? • Being case insensitive – No reason not to develop on a CS database • SELECT * – Readability – You don’t always need *everything* – Causes lookups! • Using a query designer – Keep scripting skills sharp – Generates unformatted, messy, chatty code • Lots of cursors and/or RBAR
  • 14. • Availability – If you really want things to go as smoothly as possible, be there to help things along, and communicate – If you want the best, fastest resolution, be available to help • Script construction – DBAs like to know what is going onto the servers. Provide well documented, well formatted, readable scripts Deployment Most development shops fall short here
  • 15. • Back-out/Rollback scripts – Along with the deployment script, provide another script that will undo every single change that the deployment script did (ROLLBACK script) Hint: Providing your DBA with a rollback of a deployment gone bad will imprint a fond memory of you in their mind. Deployment Most development shops fall short here
  • 16. • Trustworthiness – Trying to hi-jack sysadmin rights is bad – Sliding undocumented changes into deployment scripts, also bad Support An ongoing commitment
  • 17. Support An Ongoing Commitment • Do not deflect into databases – Auto-blaming the database server for poor performance doesn’t help anyone (and usually are not the guilty ones ;) • Reasonable expectations – You can’t restore my 500GB database in 5 minutes? Why?! – You can’t add change the clustered index to my 40 million row table at 10AM on Monday? What??!!
  • 18. Support An Ongoing Commitment • BEGIN TRAN..COMMIT/ROLLBACK TRAN – When troubleshooting code wrap UPDATES / DELETE statements in a transaction, and always rollback. • Take care when troubleshooting – Poorly written test queries run in SSMS can add to the problem
  • 19. Support An Ongoing Commitment tSQL tuning/optimization is a wide subject. • lot of information/recommendations but take those recommendations with a grain of salt • Each environment/workload is different • before jumping to code and applying that brand new amazing optimization technique be sure you have tested and really tested it on a pre- production or staging environment
  • 20. Support An ongoing commitment • Query execution plans – Learn how to translate (at least) the more important operations to look for a query execution plans. Not in every case, but in general, some words that should get your attention are “scan”, “sort”, “lookup”. – Check this article by Grant Fritchey on Execution Plan Basics http://www.simple-talk.com/sql/performance/execution-plan-basics/ – Recommend using the 100% free tool from SQL Sentry called Plan Explorer. It’s going to save you a lot of time over the plan features in SSMS, especially once you are tuning a lot of larger queries. http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp
  • 21. Support An ongoing commitment Execution plans screen captures (comparison)
  • 22. Quiz time! 1. When I’ve a hard problem: One point for each 2. When someone has a complaint… 1. 0 pts 2. 0 pts 3. 0 pts 4. 5 pts 3. Being woken at 4am 1. 0 pts 2. 5 pts 3. 5 pts 4. A DBA job might kill you, zero points 4. After you fix something… 1. 0 pts 2. 5 pts 3. 5 pts 4. DBA are too sarcastic to celebrate, 0 pts 5. You must write a troubleshooting guide 1. 5 pts 2. 0 pts 6. Have you ever done any of these? • One point for each 7. There’s a new dev project 1. 0 pts 2. 5 pts 3. 5 pts 8. A server is repeatedly crashing 1. 0 pts 2. 0 pts 3. 5 pts 4. 0 pts
  • 23. Quiz time! Scoring your quiz: 0 – 25: sql might not be the right path for you 26 – 39: pretty darn good fit for a heavily oriented sql related job 40: what are you doing here? You’re a DBA ;)
  • 24. References: • Jason Hall: jhall@sqlsentry.net • jasonhall.blogs.sqlsentry.net • http://goo.gl/u6YO9f • Kendra Little: Should you be a SQL Server DBA? http://goo.gl/ggIXVg • Brent Ozar: Watch Brent Tune Servers http://goo.gl/bR06vL • Aaron Bertrand’s series: Bad habits to kick