Reverse Engineering The Database

Slides:



Advertisements
Similar presentations
Advanced SQL Schema Customization & Reporting Presented By: John Dyke As day to day business needs become more complex so does the need for specifically.
Advertisements

Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
Automating Common DBA Tasks
Introduction Cloud Computing in Healthcare Health Care Might Be Ripe for Cloud Computing Health Informatics Forum –Cloud Cloud Computing Brightens Healthcare’s.
Tempdb Parasites Jason Hall-Dir. of Client SQL Sentry Blog-jasonhall.blogs.sqlsentry.net.
DB Audit Expert v1.1 for Oracle Copyright © SoftTree Technologies, Inc. This presentation is for DB Audit Expert for Oracle version 1.1 which.
Copyright © 2007 Quest Software The Changing Role of SQL Server DBA’s Bryan Oliver SQL Server Domain Expert Quest Software.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
1 © 2001, Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID SQL 2005.
SQL School is strongly committed to provide COMPLETE PRACTICAL REALTIME Trainings on SQL Server Technologies – Dev, SQL DBA, MSBI (SSIS, SSAS, SSRS) and.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
SQL Reporting Services Troubleshooting Tips Greg Celentano SQL Saturday Providence.
Carlos Bossy Quanta Intelligence SQL Server MCTS, MCITP BI CBIP, Data Mining Real-time Data Warehouse and Reporting Solutions.
SQL Database Management
Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker.
Introduction Adult website business is very big and it has loads of cash. You cannot imagine how much a single famous porn site makes a day. There are.
What Is The SSIS Catalog and Why Do I Care?
Visual Studio 2010 Database Projects
Reporting Services In An AlwaysOn World
A big party is being held to honor relational database systems and their impact on modern society. Outside the venue, the host awaits the guests. The.
Power BI Performance Tips & Tricks
Are You There, DBA? It’s Me, The App Developer.
Query Performance Tuning: Start to Finish
Data Virtualization Demoette… Data Lineage Reporting
Do You Want To Pass In First Attempt?
Advanced Error Tracking Get to the root issue immediately!
Efficiently Searching Schema in SQL Server
Telling the Whole Story
SQL Server Monitoring Overview
Title of your science project
Where I am at: Swagatika Sarangi MDM Lead PASS Summit SQL Saturdays
DevOps Database Administration
Auditing in SQL Server 2008 DBA-364-M
SharePoint Saturday Omaha April 2016
Bringing DevOps to the Database
Principles of report writing
Third Party Tools for SQL Server
The Ins and Outs of Indexes
DevOps Database Administration
Making PowerShell Useful
Query Optimization Techniques
Migrating your SQL Server Instance
Teaching slides Chapter 8.
Querying Active Directory From SSRS
Database Administrators
Enterprise Auditing with SQL Server Audit
Bringing DevOps to the Database
Please thank our sponsors!
Inserting Pictures and Symbols in Word documents
Data base management system dbms
SSIS Deployment Smackdown!
SSIS Deployment Smackdown!
Targeting Wait Statistics with Extended Events
Welcome to SQL Saturday Denmark
Get your ETL flow under statistical process control
Outsourcing Database Administration
Cyndi Johnson Senior Software Engineer at AdvancedMD Killing Cursors.
Moving from SQL Profiler to xEvents
Summit Nashville /3/2019 1:48 AM
Title of your experimental design
Cyndi Johnson Senior Software Engineer at AdvancedMD Killing Cursors.
Databases This topic looks at the basic concept of a database, the key features and benefits of a Database Management System (DBMS) and the basic theory.
Understanding Core Database Concepts
Michael Wall Senior DBA, Great Western Malting
Using wait stats to determine why my server is slow
SSMS to Azure Data Studio
Vendor Software Lessons From Consulting Vendor Software.
Implementing ETL solution for Incremental Data Load in Microsoft SQL Server Ganesh Lohani SR. Data Analyst Lockheed Martin
Presentation transcript:

Reverse Engineering The Database Brandon Tucker – DBA, OppenheimerFunds, Inc.

