Microsoft SQL Server 2014 for Oracle DBAs Module 2

Slides:



Advertisements
Similar presentations
SQL Server Resource Governor. Introduction To The Resource Governor Resource Governor was added in SQL Server 2008 Purpose is to manage resources by specifying.
Advertisements

SSRS 2008 Architecture Improvements Scale-out SSRS 2008 Report Engine Scalability Improvements.
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
BARBARIN DAVID SQL Server Senior Consultant Pragmantic SA SQL Server Denali : New administration features.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
Using The WDK For Windows Logo And Signature Testing Craig Rowland Program Manager Windows Driver Kits Microsoft Corporation.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Module 15: Monitoring. Overview Formulate requirements and identify resources to monitor in a database environment Types of monitoring that can be carried.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Session 1.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
A Windows Azure application runs multiple instances of each role A Windows Azure application behaves correctly when.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
5 Copyright © Oracle Corporation, All rights reserved. Usage and Configuration of the Oracle Shared Server.
Usage and Configuration of the Oracle Shared Server Supinfo Oracle Lab. 5.
Connect with life Praveen Srivatsa Founder and CEO – AstraSoft.NET Vinod Kumar Technology Evangelist – Databases and BI.

3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
SQL Database Management
IT Operations Management
Microsoft SQL Server 2014 for Oracle DBAs Module 8
6/16/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Installation and database instance essentials
IT Operations Management
TechEd /13/2018 7:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Configuring the network environment
Test Upgrade Name Title Company 9/18/2018 Microsoft SharePoint
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft SQL Server 2014 for Oracle DBAs Module 3
SQL Server 2016 Query Data Store
Title of Presentation 12/2/2018 3:48 PM
Microsoft SQL Server 2014 for Oracle DBAs Module 7
Pedro Miguel Teixeira Senior Software Developer Microsoft Corporation
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Andrew Fryer Microsoft UK
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Service Template Creation from the Ground Up
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Microsoft SQL Server 2014 for Oracle DBAs Module 1
Presentation transcript:

Microsoft SQL Server 2014 for Oracle DBAs Module 2 11: Monitoring and performance tuning Microsoft SQL Server 2014 for Oracle DBAs Module 2   Instance architecture

40074A Module Overview 3: Instance architecture Background processes  

Lesson 1: Configuring a database server 3: Instance architecture Demonstration: Configuration parameters  

Using configuration parameters to allocate and manage resources Server configuration 3: Instance architecture Using configuration parameters to allocate and manage resources Oracle configuration Use of initialization parameters (init.ora or spfile) ALTER SYSTEM, ALTER DATABASE SQL Server configuration Setting server properties using SQL Server Management Studio (SSMS) The role of sp_configure system stored procedure Startup parameters in SQL Server Configuration Manager  

Demonstration: Configuration parameters 3: Instance architecture In this demonstration you will see how to: Manage instance configurations through SSMS. Manage instance configurations through T-SQL scripts. Manage instance configurations through PowerShell. Demonstration Steps Right-click a SQL Server instance, and then click Properties. Click the Memory page and note the Minimum server memory and Maximum server memory property values. Click the Processors page and note the Maximum worker threads property value. Click the Connections page and note the Maximum number of concurrent connections property and the Allow remote connections to this server property.Note There are many more properties present on these pages as well as on other pages. These properties have been singled out for these examples only.To open the Query Editor in SQL Server Management Studio, click New Query. For the master database, execute the query: EXEC sp_configure 'show advanced options', 1 GO RECONFIGURE EXEC sp_configure Scroll through the list and note the values for the following configuration options: Min Server Memory Max Server Memory Max Worker Threads User Connections Remote Access Each row contains the configuration option name, the minimum and maximum allowable values for (More notes on the next slide)

Lesson 2: Memory architecture overview 3: Instance architecture Demonstration: Monitor and affect memory  

Memory address space in Oracle 3: Instance architecture Oracle Process Server Process Background PGA System Global Area Java Pool Buffer Cache Redo Buffer Shared Pool Streams Pool Large Pool   Components of Oracle in memory Application components RDBMS components Automatic memory management Manage both SGA and PGA Automatically sizes memory

