Only for Data Group Students Do not share with outsiders and do not use for commercial purposes.

Similar documents
HA/Disaster and Recovery Solution Mirroring Review & Log Shipping

Install and Configure SQL Server Database Software Interview Questions and Answers

QUANTIFY INSTALLATION GUIDE

Database Mirroring: High Availability (HA) and Disaster Recovery (DR) Technology

Microsoft Corporation. Project Server 2010 Installation Guide

Hands-On Microsoft Windows Server 2008

Metalogix SharePoint Backup. Advanced Installation Guide. Publication Date: August 24, 2015

Migrate a Database to Microsoft SQL Server Database

Idera SQL Diagnostic Manager Management Pack Guide for System Center Operations Manager. Install Guide. Idera Inc., Published: April 2013

Installation Instruction STATISTICA Enterprise Small Business

Database Monitoring and Performance Tuning

Database Maintenance Guide

StruxureWare Power Monitoring 7.0.1

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

3 Setting up Databases on a Microsoft SQL 7.0 Server

Server Manager Performance Monitor. Server Manager Diagnostics Page. . Information. . Audit Success. . Audit Failure

Enterprise Manager. Version 6.2. Installation Guide

NETWRIX CHANGE NOTIFIER

SAM Server Utility User s Guide

Microsoft SQL Server OLTP Best Practice

Module 15: Monitoring

Installation Instruction STATISTICA Enterprise Server

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

MRI Commercial. MRI Residential. CRE Manager. Windows Version 4.0 Installation Guide

Dell InTrust Preparing for Auditing Microsoft SQL Server

FIGURE Selecting properties for the event log.

WINDOWS PROCESSES AND SERVICES

Metalogix Replicator. Quick Start Guide. Publication Date: May 14, 2015

Getting Started with Attunity CloudBeam for Azure SQL Data Warehouse BYOL

Viewing and Troubleshooting Perfmon Logs

How to Configure Microsoft System Operation Manager to Monitor Active Directory, Group Policy and Exchange Changes Using NetWrix Active Directory

Database Configuration Guide

Migrating MSDE to Microsoft SQL 2008 R2 Express

FileMaker 12. ODBC and JDBC Guide

Lab 14A: Using Task Manager and Event Viewer

Administering Microsoft SQL Server 2012 Databases

Integrating LANGuardian with Active Directory

Installing Cobra 4.7

FileMaker 13. ODBC and JDBC Guide

JAMF Software Server Installation Guide for Windows. Version 8.6

Pearl Echo Installation Checklist

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

File Auditor for NAS, Net App Edition

SQL Server Performance Tuning and Optimization

IMPORTANT: The person who installs and sets up the PCS Axis database on the central database server

Embarcadero Performance Center 2.7 Installation Guide

ION EEM 3.8 Server Preparation

INSTALLING MICROSOFT SQL SERVER AND CONFIGURING REPORTING SERVICES

TROUBLESHOOTING GUIDE

FileMaker Server 7. Administrator s Guide. For Windows and Mac OS

FileMaker 11. ODBC and JDBC Guide

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Moving the TRITON Reporting Databases

PrivateWire Gateway Load Balancing and High Availability using Microsoft SQL Server Replication

FileMaker Server 8. Administrator s Guide

Setting Up ALERE with Client/Server Data

EXPRESSCLUSTER X for Windows Quick Start Guide for Microsoft SQL Server Version 1

Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide

DOCSVAULT Document Management System for everyone

Preparing a SQL Server for EmpowerID installation

Enterprise Server. Application Sentinel for SQL Server Installation and Configuration Guide. Application Sentinel 2.0 and Higher

NetWrix Account Lockout Examiner Version 4.0 Administrator Guide

SAP Business Objects Business Intelligence platform Document Version: 4.1 Support Package Data Federation Administration Tool Guide

Understanding Performance Monitoring

1. Technical requirements 2. Installing Microsoft SQL Server Configuring the server settings

Matisse Installation Guide for MS Windows

CA Nimsoft Monitor. Probe Guide for IIS Server Monitoring. iis v1.5 series

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