Who Am I? Brandon Tucker BS Computer Science, Neumont University MCITP: DB Developer VP Events, Denver SQL Server User Group DBA, DB Dev, Consultant Financial, health insurance, transportation, education industries SQL 2005 – 2012 Presented at events in multiple states Has a wicked case of wanderlust… :) http://www.linkedin.com/in/btuck

Find The Man/Woman Of Your Dreams! After This Session… You’ll be able to: Use a few tools to dabble in reverse engineering a database Run Faster! Hack Any Database! Find The Man/Woman Of Your Dreams! Make $1,000,000!

Third-Party Applications Agenda Third-Party Applications Why Reverse Engineer? Tools Available Methods Recap, Q / A

Third-Party Applications Introduction “We have this new product, can you create the database for us?” (DBA) “We have this new product and it needs a database server!” (Dev)

Third-Party Applications Types Phone systems Ticketing systems Monitoring software SQL Sentry, Idera, Quest, Confio, etc SQL Server Management Studio OK, maybe not, but makes a good demo! master & msdb are storing data behind the scenes!

Third-Party Applications Agenda Third-Party Applications Why Reverse Engineer? Tools Available Methods Recap, Q / A

Why Reverse Engineer? Reasons Someone thought the information was important enough to store somewhere other than text files Someone thought there was a lot of information Limited tools provided by the vendor Limited views of the data

Why Reverse Engineer? Reasons And… You’re probably smarter than the vendor anyway… You know more about the value of the information… You care more… You could make your life easier/better/<insert adjective here>!

Third-Party Applications Agenda Third-Party Applications Why Reverse Engineer? Tools Available Methods Recap, Q / A

Tools Available Introduction Need to capture queries coming through the system Need to look at how data changes Need to be able to piece things together

Object Explorer SQL Server Profiler Data Compares Database Audits Tools Available List Object Explorer SQL Server Profiler Data Compares Database Audits Change Data Capture Plenty of others

Tools Available Object Explorer Found in Management Studio Easiest way to browse objects in a database Gives a good 50,000 foot view Are the tables intelligibly named? Difficult with a large number of tables

Tools Available SQL Profiler Traces Stored Procedures-RPC:Starting Stored Procedures-SP:StmtStarting TSQL-SQL:StmtStarting Provides the most information with little prior knowledge May take a few tries to narrow down your search DEMO: SQL Server Profiler

Tools Available Others Data compares, Database Audits, Change Data Capture These all look at the data itself Good if you have a small number of tables and low throughput Likely not the case

Third-Party Applications Agenda Third-Party Applications Why Reverse Engineer? Tools Available Methods Recap, Q / A

We need to find where the data goes (tables) Methods Plan of Attack We need to find where the data goes (tables) We need to find how the data gets there DML statements? Stored procs? Once we know these, we can start putting the pieces together

Methods Where Does The Data Go? If possible, use your application to put in some data Use SQL Server Profiler on all SQL hitting that server/database (if known) Pick text that you might be able to filter on Create a customer record with a “zzzz” name Create a new ticket with “zzzz” in the description Be careful about developing in production!

Methods How Did The Data Get There? Try to identify the SQL that put the data in Was it an INSERT statement? Was it a stored procedure? DEMO: SQL Agent job These are relational databases; the data is likely in multiple places! Don’t be content with just one table

Methods Putting The Pieces Together This will feel very much like a puzzle Use all of the tools available to you! Object Explorer can help with foreign keys (think Database Diagrams) Data deltas/audits can show you the complete data picture More specific traces (host, user) can reduce the noise and get you to the good stuff

Methods Putting The Pieces Together Try writing queries to see if things make sense “Shaping” queries DEMO: msdb query Be creative in figuring out short names, acronyms, etc. Make the data work for your needs Remember: a lot of databases are poorly designed/built!

Third-Party Applications Agenda Third-Party Applications Why Reverse Engineer? Tools Available Methods Recap, Q / A

Musings, Gotchas, Closing Thoughts This is not a perfect science Companies trying to obfuscate their database can make things very difficult Encrypted stored procedures can spell D-O-O-M for you As with all monitoring, be careful of your impact to the environment

Outro Q / A Thank You!

Community/SWAG Sponsors Thank You Sponsors! Gold Sponsor Silver Sponsors Marquee Sponsors Bronze Sponsors Qortex Community/SWAG Sponsors