How to Build Scalable & Secure Database Applications Noel Jerke & Erin Welker Scalability Experts.

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

SSRS 2008 Architecture Improvements Scale-out SSRS 2008 Report Engine Scalability Improvements.
Notes: Update as of 1/13/2010. Vulnerabilities are included for SQL Server 2000, SQL Server 2005, SQL Server Oracle (8i, 9i, 9iR2, 10g, 10gR2,11g),
DEV351 ADO.NET Performance Pablo Castro Program Manager – ADO.NET Team Microsoft Corporation.
SQL Server Replication
SQL Server 2005 features for VLDBs. SQL Server 2005 features for VLDBs aka (it’s fixed in the next release)
Database Optimization & Maintenance Tim Richard ECM Training Conference#dbwestECM Agenda SQL Configuration OnBase DB Planning Backups Integrity.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Technical Architectures
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Keith Burns Microsoft UK Mission Critical Database.
Microsoft Dynamics AX Technical Conference 2013
Connect with life Vinod Kumar M Technology Evangelist | Microsoft
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Passage Three Introduction to Microsoft SQL Server 2000.
Architecting a Large-Scale Data Warehouse with SQL Server 2005 Mark Morton Senior Technical Consultant IT Training Solutions DAT313.
Varun Sharma Security Engineer | ACE Team | Microsoft Information Security
Manage & Configure SQL Database on the Cloud Haishi Bai Technical Evangelist Microsoft.
Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.
Performance and Scalability. Performance and Scalability Challenges Optimizing PerformanceScaling UpScaling Out.
Word Wide Cache Distributed Caching for the Distributed Enterprise.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 200 Intended Audience: Developers Objectives (what do.
Database Design for DNN Developers Sebastian Leupold.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
PLEASE READ (hidden slide) This template uses Microsoft’s corporate font, Segoe Segoe is not a standard font included with Windows, so if you have not.
Your Data Any Place, Any Time Online Transaction Processing.
Designing a Scalable Enterprise Project Management Architecture Ken Toole Platform Test Manager MS Project Microsoft Corporation.
By Shanna Epstein IS 257 September 16, Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the.
SQL Server 2000 Sys Admin Jeremiah Curtis Engineering Services
Exchange Deployment Planning Services Exchange 2010 Complementary Products.
SQL School is strongly committed to provide COMPLETE PRACTICAL REALTIME Trainings on SQL Server Technologies – Dev, SQL DBA, MSBI (SSIS, SSAS, SSRS) and.
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
DAT325 SQL Server 2005 (Codenamed “Yukon”): Using the Service Broker To Build Asynchronous, Queued Database Applications Roger Wolter Program Manager.
Connect with life Vinod Kumar Technology Evangelist - Microsoft
Connect with life Nauzad Kapadia Quartz Systems
Hosting Websites and Web Applications with Microsoft ® SQL Server ® 2008.
Your Data Any Place, Any Time Performance and Scalability.
1 Copyright © 2005, Oracle. All rights reserved. Following a Tuning Methodology.
Features Of SQL Server 2000: 1. Internet Integration: SQL Server 2000 works with other products to form a stable and secure data store for internet and.
Presented by Vishy Grandhi.  Lesson 1: AX Overview  Lesson 2: Role based security  Lesson 3: Monitoring  Troubleshooting.
Data Management Conference Performance & Scalability Simon Sabin London September 29th.
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
Patrick Ortiz Global SQL Solution Architect Dell Inc. BIN209.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
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.
Dynamics Tech Conference 2015 PART 1. Dynamics R3 CU8 Retail warehouse Built-in modules for warehouse efficiency License plating.
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
Exploreengage elevateexploreengage elevate AXUG Colorado Chapter Meeting May 19, 2016 Presented by Michael Oakes & Tom Kim AXMentor, Inc. Performance Optimization.
Blog.eardley.org.uk SharePoint Databases What you need to know Alan Eardley SQL Saturday Exeter 25 April 2015.
Building Enterprise Applications Using Visual Studio®
Data and database administration
Cisco Data Virtualization
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Oracle Database Administration
Designing Database Solutions for SQL Server
Installation and database instance essentials
Introduction to SQL Server Management for the Non-DBA
Software Architecture in Practice
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Dynamics AX Performance
Migrating your SQL Server Instance
DAT381 Team Development with SQL Server 2005
Chapter 11 Managing Databases with SQL Server 2000
Mark Quirk Head of Technology Developer & Platform Group
Getting Data Where and When You Want it with SQL Server 2005
Presentation transcript:

How to Build Scalable & Secure Database Applications Noel Jerke & Erin Welker Scalability Experts

Part 1 – Agenda Scaling SQL Server Application Databases Scaling SQL Server Application Databases  End-To-End Scalability  Application Data Management .Net Tips and Tricks

End-To-End Scalability Business Requirements

Scalability starts with the analysis of the business requirements Scalability starts with the analysis of the business requirements  Fast hardware, software, and tuning are only a small part of the scalability equation  The base of the pyramid is design, which has the greatest influence on scalability  Technical design is based on meeting business requirements

A critical juncture in developing scalable systems is aligning business requirements and the architectural direction A critical juncture in developing scalable systems is aligning business requirements and the architectural direction  Budgets  Critical nature of the system to the core business  Functional requirements  Time frame  Risks  Acceptable  Unacceptable

Other Issues to Consider Complexity Complexity  Is the application well understood?  Can it be reasonably controlled to scale properly? Manageability Manageability  Is the application manageable?  Do you have the right resources that are capable of scaling the system?

Application Data Management Key techniques to reduce the impact of the application on the database Key techniques to reduce the impact of the application on the database  Data caching  Pre-processing data  Load-balanced asynchronous processing  Mirroring data

Data Caching Commonly utilized data Commonly utilized data Data that is infrequently updated Data that is infrequently updated Reasonable in size to cache in the middle or client tier Reasonable in size to cache in the middle or client tier

Data Application Server Cache

Pre-processing Data Real-Accurate versus Real-Time Real-Accurate versus Real-Time Focus on having data calculations done ahead of time to meet accuracy requirements Focus on having data calculations done ahead of time to meet accuracy requirements Reduce the real time calculation requirements to a sub-set of data that has not been pre-processed Reduce the real time calculation requirements to a sub-set of data that has not been pre-processed

Data Application Server Cache - Processing Engine

Load Balanced Asynchronous Processing When real time analysis of large volumes of data is required, move the calculations into a middle-tier When real time analysis of large volumes of data is required, move the calculations into a middle-tier Allow several servers to run the middle tier objects and federate the data to be processed Allow several servers to run the middle tier objects and federate the data to be processed

Data Application Server Cache - Processing Engine - Calculations - Processing Engine - Calculations

Mirrored Data Use techniques for mirroring data between two SQL Server to separate analysis transactions from OLTP transactions Use techniques for mirroring data between two SQL Server to separate analysis transactions from OLTP transactions Techniques can include using replication and double commit of transactions Techniques can include using replication and double commit of transactions

Application Server Cache - Processing Engine - Calculation - Processing Engine - Calculations Reporting Data Core Data

.Net Tips and Tricks Server Controls Server Controls  Server controls add overhead to the server  Only use when needed  Consider using alternative direct coding and not using a control – this may take more programming time but might reduce overhead significantly

.Net Tips and Tricks Cache Data and Pages Cache Data and Pages  Plan caching into your application architectures  Caching will significantly improve performance Minimize Number of Assemblies Minimize Number of Assemblies  Assembly loading can be costly  Try to place logic of small assemblies in another assembly

.Net Tips and Tricks Use Stored Procedures Use Stored Procedures  Preferred data access method  Compiled in the database  Optimize for ADO.net Use SQL Data Reader for Reads Use SQL Data Reader for Reads  Always use for forward read-only data access  Note the connection remains open for the data reader, close as soon as possible  Use type accessors (GetInt32, GetString, etc.) to reduce type conversion

.Net Tips and Tricks When to Utilize DataSets When to Utilize DataSets  Powerful ability to relationally work with data outside of the database  Can add significant overhead to the server  Beware of synchronization issues with data updated on the server having been also changed in the database  Very useful for complex data manipulation that can be handled on the server  Useful for working with non-database relational and XML data

Part 2 - Agenda Indexing Strategies Indexing Strategies Minimizing Table Sizes Minimizing Table Sizes Efficient and Reusable Query Plans Efficient and Reusable Query Plans Effective Locking Effective Locking Appropriate Database Maintenance Appropriate Database Maintenance Minimal Use of Cursors Minimal Use of Cursors Knowledge of Available Tools Knowledge of Available Tools Securing SQL Server Application Data Securing SQL Server Application Data

Indexing Strategies – Heap Table

Indexing Strategies – Clustered Index

Indexing Strategies – Non-Clustered Index

Effective Table Indexing Create an effective clustered index, such as: Create an effective clustered index, such as:  Most frequently used search criteria  Primary Key  Frequently used range Keep index keys small Keep index keys small Only index selective columns Only index selective columns  Make sure the left-most column is selective Use Indexed Views, as appropriate Use Indexed Views, as appropriate Verify results and monitor over time Verify results and monitor over time

Minimizing Table Sizes Archive data, when able Archive data, when able Consider partitioned views and create partitions Consider partitioned views and create partitions Current DataHistory Indexed View with Check Constraint

Efficient and Reusable Query Plans Dynamic queries Dynamic queries  Auto-parameterization: SELECT * FROM Orders WHERE Order_ID = 1 sp_prepare/sp_execute sp_prepare/sp_execute sp_executesql sp_executesql Stored Procedures Stored Procedures

Effective Locking Keep transactions short Keep transactions short Apply proper indexes Apply proper indexes Retain SQL Server’s default behavior Retain SQL Server’s default behavior Monitor for locking issues: Monitor for locking issues:  sp_who / sp_lock  Alerts  System Performance Monitor  SQL Profiler  SQLDIAG.exe

Appropriate Database Maintenance Mix Full, Differential and Transaction log backups effectively Mix Full, Differential and Transaction log backups effectively Only defragment fragmented indexes Only defragment fragmented indexes Use DBCC INDEXDEFRAG if batch maintenance window is an issue Use DBCC INDEXDEFRAG if batch maintenance window is an issue  Starter script in SQL Server Books Online Consider manual Shrink DB and Update Statistics Consider manual Shrink DB and Update Statistics

Minimal Use of Cursors Use set-based instead of row-based operations Use set-based instead of row-based operations Row-based can be unknowingly implemented by: Row-based can be unknowingly implemented by:  Cursors  DTS Lookup  Functions to perform lookups

Knowledge of Available Tools SQL Profiler!! SQL Profiler!!  Many events and data columns  Can be saved to SQL table for query analysis System Performance Monitor System Performance Monitor SQL Query Analyzer SQL Query Analyzer  Graphical or textual showplan  SET STATISTICS IO ON  SET STATISTICS TIME ON

Securing SQL Server Application Data Ensure up-to-date service packs and security patches are installed Ensure up-to-date service packs and security patches are installed Implement a layered security approach Implement a layered security approach Use Windows Authentication Use Windows Authentication  If this cannot be used, be very careful about how password information is stored Use Application or User roles Use Application or User roles

Securing SQL Server Application Data Implement security at the object level Implement security at the object level Use views and stored procedures to provide a layer of abstraction from tables Use views and stored procedures to provide a layer of abstraction from tables Encrypt sensitive data such as credit card numbers Encrypt sensitive data such as credit card numbers Beware of opportunities for SQL Injection Beware of opportunities for SQL Injection

Call To Action Sign up to meet with the Scalability Experts/Microsoft Technical team. For more information, please You can download all presentations at

Scalability Experts (972) www. scalabilityexperts.com Michael Handshy (sales) (972) Office (214) Mobile Noel Jerke (972) Office(214) Mobile Erin Welker (972) Office(817) Mobile Contact Information

Questions ?

SQL Server Summit Brought To You By:

© 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.