Download presentation
Presentation is loading. Please wait.
Published byEdgar Kelley Modified over 6 years ago
1
New Instance… Now What? Presented by: James Donahoe
Cloud Database Administrator– TeleTracking Technologies MCSA: SQL Server 2012
2
About Me! PASS Virtual Chapter Leader – “In-Memory”
SQL Environments of SQL 2000 to current Former United States Marine(‘99-05) Hobbies include: Retro Video Game Collecting (Over 900 games!) Video Games(Wii U, PS4, PS3, Xbox 360, and all Retro Platforms) Eagle Scout An owner of Retro Perler Art
3
62 1st 80% 350K+ 870+ 24 YEARS of the 100 GREAT HOSPITAL
About TeleTracking 1st 350K+ Acute Care Beds 24 YEARS As Industry Leader in Patient Flow By KLAS as Industry Leader in Patient Flow Retention Rate 95% 62 of the 100 GREAT HOSPITAL 80% 870+ Clients Of The Best Hospitals
4
Local TeleTracking Clients
Phoenix Children’s Hospital St. Joseph’s Hospital & Medical Center Mayo Clinic Arizona Maricopa Medical Center TOTAL BEDS: 3800
5
Agenda Configuration The Maintenance Hexagon What do I backup?
DR Testing Best Practice Security Recommendations Resources
6
Configuration
7
Are your MDF, and LDF files on the same drive?
Are your backups residing on the same drive as your data files? What is MAXDOP set to? What is your cost threshold for parallelism? How many TempDB files do you have? What is your instance memory capped at? Several things should be configured after you install: MDF and LDF locations, MAXDOP, Cost Threshold for parallelism, TempDB allocation, autogrowth, etc. MDF and LDF on the same drive? Why? IO contention can be avoided by separating these. Backups on that same drive? WHY?!?! A failure of that drive just puts you out of business, or as Brent Ozar likes to say, a resume submitting opportunity. MAXDOP, how many processors do you have? How many cores? I generally go with half the cores, so if I have 16 cores, I generally set MAXDOP to 8. Cost Theshold, this is important….do you want EVERYTHING going parallel? TEMPDB, best practice is to have 1 file per processor, up to 8(Check this). This can help avoid SGAM blocking in Tempdb(Give a story here). How much memory do you have installed on that box? Physical, Virtual? What did you set your MAX memory setting to in SQL? Leave 2-3 GB for your OS. Do you have NUMA nodes? I hate NUMA..(short story)
8
Basic Maintenance Ask what are some forms of basic maintenance that everyone uses? Anybody using OLA, Minion?
9
The Maintenance Hexagon
Database Backups Reduce Disk I/O Reduce Impact of Database Backup Logging Recovery Clear Backup History Index Rebuild/Reorg Backup Performance Query Performance Faster Root Cause Analysis Query Performance Statistics Update Go through each step on the hexagon and make examples of it. Make remarks such as: How many of you have seen an error log that takes too long to open up? Make a funny animation when trying to view it. Faster Root Cause Analysis More Appropriate Execution Plans Cycle Instance Error Log Manageable Error Logs Cycle Agent Error Log
10
Maintenance Examples BACKUPS Full Database Backup
Creates a full backup of all user databases. Scheduled for every Sunday at 2:00AM Backups retained for 14 days located in the default backup directory Transaction Log Backup Creates a transaction log backup of all user databases in Full Recovery Scheduled for every Monday through Saturday at 2:00AM Backups are retained for 14 days Go through
11
Maintenance Continued
MISC Maintenance CycleErrorLog Cycles the error log on SQL Server Is scheduled for every Sunday, Wednesday at 5:00 am. Integrity Checks database integrity including indexes Is scheduled for every Sunday at 3:00AM Optimization Rebuild all indexes Changes free space to default setting Updates all statistics Is scheduled for every Sunday at 4:00AM
12
What to backup/what to do with backups?
13
What do I backup? ALL databases – User and System! All User Databases
System Databases Transaction Logs Watch SIZE, Backups will help keep in check Select * from sys.configurations Create a job to run that query Save this into a table Back it up! Comes in handy if you ever have to reinstall! Make point to mention that many systems you have evaluated are not backing up their system databases, only user. Anybody ever have a Master database get corrupted? Talk about how many folks only focus on databases, and transaction logs, but never look for sys.configurations, and other technical pieces. Make sure you touch on testing your backups, explaining that if you havent ever had a data corruption, its only a matter of time. But what will the use of backups be if they do not work? Wouldn’t you rather know before the system fails?
14
TEST Your Backups! Backing up is the first step, but they won’t do you any good if they are corrupted. TEST your backups at LEAST once a quarter. If you haven’t experienced a corrupted database, give it time, it will happen! This is something we cannot stress enough. A backup is your lifeblood. If you are in the business long enough, you know that you will have to restore from a backup eventually. It WILL happen. Make sure your data is restorable, and practice restoring. Get it down to an exact science. It will help you when the time comes. Everybody’s first database restore from a disaster is always panic stricken. This can help you keep yourself calm as you know the data is good, and you know HOW to get it done.
15
Disaster Recovery Testing
16
DR Testing When was the last time you did a fire drill?
If it is longer than 6 months, you are overdue! How easy is it to access the documentation? \\fileshare\where\the\folder\structure\is\something\like\this ^ REALLY!? That just slows everything down. Are the instructions clear? Would I be able to come in today, and be able to follow your instructions to have your system back up and running within your timeframe? What is your average restore time? (Those backup tests have come back to get yinz! – Pittsburgheze) Disaster recovery(DR) documentation and processes are critical to maintaining server and service availability with minimal impact. Failure to maintain good disaster recovery documentation and processes could lead to small problems becoming disasters and disasters becoming unrecoverable failures. Disaster Recovery Plan should be tested and practiced regularly(At LEAST every six months)
17
Outages are costly, and to fix them will take more time, money, and possibly downtime to fix. Here are five tips on how to avoid being put in these situations and giving yourself a potential resume generating event: 1. Backups are the most important task you can do as an administrator. At the end of the day, that may be all you have when your fancy platform’s features fail (for any number of reasons, including implementing them incorrectly). More important than generating backups is testing them. You do not have a good backup without a successful restore. With very large sets of data (not just SQL Server databases – data can mean much more such as files associated with metadata that is in a RDBMS), finding ways to restore is not trivial due to the costs (storage, time, etc.). However, when you are down and possibly closed for good, was it worth the risk only to find out you have nothing? No. 2. Technical debt will kill you. Having systems that are long out of support (and probably on life support) and/or on old hardware is a recipe for disaster. It is definitely a matter of when, not if, they will fail. Old hardware will malfunction. If you’re going to have to search eBay for parts to resuscitate a server, you’re doing it wrong. Similarly, for the most mission critical systems, planned obsolescence every few years (usually 3 – 5 in most companies) needs to be in the roadmap. 3. Have the right processes in place. Do things like test disaster recovery plans. How do you know your plans work if you do not run them? 4. Assess risk and mitigate as best as possible. Don’t bury your head in the sand and act surprised when something happens. 5. Making decision on bad information and advice will hurt you down the road. I can’t tell you how many times I have come in after the fact and had to clean up somebody else’s mess. I don’t relish that or get any glee from it. My goal is to just fix the problem, but if you have the wrong architecture or technology/feature implemented, it will cause you years of pain and a lot of money.
18
Security Recommendations
19
Best Practice Security Recommendations
Non-Default logins provisioned to sysadmin role Non-default users are provisioned to db_owner role Who needs access? Don’t use SA accounts for SQL Server Agent Jobs Are you using the basics? “Password Complexity”, “Password Expiration”? Talk about using “Password Complexity”, and “Password Expiration” policies by leveraging the Windows Password Policy mechanisms. The db_owner role grants permission to perform the activities of all the fixed database roles as well as the maintenance and configuration activities in the database. Users should not be added to this role, unless they are required full control on the database. In SQL Server 2005, members of the db_owner fixed database role can DROP the database. Also, security should be thought of when software is developed. That is where it all starts: “However is it just the users that create poor passwords? In many cases, sure. However as the people that develop software, we can help. In fact, we should. Security should be on the mind of everyone that writes software.”
20
Resources
21
Resources Local Pass Chapter BrentOzar.com Twitter
Many of us see each other monthly at a user group. Ask your question there, get the speakers contact information and don’t be afraid to reach out to them. PASS is a great organization that encourages learning through your peers. BrentOzar.com In one free, convenient zip file, you get their scripts including sp_Blitz®, sp_AskBrent®, and sp_BlitzIndex®, plus their e-books like the SQL Server Setup Checklist and AlwaysOn Availability Groups Setup Checklist. Twitter #SQLHELP, #SQLFAMILY Reaching out to any of those hashtags will get you a response relatively quickly if you are working on something SQLskills.com/blogs/glenn/ Free SQL Server Diagnostic Information queries—Updated MONTHLY Allan Hirt - sqlha.com Great blog posts on DR strategies, pitfalls, misconceptions
22
Micrsoft Virtual Academy
MinionWare Several free pieces of wonderful software – Reindex, backup, etc. Automates those tasks for you so you don’t have to worry! SQLSentry I cannot stress how great PlanExplorer is! It is COMPLETELY free now! There used to be a free and paid, but they combined the two. Powerful tool for Execution Plan reading. Virtual Pass Chapters These chapters hold virtual meetings every month for their subject(In-Memory, Performance, Administration, etc). Register on SQLPASS.org and look into them, lots of great, knowledgeable speakers regularly present! --Shameless Plug, In-Memory VC has a great leader, just sayin. ;) PASS Summit Held annually. This is THE event to go to! This is comparable to a 4 day SQL Saturday along with an infinite amount of networking opportunities, parties(Karaoke), Microsoft employees on hand for FREE advice/troubleshooting. This year the event is in Seattle, WA. The dates are: 10/31/17 – 11/03/17. Several precons are available as well! If you can, definitely make this trip! Use your chapters discount code to receive $150 off ! Micrsoft Virtual Academy Free videos on all Microsoft products
23
Questions? Suggestions?
24
Contact Info
25
Thank you Sponsors!
26
Thank You!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.