Converting InfoPlus.21 Data to a Microsoft SQL Server 2000 Database

Also on the Performance tab, you will find a button labeled Resource Monitor. You can invoke Resource Monitor for additional analysis of the system.

HP Client Automation Standard Fast Track guide

EventTracker Enterprise v7.3 Installation Guide

Sage ERP Accpac 6.0A. Installation and System Administrator's Guide

CONFIGURING MICROSOFT SQL SERVER REPORTING SERVICES

Microsoft SQL Server Staging

How to Configure and Use SQL with EnCase Products

3M Command Center. Installation and Upgrade Guide

Best Practices for Running Dassault Systèmes ENOVIA on SQL Server 2008

1 of 10 1/31/2014 4:08 PM

ImageNow for Microsoft SQL Server

Crystal Reports Installation Guide

NetWrix Server Configuration Monitor

Centran Version 4 Getting Started Guide KABA MAS. Table Of Contents

NETWRIX ACCOUNT LOCKOUT EXAMINER

5nine Cloud Monitor for Hyper-V

Operating System Installation Guide

Novell ZENworks Asset Management 7.5

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

Lepide Software. LepideAuditor for File Server [CONFIGURATION GUIDE] This guide informs How to configure settings for first time usage of the software

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Installation & Upgrade Guide. Hand-Held Configuration Devices Mobility DHH820-DMS. Mobility DHH820-DMS Device Management System Software

CoCreate Manager Server Installation Guide. CoCreate Manager Server Installation Guide 1

Advanced Event Viewer Manual

NETWRIX WINDOWS SERVER CHANGE REPORTER

NETWRIX EVENT LOG MANAGER

Setting up an MS SQL Server for IGSS

Secret Server Installation Windows 8 / 8.1 and Windows Server 2012 / R2

Upgrade Guide BES12. Version 12.1

Getting Started with ESXi Embedded

Transcription:

Written by Zakir Hossain, Manager Enterprise Architecture Configuration & Database US Dept. of Defense CEO, Data Group CS Graduate (OSU), OCP, OCA, MCDBA, MCITP-DBA, Security+, Oracle RAC-Admin, Oracle Backup/Recovery-Admin, Oracle Performance/Monitoring-Admin, Oracle App Server-Admin, System Admin (Windows/RedHat), ITIL V3, SCJP (Sun Certified Java Programmer)..::.. ALERT..::.. Altering, printing, and sharing with any training institute/individual or commercial/business use without written permission is 100% prohibited. It is a Federal Copy Right Violation of Intelligence Product. Violators will be prosecuted with the fullest Extent of Federal Law. Only for Data Group Students Do not share with outsiders and do not use for commercial purposes. 1/13

Commercial Third party Tools for Performance Management: Idera SQL Diagnostic Manager (DG): http://www.idera.com/products/sql-server/sql-diagnostic-manager/ Quest Foglight Performance Analysis For SQL Server: http://www.quest.com/foglight-performance-analysis-for-sql-server/ Quest spotlight for SQL Server Enterprise: http://www.quest.com/spotlight-on-sql-server-enterprise/ RedGate SQL Monitor: http://www.red-gate.com/products/dba/sql-monitor/ Free Third Party Tools: SQL Check v3.0 (SQL Server Monitoring Tools) http://www.idera.com/products/free-tools/sqlcheck/?s=bn120_mssqltips_chk SQL Job Manager: http://www.idera.com/products/free-tools/sql-job-manager/ SQL Permissions: http://www.idera.com/products/free-tools/sql-permissions/ http://www.spiceworks.com/free-sql-server-monitoring-tool Native Tools: Available Tools and Resources in SQL Server for Monitoring and Performance Tuning Primary monitoring tools: Performance Monitor (Perfmon: Start>type: perfmon) SQL Server Profiler Execution Plan Database Tuning Advisor Index Tuning Advisor (2000/for 2008/R2/2012) DBCC 2/13

