A SQL Server Developer’s Toolkit
• Kirsten Benzel, Database Engineer at SurveyMonkey
• Twitter: CausalDensity
• Email: [email protected]
• Blog: http://kSQL.net
• SQL Server Magazine: http://sqlmag.com/author/kirsten-benzel
What is Causal Density?From a book review titled Controlling The Uncontrollable on Jim Manzi’s Uncontrolled, Kevin Drum writes: !“If you're studying the orbit of a planet, you can pretty much assume there's only one important cause of the planet's movement: gravity. Causal density is low … in human affairs, there are lots of causes of everything, there are causes of the causes, and the causes often interact in complex ways. Causal density is very high, which means it's very hard to make sure you've accounted for everything.” !(Emphasis mine, motherjones.com/kevin-drum/2012/05/controlling-uncontrollable)
Your computer just puked on it’s shoes. HAPPY MONDAY
1. List of all your installed programs and license keys. Include versions and installation steps for difficult installs.
2. Keep your web browser Bookmarks backed up. 3. Keep a list of your mapped drives - the full extension, not
the truncated version you see in My Computer (Windows Users).
4. Keep important folders backed up: SSMS Templates, my Desktop folders, my Powershell script folder, and the databases for KeePass and Stickies.
5. Write down the location of your SSMS Templates. 6. Write a .bat file that dumps all the above from your
workstation to a external drive.
Have a Recovery Plan
SQL Server Management Studio and Local SQL Instance Visual Studio (may need different versions for SSIS packages) Anything other than Notepad: TextPad, WordPad, Notepad++ Adept SQL Diff adeptsql.com/download.htm 7-Zip 7-zip.org/download.html Stickies zhornsoftware.co.uk/stickies/download.html Softerra LDAP Browser ldapadministrator.com/download.htm KeePass keepass.info/download.html
Essential Programs
SSMS Mastery
ALT + F1
Filter Object Explorer
Change Tab Contents
Alter SSMS StartUp Behavior
Comma-Separated Column List
Scripts: Eyes Everywhere
Logins: Find Admins
Logins: Get Detailed
Oh, Crap! (1)
Oh, Crap! (2)
Oh, Crap! (3)
SQL Job Info
Space Used Interrogation (1)
Space Used Interrogation (2)
Space Used Interrogation (3)
Space Used Interrogation (4)(Space Used by File)
Index Interrogation (1)
Index Interrogation (2)
Index Interrogation (2a)--[Reads] = SUM(DUS.user_seeks + DUS.user_scans + DUS.user_lookups), [Seeks] = DUS.user_seeks, [Scans] = DUS.user_scans, [Lookups] = DUS.user_lookups, [Writes] = DUS.user_updates, ![Reads Per Write] = CONVERT(DECIMAL(10,2), MAX(CASE WHEN DUS.user_updates < 1 THEN 100.00 ELSE 1.00 * (DUS.user_seeks + DUS.user_scans + DUS.user_lookups) / DUS.user_updates END)), --[Last Read] = CONVERT(CHAR(10), (SELECT MAX(v) FROM (VALUES (DUS.last_user_seek), (DUS.last_user_scan), (DUS.last_user_lookup)) AS value(v)), 101), [Last Seek] = DUS.last_user_seek, [Last Scan] = DUS.last_user_scan, [Last Lookup] = DUS.last_user_lookup
Reads Per Write can help identify indexes that have not been used since the last restart or aren't helping to improve performance. For every 1 write to the index, you want to see as many reads as possible. !Indexes with a reads_per_write score of 1 means that for every 1 write, the index is also used 1 time to help with performance. Ideally, you want to see scores much higher than that. !Consider dropping indexes with a reads_per_write score under 0 and strongly consider dropping ones with scores under .1. !This isn't a hard-and-fast rule: you may have an index that's used once per month for a single report, but that report is run by the CEO and he wants it instantaneously. Before dropping indexes, know what they're used for or make sure alternate indexes exist.
Index Interrogation (3)
Database Development
Gracefully deal with change (and different personalities)
Gracefully deal with change (and different personalities)
Be an advocate for using the best tool for the job.
Legacy code and less-than-optimal current code.
Don’t disparage. Teach.
Write elegant, good code.
Legacy code and less-than-optimal current code.
Don’t disparage. Teach.
Compartmentalize. Have home and work balance.
Deal with Make the most of criticism.
Compartmentalize. Have home and work balance.
http://teespring.com/kcdbadmin?v=1
Advancing Your Career
credit buzzfeed
Twitter got me my job at SurveyMonkey.
#sqlhelp
RT = Re-TweetMRT = Modified Re-Tweet
TL;DR = Too Long, Didn’t Read# = This is a Hashtag
Training & Keeping CurrentFollow SQL professionals on Twitter. They will post their blogs AND re-tweet other articles and news!!Sign up for free newsletters.!Brent Ozar Unlimited® Weekly Links - BrentOzar.com !!!SQLSkills Insiders Weekly Newsletter - SQLSkills.com/Insider
Training & Keeping CurrentOnline Training
• PluralSight.com • Free WebCasts (I hear about them on Twitter)
!
Conferences and In-Person • SQLSkills (Paul Randal and Kimberly Tripp)
• sqlskills.com/sql-server-training/ • IEPTO1: Immersion Event on Performance Tuning and Optimization – Part 1 (formerly IE1)
PASS Summit!#sqlpass #summit14
#sqlkilt #sqlrun #sqllongrun
sqlpass.org/summit/2014/Home.aspx
#ArgenisWithoutBorders bit.ly/1pJhn11
• Demo Scripts: github.com/kbenzel/sql-scripts/• Kirsten Benzel, Database Engineer at SurveyMonkey• Twitter: CausalDensity• Email: [email protected]• Blog: http://kSQL.net• SQL Server Magazine: http://sqlmag.com/author/
kirsten-benzel
A SQL Server Developer’s Toolkit
Questions?