Appendix A.4 Calculating the number of instances for records

The following table shows how to calculate the number of instances for each record collected by RM for Microsoft SQL server.

Note
The number of instances is used as dynamic information about the monitored Microsoft SQL Server. Since the number of instances dynamically changes due to factors such as the number of connections with the monitored Microsoft SQL Server, use the maximum of the obtained values for your estimate.

Use sqlcmd or a similar program to access the Microsoft SQL Server to be monitored, and execute an SQL statement to obtain the number of instances. If a calculation method for the target record is provided in the table, use that method.

To use osql to obtain the number of instances:
  1. Start sqlcmd.
  2. As a user who has the following privilege, connect to the Microsoft SQL Server to be monitored:
    -sysadmin
  3. For the record for which you want to check the number of instances, execute the SQL statement shown in Table A-5.

    Table A-1 Calculating the number of instances for records

    RecordSQL statements that obtains the number of instances, and calculation method
    PIThe number of instances is 1.
    PI_PI2The number of instances is 1.
    PI_SERVThe number of instances is 1.
    PI_SRV2The number of instances is 1.
    PI_SIThe number of instances is 1.
    PDThe number of instances is 1.
    PD_CDNumber of the environment setting options
    shown in the result set when you execute the sp_configure system stored procedure.
    PD_DDSELECT count(*) FROM master..sysdatabases
    PD_DSSELECT count(*) FROM master..sysdatabases
    PD_IAThe number of instances is 1.
    PD_LDSELECT count(*) FROM master..syslockinfo
    PD_LOCKThe number of instances is 1.
    PD_PDETSELECT count(*)
    FROM ( master..sysprocesses a
    LEFT JOIN master..syslogins b ON a.sid = b.sid )
    LEFT JOIN master..sysusers c ON a.sid = c.sid
    PD_SSThe number of instances is 1.