A guide for SQL Server Developers Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net.

Slides:



Advertisements
Similar presentations
JOB INTERVIEW FLASH CARDS Work-Based Learning Virtual Campus.
Advertisements

“What do you want me to do now?”
5 Common SQL Server Performance Issues Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net.
Common Mistakes Developers Make By Bryan Oliver SQL Server Mentor at SolidQ.
Examples of life goals: 1.Live on my own or with a family of my own. If I have this, I can use my non-working time how I see fit. FREE TIME! 2.Keep a job.
INTEGRATION SERVICES IN THE REAL WORLD Brian Garraty, Database Administrator Virginia Beach City Public Schools.
Tips for Being Successful in School and in Life. Attitudes and Goals.
PHP (2) – Functions, Arrays, Databases, and sessions.
How to present your project?. A simple 3-part template A.Introduction B.Body C.Conclusion.
Tempdb Parasites Jason Hall-Dir. of Client SQL Sentry Blog-jasonhall.blogs.sqlsentry.net.
Connect with life Vinod Kumar M Technology Evangelist | Microsoft
Preparing a Presentation
Day 1 “This is the genre that I am most excited about because I feel so comfortable since pop music is the genre that I grow to love due to the long.
Chapter 9: Creating Database Conventions & Standards MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
Get Job Orders Now! Marketing Scripts and Strategies that Work.
Building friendships without tearing them down
Based on the work of Stephen Covey
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Customer Surveys Robert & Diana Olivan Regional Directors.
Online Database Support Experiences Diana Bonham, Dennis Box, Anil Kumar, Julie Trumbo, Nelly Stanfield.
Hurdles The sprint with impediments on the way to automation Agile India 2014 報告者:李佩臻.
Chapter 9 Database Management Discovering Computers Fundamental.
J.D.-Client Services o Strong Client Focus: troubleshooting and follow-up skills; commitment to continuous improvement. o Previous Analyst experience a.
Grad students vs. Mentors developed by R. Craft, based on student & faculty input Psychology Department Washington State University + material adapted.
Transactions Sylvia Huang CS 157B. Transaction A transaction is a unit of program execution that accesses and possibly updates various data items. A transaction.
Using Visual Aids in a Speech. Visual Aids can be powerful when giving a speech. However, make sure they will improve your speech. Ask yourself the following.
+ The 7 Habits By Eden. + What do you mean the 7 Habits? The 7 habits are kind of like rules. They help with your daily actions, and decisions. We have.
Chapter 2: SQL – The Basics Objectives: 1.The SQL execution environment 2.SELECT statement 3.SQL Developer & SQL*Plus.
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
Rui Ribeiro MCITP 2010/10/19 Index optimization … …on low peak periods V ENCONTRO DA COMUNIDADE SQLPORT.
1 CS 430 Database Theory Winter 2005 Lecture 16: Inside a DBMS.
The Enterprise Project Management (EPM) Professional March 28th, 2007 Brendan Giles, BSc., PMP, MOS, MCP (EPM) The Key to Successful Adoption of Enterprise.
Views Lesson 7.
Microsoft ® Windows ® Small Business Server 2003 R2 Sales Cycle.
Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server,
The Relational Model1 Transaction Processing Units of Work.
Connect with life Nauzad Kapadia Quartz Systems
Every Monday Matters Love Yourself. Happy Month of Love! Let’s start the month off right! Love to me means inspiration. What does it mean to you? What.
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
COLD READING UNIT. WHAT DO YOU THINK ABOUT WHEN YOU HEAR “COLD READING?”
Yeah but.. What do I do? Software Leadership Dan Fleck 2007.
RESPONDING TO RULES HOW TO: MAKE COMPLAINTS TAKE “NO” FOR AN ANSWER DISAGREE APPROPRIATELY CHANGE RULES.
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
E-Mission + Team of undergraduates = ??? Background and motivation.
An Interview Dialogue Name: Period:. Step Five Interview- An Interview Dialogue You are going to read the question and pick the best response. The person.
ITM 353 Final Project Demos. Your Last Assignment There’s one more fun presentation in store for you all: the Transition Readiness Review (TRR) aka your.
Dealing with Conflict Relationships. What is Conflict? Conflict is a disagreement or struggle between two or more people. It happens in ALL relationships,
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Eugene Meidinger Execution Plans
Common SQL Performance Issues AND HOW TO AVOID OR FIX THEM.
Dave LinkedIn
How to kill SQL Server Performance Håkan Winther.
Scott Fallen Sales Engineer, SQL Sentry Blog: scottfallen.blogspot.com.
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 19/09/2015David Postlethwaite.
You Inherited a Database Now What? What you should immediately check and start monitoring for. Tim Radney, Senior DBA for a top 40 US Bank President of.
New Instance… Now What? Presented by: James Donahoe Senior Solutions Engineer – TeleTracking Technologies MCSA: SQL Server 2012.
Welcome to Introduction to Psychology! Let’s share a bit about where we are all from…
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
A Simple Introduction to Git: a distributed version-control system
SQL Server May Let You Do It, But it Doesn’t Mean You Should
teachHOUSTON Student Society
Principles of report writing
Azure SQL Database: A Guided Tour
Turbo-Charged Transaction Logs
Reading Execution Plans Successfully
Reading execution plans successfully
WHAT ARE THE ADVANTAGES AND CHALLENGES OF MICROSOFT SQL SERVER.
SSMS to Azure Data Studio
Vendor Software Lessons From Consulting Vendor Software.
Presentation transcript:

