Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Oracle Database wikipedia , lookup
Tandem Computers wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Microsoft Access wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Team Foundation Server wikipedia , lookup
Database model wikipedia , lookup
Clusterpoint wikipedia , lookup
Relational model wikipedia , lookup
IBM® Tivoli® IBM Tivoli Composite Application Manager for Microsoft® SQL Server Agent KB Notes and HOW TOs CONTENTS 1. Overview ........................................................................................................................... 3 1.1 1.2 1.3 2. Introduction .................................................................................................................. 3 Terms and abbreviations .............................................................................................. 3 User Guides ................................................................................................................. 3 HOW TOs .......................................................................................................................... 4 2.1 How to configure Agent ................................................................................................ 4 2.2 How to Configure Agent in Cluster ............................................................................... 6 2.3 Domain user account configuration steps & windows authentication issue. ................ 6 2.4 How to enable / reload Perfmon counters? .................................................................. 6 2.5 Verify if the MSSQL performance counters have been enabled on the system running the SQL server. ..................................................................................................................... 7 3. Environment Variables..................................................................................................... 8 4. Problems, Symptoms, Solutions .................................................................................. 10 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 Agent failed to connect SQL Server because database is not connected.................. 10 Blank Configuration window issue ............................................................................. 10 SQL Server 2000 Support and ITM Frameworks ....................................................... 10 Table details collection Taking Time ........................................................................... 11 Crash or Hang issues due to Event Errorlog ............................................................. 11 Unable To see Configuration Panel ........................................................................... 11 Database Detail and Device Detail Calculation Steps ................................................ 12 koqos.exe crash issue ............................................................................................... 16 Upgrade 64 bit v6.2 Agent from previous version 32 bit ............................................ 16 1. Overview 1.1 Introduction This document lists and provides solutions to common problems faced by customers of IBM Tivoli MS SQL server Monitoring Agent The intended audience of the document is Level 2 personnel for IBM Tivoli MS SQL Server Monitoring Agent and the customers of the product. Various sections of the document refer to configuration of agent, setting environment variable and troubleshoot ways to solve various problems occurring in customer environment. 1.2 Terms and abbreviations Term / Abbreviation IBM ITM MS L3 PDF TEP 1.3 User Guides Please refer following user guides. sqlagent623_user.pdf. Description International Business Machines IBM Tivoli Monitoring Microsoft Level three support Adobe Postscript Data Format Tivoli Enterprise Portal 2. HOW TOs 2.1 How to configure Agent You can install and configure the Microsoft SQL Server agent locally or remotely using a GUI or command line. Note: the “Table Detail Continuous Collection” option is available from v6.3.0 onwards. Following is the list of configuration settings. S r. N o. 1 Configuration Attribute Description / Configuration value Server Name Name of the SQL Server instance that is to be monitored. 2 Login 3 Password 4 Home Directory Error Log File Windows Authentication Support Long Lived Database Connections 5 6 7 8 9 Extended Parms Include Please refer User Guide for Details. If monitoring the SQL Server Default Instance, use host name, else use SQL Server Instance name Login is required only when windows authentication parameter is set to False. Password for SQL User, in case it is SQL Authentication. Password is required only when Windows Authentication parameter is set to False. Home Directory path of the SQL Server Instance being monitored. Fully qualified location and name of the SQL Server Error Log. Enables or disables Windows Authentication Enables or disables long lived database connections The following attribute groups do not use Long Lived Database Connections: 1 MS SQL Text 2 MS SQL Filegroup Detail 3 MS SQL Server Summary Disables capture of Table Detail attributes Use this feature to filter databases that you want to monitor. 2.2 How to Configure Agent in Cluster Whenever we try to add agent & collector services in cluster, then make sure first these services has been stopped before adding the services in cluster. After that make the service type as Manual. For Detail steps to configure Agent in cluster please refer SQL Server Agent User Guide. 2.3 Domain user account configuration steps & windows authentication issue. User must check 'Windows Authentication' checkbox in agent configuration, if the Microsoft SQL Server Agent service is configured to use Windows User. This user account will be used to access the Microsoft SQL Server, and hence this account needs to have rights on the SQL Server. Same is the case for Collector Service. 2.4 How to enable / reload Perfmon counters? The agent collects most of the data from Perfmon objects provided by Microsoft. In certain cases, the agent doesn‟t display data on the TEP for certain counters. The reason behind this could be the counters haven‟t been loaded / enabled on the machine where the agent is running. Enabling / reloading the concerned counters could solve the problem of data not being displayed on the TEP. If you see the below message in the collector log file :UEX2492E KDDNTREG(4874) write_title_lst(): SQL Server Instance performance data is not enabled! or …. Failure during creation of perflib counter index file; rc = 8 Below are the steps to unload & load the perfmon counters :For Default instance:1)To unload the perfmon counter :- execute below command on windows command prompt. unlodctr MSSQLSERVER 2) To Load perfmon counter :- execute below command on windows command prompt. lodctr <SQL Server Path>\binn\sqlctr.ini For Named instance :--------------------------1) To Unload the perfmon counters, execute below command on windows command prompt. unlodctr MSSQL$<instance_name> Note:- <instance_name> is SQL server instance name. 2) To Load the perfmon counters, execute below command on windows command prompt. lodctr <SQL Server path>\binn\MSSQL$InstanceName.ini 2.5 Verify if the MSSQL performance counters have been enabled on the system running the SQL server. This can be done using the perfmon utility as follows: 1. Start the perfmon utility. 2. Click the '+' symbol 3. Check whether SQLServer:Databases, SQLServer:Buffer Manager, etc. are available on the 'Performance object' dropdown list. 3. Environment Variables Note: Some of the Environment variables may not be available in older SQL Agent versions. COLL_ALERT_SEV:This environment variable is added to manage output of problem details and problem summary attribute groups. By default in the problem detail workspace we see the error messages whose severity is 17 and greater. If we want to see the error message below 17 then need to use this variable with severity above which error message will be displayed on portal. E.g. if the value for this variable is set as 10, then the severity 10 and greater will be displayed on portal. WAIT_TIMEOUT:If any of the cursors (attribute groups) takes more than 45 seconds to collect data then in that case agent might hang or situations will be fired incorrectly. Using this variable we can increase the wait time between agent exe and collector exe. We can check cursors which may be taking more than 45 seconds. QUERY_TIMEOUT:Whenever any of the database objects (like views/tables/stored procedures) is in locked state then none of the application will be allowed to fire query on SQL server. Query fired by the agent will be in wait state till SQL server object becomes free to execute next query. So in this case agent might hang & data will not be displayed on portal. So using the above variable we can limit the time to which agent will wait for response from SQL server to the fired query, if response is not received in the specified time then that query will be killed by SQL server & agent will go ahead & display the other data. Note:- For huge number of tables/databases/jobs etc. this will not work as whole collection will not completed in the specified 45 seconds because query timeout for all queries will be cumulative I.e. for KOQDBD collection there are let's say 10 queries required to fetch data for 1 databases. If we have set query timeout of 10 sec, then for one database it requires 10*10=100 seconds, so for 4 databases it goes to 400 seconds so in this case query timeout will not work. COLL_DBCC_NO_LOCK:If some of the queries from database detail & device detail workspaces take more time to execute then in that case we can use this variable to fire query with option „WITH (NOLOCK)‟ so that query fired on the SQL server will not wait if object on which query fired is locked. COLL_WRAPLINES:Maximum number of lines in one “col.out” file is defined in this variable. By default it is set to 30,000 lines (about 2 MB). Note: from the release v6.3.0 onwards, the default value is 90,000 lines COLL_NUMOUTBAK:By default only one backup of col.out files are created. In case user wises to make more backup copies, set this variable, like as follows, If number of files to be backed up is, 1. less than 10, set the number directly, e.g. 1 or 3 or 9 2. less than 1000, and greater than 9, set number starting hyphan symbol (-) e.g. -10 or -352 or -500 etc. COLL_DEBUG:If we want to enable full tracing of collector then set it to 'dddddddddd' (10 times „d‟) COLL_CLUSTERSERVER:Whenever SQL server is in a cluster then this variables value must be the name of the virtual server (i.e. name of the cluster) KOQ_NAMED_INSTANCE:For default instance this variables value must be 0 & for named instance it must be 1. COLL_PORT:If SQL server instance is configured on non-default port (e.g. port other than 1433), user needs to set this variable to specify the port number to monitor the SQL Server Instance. COLL_JOB_DISABLED:A new environment variable has been added named 'COLL_JOB_DISABLED', which can be set by user. The variable has been introduced for not displaying the information of the disabled jobs in the job details workspace. Set this variable to “1”, so disabled jobs will not be displayed, set it to “0” otherwise. By default all jobs will be displayed. Note: this variable is available from v6.2.3.1 onwards. COLL_KOQDBD_INTERVAL:A new environment variable has been added named 'COLL_KOQDBD_INTERVAL‟ which can be set by user. If user has large number of databases, then the KOQDBD collection takes longer time, in this case if user does not want frequent collection, he can set the interval time between two consecutive collections by setting the above environment variable. Note: this variable is available in v6.2.3.1 IF01 onwards 4. Problems, Symptoms, Solutions 4.1 Agent failed to connect SQL Server because database is not connected If we see problem in connection that is agent fail to connect to SQL server then we need to check following check if SQL User and password is correct. Check from control panel if you can connect to SQL Server from ODBC Use Microsoft utilities like osql.exe for SQL Server 2005 and sqlcmd.exe for SQL Server 2008 - Open Command Prompt Change directory to <SQL Server Path>\90\tools\binn execute the following commands, 1. Test connection to SQL Server 2005 command with windows authentication:For Default instance osql.exe -E -S <SQL Server Name> Named instance :osql.exe -E -S <Computer Name\Instance Name> 2. Test connection to SQL Server 2008 with windows authentication:Default instance sqlcmd.exe -S <SQL Server Name> Named instance :sqlcmd.exe -S <Computer Name\Instance Name> 4.2 Blank Configuration window issue Sometimes user may see no values in the configuration window. This happens if agent does not find all required registry entries for SQL Server instance under HKEY_LOCAL_MACHINE\SOFTWARE\Candle tree. In this case click on 'New' button in configuration window and provide the required parameters. Also verify if registry value for KOQ_NAMED_INSTANCE is set, zero (0) for default instance and one (1) for named instance. 4.3 SQL Server 2000 Support and ITM Frameworks Support of SQL server 2000 has been deprecated from SQL Server Agent version 621 (IBM Tivoli Monitoring for Microsoft Applications v620) and later. Please refer the following table for the SQL server 2000 and ITM support. SQL Agent version MSSQL 6.2.0 MSSQL 6.1.2 MSSQL 2000 y y MSSQL 6.2.1 n MSSQL 6.2.1.1 n MSSQL 6.2.2 n MSSQL 6.2.3 n ITM versions ITM 6.2.0 or higher ITM 6.1.0 Fix Pack7 or higher ITM 6.2.0 Fix Pack1 or higher ITM 6.2.0 Fix Pack1 or higher ITM 6.2.1 Fix Pack1 or higher ITM 6.2.2 Fix Pack2 or higher 4.4 Table details collection Taking Time Whenever there is large number of tables in customer environment, the agent hangs or no data is displayed on portal. Following is solution for said problem, For v620 IF15, 622, and 623, user needs to enable the 'Table Detail Collection Settings' through MTEMS windows. For rest of the agent, user needs set the value “KOQTBLD” in the edit box “Extended Parms” available in Agent Configuration window Note: Use this setting only if the KOQTBLD (Table details) takes more than 45 seconds. For details refer the user guide of the latest release of SQL Server Agent. 4.5 Crash or Hang issues due to Event Errorlog MS SQL Error Event Details – New attribute group is added in SQL agent version 6.2.3. Whenever Errorlog file gets updated, and if that message has severity greater than default severity (i.e. 17) then this message will be immediately displayed on portal. If user wish to see the previous messages, then user needs to set following environment variables COLL_ERRORLOG_STARTUP_MAX_TIME COLL_ERRORLOG_STARTUP_MAX_EVENT_ROW COLL_ERRORLOG_MAX_EVENT_ROW Note: for details about these variables, please refer user guide. As this newly added attribute group is not available in default query or any workspace, user need to create new query and workspace. 4.6 Unable To see Configuration Panel If we are not able to see configuration panel by right clicking on 'Configuration using defaults' on the Template for SQL server in MTEMS window then this issue is related with framework & not the agent side issue. 4.7 Database Detail and Device Detail Calculation Steps Database Details: 1. 2. 3. 4. Data Size (MB) Data Free Space (MB): Database Max Growth Size (MB) : Database Growth Percentage (MB) A] Data Size (MB): This value is getting from performance monitor. DB size (MB) = {Value getting from Perfmon * 100} / 1024. Tip: Multiply by 100 for ODI/Portal precision E.g. in above case it is 4 MB B] Data Free Space (MB): Case 1: a. Enable Auto Growth = on b. File Growth = in Percentage c. Maximum File Size = Unrestricted File Growth. DB free (MB) = Drive Free Space. E.g. if data base file drive is c: and it has 13.5 GB free space then Data Freespace (MB) is 13824 MB. Case 2: a. Enable Auto Growth = on b. File Growth = in Percentage c. Maximum File Size = 100 MB. DB free (MB) = Data base maximum size – Data Size (Calculated in previous step). E.g. In this case 100 MB - 4MB = 96 MB Case 3: a. Enable Auto Growth = off To calculate this we have to calculate the free number of pages available in the file and we are getting this by using below queries. USE ‘Databasename’ select TotalPages = sum(convert(dec(15),size)) from sysfiles where (status & 64 = 0) select Reservedpages = sum(a.total_pages) from sys.allocation_units a DB free (MB) = ((TotalPages – Reservedpages)*8)/1024 C] Database Max Growth Size (MB): Data_Max_Growth_Size = DB size (MB) + DB free (MB). DB size (MB): Calculated in [A]. DB free (MB): Calculated in [B]. D] Database Growth Percentage (MB): Data_Max_Growth_Pecentage = (DB size (MB) / (DB size (MB) + DB free (MB))) * 100; E] Data File Free Spaces [MB] USE ‘Databasename’ select TotalPages = sum(convert(dec(15),size)) from sysfiles where (status & 64 = 0) select Reservedpages = sum(a.total_pages) from sys.allocation_units a Data File Free Spaces (MB) = ((TotalPages – Reservedpages)*8)/1024 E] Aggregate Free Space [MB] Aggregate Free Space = Data File Free Spaces [MB] + DB free (MB). Device Details: Device Size (MB) and Device Free Space (MB): Case 1: Enable Auto growth = on Maximum file size = Unrestricted file Growth. Device Size (MB): Device Free Space (MB): Drive Size. Free Drive Size Case 2: Enable Auto growth = on Maximum file size = Restricted file Growth (100 MB). Device Size (MB): Device Free Space (MB): step [A]) Maximum File Size (in above case it is 100 MB). Maximum File Size (MB) – Data Size (MB) [Calculated in Case 3: Enable Auto growth = off Device Size (MB): Data Size (MB) (Calculated in step [A]) For calculating the Device Free space, use the following query. USE NameOfDataBase select fileproperty('NameOfDataBase','spaceused') As 'allocated' Allocation = (allocated *8 )/1024 Device Free Space (MB): Device Size (MB) – Allocation 4.8 koqos.exe crash issue koqos.exe gets crashed whenever the OS related performance counter are disabled. (i.e. Counter from PerfOS.dll, PerProc.dll ).We can use the 'exctrlst.exe' to enable/disable the counters. 4.9 Upgrade 64 bit v6.2 Agent from previous version 32 bit User can upgrade any lower SQL agent version to the latest one however upgrading to 64 bit v6.2.3 SQL Server Agent from all earlier 32 bit SQL Server Agent is not possible. Following are the steps for upgrading 623 64 Bit SQL Agent. 1. Uninstall existing 32 Bit agent. 2. Install SQL 623 64 bit. Note: Once the agent is upgraded to upper versions like SQL Agent v623, user has to reconfigure the agent.