Fragmentation Finder : T-SQL Stored Procedure (System) DMV (Dynamic Management View) Other resources for monitoring SQL Server Performance: Activity Monitor: Provides information on current users, processes, and locks How to use: Connect an instance of Database Engine Right-click on an instance Select Activity Monitor Security/Permission Require: VIEW SERVER STATE, CREATE DATABASE, ALTER ANY DATABASE, or VIEW ANY DEFINITION permission/grants To KILL a process, a user must be a member of the sysadmin or processadmin fixed server roles grant. Activity Monitor Refresh Interval: Default refresh Interval is 10 Seconds How to change/setup Refresh Interval: Open the Activity Monitor Right-click Overview Select Refresh Interval 3/13

Select the interval in which Activity Monitor should obtain new information about instance Open Activity Monitor when opening SQL Server Management Studio: On the Tools menu, click Options In the Options dialog box, expand Environment, and then select General In the At startup box, select Open Object Explorer and Activity Monitor To activate the changes, close and reopen SQL Server Management Studio SQL Server logs: SQL Server event logs provide activity information, auditing, warning, and error messages that can help to troubleshoot SQL Server problems It provides summary of activities. However, to read complete information, use the event logs How to use: Connect to an instance of Database Engine Expand Server Node Expand Management Node and Under Management Node, Expand SQL Server Logs Node Double-click Log you want to examine SQL Server Agent logs: SQL Server Agent event logs allows to view informational, auditing, warning, and error messages that can help to troubleshoot SQL Server Agent problems 4/13

How to use: Connect to an instance of Database Engine Expand Server Node Expand SQL Server Agent Node Under the SQL Server Agent node, Expand Error Logs Node Double-click Log you want to examine Special Note: According to Microsoft, SQL Server Logs and SQL Server Agent logs as error logs. However, in current implementation the logs are more accurately called event. Similar but detail information is managed in Microsoft Windows. These logs in SQL Server contain informational and security messages as well as error messages. Job Activity Monitor: Provides details status of SQL Server Agent jobs How to use: Connect to an instance of Database Engine Expand Server Node Expand SQL Server Agent Node Double-click Job Activity Monitor Event logs: Event logs allows to troubleshoot system wide problems, including SQL Server and SQL Server Agent problems How to use: 5/13

Click Start, click Administrative Tools, and then select Event Viewer Replication Monitor: Provides details status of Replication Allows to configure replication alerts How to use: Use Object Explorer view to access an instance of the Database Engine. Right-click the Replication node Select Launch Replication Monitor DBCC statements: There are set of DBCC Commands Allows to check SQL Server statistics, Trace activity, and Check database integrity How to use: sp_helpdb: This is a system stored procedure It displays information about databases How to use: sp_helpindex: sp_helpindex is a system stored procedure This provides reports information about indexes on a table or view sp_helpserver: sp_helpserver is a system stored procedure 6/13

It provides information in SQL Server instances configured for remote access or replication sp_monitor: sp_monitor is a system stored procedure It shows key SQL Server usage statistics, such as CPU idle time and CPU usage sp_spaceused: sp_spaceused is a system stored procedure It shows an estimate of disk space used by a table, indexed view, or Service Broker queue in the current database sp_who: sp_who is a system stored procedure It shows a snapshot of current SQL Server users and processes sys.dm_tran_locks: sys.dm_tran_locks is a dynamic management view (DMV) It shows information about object locks Special Note: sys.dm_tran_locks view replaces the sp_lock stored procedure. Database Performance Optimization: Optimize Disk Performance: o Use 64KB Pages File Allocation Unit. By default SQL Server uses 8KB Unit (Page/Extent) (Block size 64KB) o RPM (Rotation Per Minute) of HD: Laptops 5400 RPM (Lowest speed), 7200 RPM, 10000 RPM 7/13