SQL Server memory pool and Oracle System Global Area 3: Instance architecture Buffer Cache Shared Pool Columnstore Cache Procedure Cache Redo Buffers Fixed SGA Large Pool Streams Java Log Cache System Structures Connection Context CLR Hosting Layer Oracle System Global Area (SGA) SQL Server Memory Pool  

SQL Server architecture 3: Instance architecture Components of SQL Server architecture Non-preemptive scheduling Memory management   Memory Management Non-Preemptive Scheduling Memory Nodes Memory Clerks Caches Pools Memory Objects Scheduling Nodes Schedulers Tasks Worker Threads System Threads Hosting Subsystems SQLOS

Demonstration: Monitoring memory usage with dynamic management views 3: Instance architecture In this demonstration you will see how to: Review instance memory via T-SQL Demonstration Steps To open the Query Editor in SQL Server Management Studio, click New Query. For the master database, execute the query: SELECT physical_memory_kb AS PhysicalMemoryAvailable, virtual_memory_kb AS VirtualMemoryAvailable, committed_kb AS CommittedMemory, committed_target_kb AS AvailableMemory FROM sys.dm_os_sys_info This shows the amount of physical memory available, the virtual memory available to the process in user mode, the committed memory in the memory manager, and the amount of memory that can be consumed by SQL Server memory manager. In the same query window execute the query: SELECT * FROM sys.dm_os_memory_clerks Memory clerks manage the stores of memory used by the caching framework introduced in SQL Server 2005. The descriptions of the returned columns (and those of the following DMV’s) are available in Books Online. Some columns that provide useful information include: pages_kb Amount of page memory allocated virtual_memory_reserved_kb and virtual_memory_committed_kb Amount of virtual memory reserved and committed by the clerk awe_allocated_kb Amount of memory allocated by using AWE Execute the following query: (More notes on the next slide)

Memory address space comparison 3: Instance architecture Memory Allocation in SQL Server Dynamic at Higher level (memory pool, etc.) Lower level (buffer cache, procedure cache, etc.) Few configurable parameters Memory Address Range 32-bit (x86) - legacy /IncreaseUserVA 64-bit (x64) 2TB  

Demonstration: Monitor and affect memory 3: Instance architecture In this demonstration you will see how to: View the setting for the Instance though SSMS Use the Task Manager for quick memory allocations Track memory performance though counters Demonstration Steps Select a particular SQL Server instance. Right-click the instance, click Properties, and then click Memory. You can view the dynamic or fixed memory allocated for the particular instance. In most installations the minimum memory is set at 0 bytes and the maximum memory is allocated as high as the system may allow. In addition, you can set or view the minimum memory assigned to each query. The default is 1 MB. The minimum value may be as low as 512 KB and the maximum is configurable based on available memory. Caution and testing should always be applied before changing these values in order to mitigate unexplained behavior in the system.1. Press Ctrl + Alt + Delete, or right-click the Taskbar. 2. Click the Task Manager. 3. Click the Performance tab. Options located on the Performance tab are: • CPU Usage • CPU Usage History • Memory: Shows the total and available RAM The Physical Memory Usage History column is the Working Set, or the portion of that process space that is in physical memory (as opposed to being in page file). Working Set can add up to over the physical amount of memory because there can be pages that are shared, such as processes sharing the same DLLs.When the Lock pages in memory right is granted Task Manager does NOT show the correct value for the sqlservr.exe process under the Mem Usage column. The reason for this is that the Mem Usage column does not take Locked Pages into account. For this reason, especially when you have a large amount of RAM, you may observe that the Mem Usage column has a low value, whereas the Total Server Memory Performace Counter (explained below) shows a much higher (and correct) value for memory usage. Click Start → Control Panel → System and Security → Administration Tools. Click Performance Monitor. Select the option to Add counter (the big green plus sign). Select SQLServer: MemoryManager → Total Server Memory. Total Server Memory indicates how (More notes on the next slide)

Lesson 3: Understanding processes and threads in the database engine 3: Instance architecture SQL Server client–database interaction  

