* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download BSM to DB active connections
Extensible Storage Engine wikipedia , lookup
Microsoft Access wikipedia , lookup
Concurrency control wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Oracle Database wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Versant Object Database wikipedia , lookup
ContactPoint wikipedia , lookup
Database model wikipedia , lookup
Clusterpoint wikipedia , lookup
Relational model wikipedia , lookup
Title: How to show active connections from BSM application to the database(s) [Oracle and SQL] Why: This can be used to show if connection pool limitation needs to be increased, or to correlate slow performance of BSM because there isn’t enough objects in the pool for their installation. This more likely will occur in Large and Extra-Large installations. SQL Server: Use Master /* this query uses the Master DB */ Go SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as NumberOfConnections, loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid, loginame 1 But this will give me all of the databases on that database server, so by filtering we can only show the important information. Example Use Master Go SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as NumberOfConnections, loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 and DB_NAME(dbid) like '%Colin/Joe/Dave%’ GROUP BY dbid, loginame ** Result bsm9_colin_mgmt 14 bsm9_colin_RTSM 47 bsm9_colin_RTSM_history 2 bsm9_colin_event 2 bsm9_colin_profile 5 ** 2 Modifying this query we can get a total count for just those databases. SELECT COUNT(dbid) as TotalConnections FROM sys.sysprocesses WHERE dbid > 0 and DB_NAME(dbid) like '%colin%' **Result** Totalconnections 72 *** **note** This number represents a sum of both the active, and the inactive connections. Create SiS Monitor for SQL Server: You can then create a Database Query Monitor on SiS to track how many connections are going on. An alert can be created if the number gets too high, or if the number is always around the limit then increasing it would be recommended. *note you need to download the Mircosoft SQL driver. Follow steps on pg 210 Monitor Reference guide. 3 Example of SiS query to monitor connections, for SQL. Database Connection URL: jdbc:sqlserver://<IP Address>:1433;DatabaseName=master Database Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver Query: SELECT COUNT(dbid) as TotalConnections FROM DB_NAME(dbid) like '%colin%' sys.sysprocesses WHERE dbid > 0 and 4 Then look at ‘Result Column 1’ 5 Oracle: Here is a generic query, that utilizes the pre-created v$session view. select count(*) username from v$session where username !='NULL' This will show all of the active connections, but probably includes more information than is necessary. Adding a filter, you can only show the information you care about. Here are some examples: select count(*), username from v$session where username like '%BSM%' group by username *note this count includes both Active and Inactive connections. Each has a default of 40, (total 80). Then to get a total count: select count(*) from v$session where username like '%BSM%' 6 Create SiS monitor for Oracle: You can then create a Database Query Monitor on SiS to track how many connections are going on. An alert can be created if the number gets too high, or if the number is always around the limit then increasing it would be recommended. 7 Database connection URL: jdbc:mercury:oracle://16.71.200.82:1521;sid=orcl Database driver: com.mercury.jdbc.oracle.OracleDriver Query: select count(*) from v$session where username like '%BSM%' Then look at ‘Result Column 1’ 8