Presentation is loading. Please wait.

Presentation is loading. Please wait.

Efficiently Searching Schema in SQL Server

Similar presentations


Presentation on theme: "Efficiently Searching Schema in SQL Server"— Presentation transcript:

1 Efficiently Searching Schema in SQL Server
Ed Pollack Database Administrator CommerceHub

2 Agenda Using Simple Tools to Build a Search Solution: Introduction.
Why Do We Care? System Views (server). System Views (database). Putting Them All Together. Questions!? Conclusion.

3 Introduction SQL Server provides internal views that provide extensive information about your databases and server. These views are included in all SQL Server versions. System views tell us about EVERYTHING…such as Tables and columns Database properties Server specifications SQL Server services & features Lots and lots more…

4 Why Do We Care? Review dependencies for software releases.
Code review scripts that alter/remove existing schema. Database or object migrations. Verifying use or non-use of an object. Database research and documentation. Database metrics. Curious DBAs!

5 System Views (Server) Server-level views reside in MSDB or Master and provide insight into server settings and features. Most SQL Server features have views that can tell you about their configuration, metadata, and relationships. These views can be joined together for greater insight. Many internals can be searched, such as replication, query plan cache, buffer cache, etc…

6 System Views (Server) Demo

7 System Views (Database)
Database-level views reside with each database on a SQL Server. Provides details on database objects, such as schemas, tables, columns, and views. Can be joined to server views for a more complete view. Use this information to search for & analyze a database.

8 System Views (Database)
Demo

9 Putting it All Together
System views can be searched to determine if objects exist with certain names or attributes. Search can be customized as per server configuration. Results can be combined into a single data set. Encapsulate search logic in a stored procedure for convenience & reuse. Performance varies based on the number of databases and objects on a given SQL Server.

10 Putting it All Together
Demo

11 Conclusion System views provide valuable insight into SQL Server.
Simple tools can be combined to produce powerful solutions. Views exist for many features and are well documented. Replication, Resource Governor, IMOLTP, Partitioning, Compression, AlwaysOn, SSRS, SSIS, etc… Customize! Build a solution to meet your business needs.

12 Questions???

13 Contact Info & Links Ed SQL Shack SQL Server Central SQL Saturday Albany (2016) Thank you!!!


Download ppt "Efficiently Searching Schema in SQL Server"

Similar presentations


Ads by Google