Process and thread architecture 3: Instance architecture Process - memory space to protect applications Threads – Execute code Allocated time on CPU Managed by Operating System Fibers are light-weight threads reduce context switching overhead Oracle uses processes in Unix and threads in Windows Both Oracle and SQL Server use threads and optionally fibers. Allocate thread assignment with CPU affinity  

Greater control with Resource Governor 3: Instance architecture Resource Governor Performance Availability Key Components Resource Pools Workload Groups Classification Session 1 of n User-defined classifier function Group 1 Pool 1 Internal Group Internal Pool Default Pool Default Group Group 2 Application 1 Group 3 2 Group 4 3 Pool 2  

Oracle client–database interaction 3: Instance architecture Oracle connections Client Person System Application Layer Oracle Net Foundation Oracle Protocol Support Layer Database Server Listener (defined by listener.ora may implement TNSnames.ora Oracle Instance Oracle Protocol Storage System Data Storage   Key components in the interaction of the user (client) with the database environment

SQL Server client–database interaction 3: Instance architecture Users User Process Relational Engine Memory Pool Database Buffer Cache ODBC Storage Log Open Data Services Database Cleanup Worker Thread Writer Lazy Shrinking Data Files Log Files Client SQL Server uses the shared server mode Functionality of the dispatcher is facilitated by the networker thread Functionality of the shared server processes by the worker threads

Lesson 4: Background processes 3: Instance architecture Demonstration: Evaluating instance resources  

Oracle background processes 3: Instance architecture Instance SGA Process Monitor User Process System Monitor   Dispatcher Job Queue Redo Log Buffer User Process Queue Monitor Shared Server Event Monitor Recoverer User Process Dedicated Server Trace Writer Checkpoint Users Database Data Files Archive Log Files Control Files Redo Log Files Automatic Storage Management

SQL Server background processes 3: Instance architecture Users User Process Relational Engine Memory Pool Database Buffer Cache ODBC Storage Log Open Data Services Database Cleanup Worker Thread Writer Lazy Shrinking Data Files Log Files Client  

Comparing background processes 3: Instance architecture Oracle process Oracle identifier SQL Server equivalent Required Process Monitor System Monitor Database Writers Checkpoint Process Recoverer Log Writer Archive Processes Job Queue Processes Job Queue Coordinators Queue Monitor Processes Parallel Query Slave Processes Dispatcher Shared Servers PMON SMON DBWn CKPT RECO LGWR ARCn Jnnn CJQn QMNn Pnnn Dnnn Snnn SQLOS Database Cleanup/Shrinking Lazywriter Database Checkpoint MS DTC N/A SQL Agent Worker Threads Networker Thread Mandatory Optional  

Demonstration: Evaluating instance resources 3: Instance architecture In this demonstration you will see how to: Use Dynamic Management Views to see processor usage. Use Activity Monitor to see real-time session usage. Associate scheduler threads to worker threads. Demonstration Steps To open the Query Editor in SQL Server Management Studio, click New Query. For the master database, execute the query: SELECT * FROM sys.dm_os_schedulers This returns data about SQL Server schedulers, which deploy workers to threads. Execute the query: SELECT * FROM sys.dm_exec_sessions Provides resource information about sessions associated with SQL Server processes. How many sessions are provided?______ Keep this tab open. Most session information (not all) can be gathered from Perfmon. However, if DBAs cannot run Perfmon, they can get the information through dynamic management views and functions. For example, you can query the sys.dm_exec_connections, sys.dm_exec_sessions, and sys.dm_exec_requests dynamic management views to obtain the resource information used by different processes.Right-click a particular SQL Server instance, and then select Activity Monitor. Right-click Activity Monitor and refresh the activity. You can see the resource usage of the processes running on that database. To view the memory consumed by various processes associated with an instance, expand the Processes bar. You can view the memory consumed by each process running on the database server. Note the number of sessions. These are fewer than the number of items seen previously while using the DMVs. Why are these different and what are they? ______________________________ _____________________________________________________1. Go back to the Activity Monitor tab. 2. Drag it down in the panel to create a split. 3. Click User Process, and then click (All). Now all of the sessions should match the tab with (More notes on the next slide)

© 2014 Microsoft Corporation. All rights reserved © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.