o Solid State HD for SQL Server Engine and regular SAN for Data o RAID: Raid for Data 5/10/01and Raid for Log file: 1 Apply SP. There might be a MEMORY LEAK issue. For an Example, SQL Server 2005 has this issue. SP3 fixes this issue Enable Lock Pages: o This is Windows policy determines which accounts can use a process to keep data in physical memory o It prevents system from paging the data to virtual memory on disk Cache How to Setup: Use the Windows Group Policy tool (gpedit.msc) to enable this policy for the account used by SQL Server. You must be a system administrator to change this policy. To enable the lock pages in memory option o Start, click on Run. Now type gpedit.msc This will open the Group Policy dialog box o Expand Computer Configuration, and then expand Windows Settings o Expand Security Settings, and then expand Local Policies o Select User Rights Assignment folder The policies will be displayed in the details pane o Double-click Lock pages in memory o In the Local Security Policy Setting dialog box, click Add 8/13

o In the Select Users or Groups dialog box, add an account with privileges to run sqlservr.exe Configure SQL Server Memory: o When to configure this: Configure this option only if SQL Server is consuming too much memory or you are getting complaint that SQL Server is eating too much memory or all memory or you are adding memory and SQL Server is taking all of it o SQL Server uses two parameters to configure this min server memory is 0 megabytes (MB) (By Default) max server memory is 2147483647 megabytes (MB) (By Default) o Minimum Memory Amounts Allowable: For 32 Bit OS: 64 MB For 64 Bit OS: 128 MB o How to Configure: 1. Right-click on Instance and select Properties 2. Click Memory node 3. Under Server Memory Options, enter the amount that you want for Minimum server memory and Maximum server memory NOTE: Default setting allows SQL Server to change its memory requirements dynamically based on available system resources. Keep in mind that the default setting for min server memory is 0, and the default setting for max server memory is 2147483647 megabytes (MB) Affinity o Configure using T-SQL: 9/13

sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'max server memory', 4096; GO RECONFIGURE; GO Maximize Data Throughput for Applications: To optimize system memory use for SQL Server, you should limit the amount of memory that is used by the system for file caching. To limit the file system cache, make sure that Maximize data throughput for file sharing is not selected. You can specify the smallest file system cache by selecting Minimize memory used or Balance. o How to setup: o Click Start, click Control Panel, double-click Network Connections, and then double-click Local Area Connection o On the General tab, click Properties, select File and Printer Sharing Microsoft Networks, and then click Properties o If Maximize data throughput for network applications is selected, choose any other option, click OK, and then close the rest of the dialog boxes Change Processors: Change this only heavily used systems and big database. Make sure server has enough CPU 10/13

ALTER SERVER CONFIGURATION SET PROCESS AFFINITY CPU = 0 to 15 Ensure Jobs are running: One of the most common causes of performance problems is Agent Jobs are not running, which in can cause the MessageBox and Tracking databases to grow unchecked. Follow the steps to ensure Jobs are running without problems: o Verify the SQL Server Agent service is running: If third party software is running to execute job, this will cause different problems o Verify jobs are completing in timely manner Microsoft System Center Operations Manager can be used to monitor jobs. It is widely used this days Purge Job History and related data: How to setup: o SQL Server Agent, and then click Jobs o Right click on Jobs and Select Manage Job Categories o Right click on Jobs and Select Manage Schedules o Right click on Jobs and Select View History o Right click on a job and Select Properties o Click on Step and Click on Edit and click OK and after modifying Configure more File and File Group Connection to SQL Server database/instance is Failing: Three ways to verify: 11/13

1. Ping 2. Ping with Port number 3. ODBC Database Monitoring and Performance Tuning Q. An application is getting refuse to connect to SQL Server. What is your approach to diagnose the problem? Three ways to verify: 1. Ping 2. Ping with Port number 3. ODBC (DB Server Name, DB Name, User Name, Password) Application Server: Where the application is running from CREATE DATABASE Perf_Monitoring go DB Server use Perf_Monitoring go create table t2 ( id uniqueidentifier, M_Name int, Y_Insert datetime ) App Server (Web Application/or Any other Application running from this machine) Web Server: IIS,Tomcat/Apache Tomcat SQL Server Client DB Server INSERT INTO t2 ( id, M_Name, Y_Insert, Name varchar (100) )Matin VALUES( 12/13

NEWID(), (CAST (100000*RAND() AS INT) %12) +1, GETDATE(), '' ) GO 100 select * from t2 order by M_Name desc select 'Matin' 13/13