A guide for SQL Server Developers Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net Recipe for a Happy DBA

Constant Struggle In my career, I have been on both sides of the database. Both behind it, and in front of it. One constant has always been the conflict between DBAs and developers. It may not be as open a conflict in every place, but there is always an undeniable tension between the two groups. I believe that following some simple guidelines can bring everyone together for a more pleasant work experience. Why are We Talking About This? This doesn’t help me learn SQL Server; does it?

DBA BEFORE OMG!!! OH NOZ!!!11

DBA AFTER Hakuna Matata!

Recoverability Integrity Security Availability 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 One day you will need a favor… Without this person, your code is not getting deployed Why does the DBA Matter? Do you even have to ask?

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 Example: The “all keys” table Things you can’t possibly know Other systems Maintenance schedules Process priority Design They Can Help!

The DBA Can 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

Avoid Bad SQL Habits See Aaron Bertrand’s Series: ( ) Read SQL Server Related Blogs Doug BurnsDoug Burns: What use is a Development DBA?What use is a Development DBA? Development Don’t Forget Your Part!

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?

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 Bad Habits There Had to be Something Technical in this Talk, Right?

Bad Habits There Had to be Something Technical in this Talk, Right? Examples & Comparisons

Availability If you really want things to go as smoothly as possible, be there to help things along, and communicate 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 Scripts Along with the deployment script, provide another script that will undo every single change that the deployment script did. Providing your DBA with a way out of a deployment gone bad will imprint a fond memory of you in their mind. Deployment Most Development Shops Fall Short Here

Availability Again, if you want the best, fastest resolution, be available to help Trustworthiness Trying to hi-jack sysadmin rights is bad (mmmkay…) Sliding undocumented changes into deployment scripts, also bad Support An Ongoing Commitment

Do Not Deflect Onto Your DBA Auto-blaming the database server for poor performance doesn’t help anyone 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??!!11 Support An Ongoing Commitment

BEGIN TRAN/ROLLBACK TRAN When running troubleshooting code in SSMS or another tool, wrap any update or delete statements in a transaction, and always rollback. You can now test all you like, and change it to commit when you are sure Take Care When Troubleshooting Poorly written test queries run in SSMS can add to the problem 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”. I recommend a great article by Grant Fritchey on Execution Plan Basics I also 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. Support An Ongoing Commitment

Plan Explorer A Shameless Plug

Alternative Method Everyone Loves Cookies!

A guide for SQL Server Developers Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net Recipe for a Happy DBA