DEMO blocking sessions
Job details
Name: |
DEMO blocking sessions |
Platform: |
Sqlserver |
Category: |
Demo |
Description: |
Creates tables that can be used to simulate blocked sessions in the database. |
Long description: |
Creates tables that can be used to simulate blocked sessions in the database. |
Version: |
1.0 |
Default schedule: |
0 1 1 * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2000′ & hasengine=‘YES’ & engine_edition = ‘Microsoft SQL Server’] |
Parameters
Name |
Default value |
Description |
reset data |
NO |
If YES the procedure will reset demo data. |
Job Summary
- Purpose: The primary function of this job is to create and manage tables that simulate blocking sessions in the database.
- Why: This job is crucial for testing and demonstrating how blocked sessions affect database performance and operations. By simulating these conditions, users can better understand and develop strategies for managing real blocking scenarios in production environments.
- Manual checking: You can manually verify the state of the simulated data and blocking sessions by issuing the following SQL command:
SELECT * FROM dbw_demo_blocking_session_tab;
Key Components and Features
- Creating Simulation Environment: The job automatically creates a table named ‘dbw_demo_blocking_session_tab’ and populates it with demo data representing different moons and their radii.
- Reset Capability: A parameter ‘reset data’ allows for the resetting of demo data if set to ‘YES’.
- Automatic Data Management: If reset is triggered, the table is cleared and repopulated with the default data set.
- Error Management: The task includes error handling mechanics to log and manage errors occurring during the procedure execution.
Dependency and Cleanup
- This job has an inherent dependency on itself and another table used for the simulation. If there are failures, cleanup mechanisms are triggered.
- Dependencies:
- Primary: The job ‘dbw_demo_blocking_sessions_proc’
- Secondary: The dependency table ‘dbw_demo_blocking_session_tab’
Installation and Execution Details
- Automatic Installation: The job supports express and forced installation, indicating straightforward deployment on compatible systems automatically without manual configurations.
- Compatibility: Suitable for Microsoft SQL Server instances with major version numbers greater than 2000, which have the database engine installed.
- Scheduled Execution: It is configured to run automatically based on the schedule defined in ‘default-schedule’.
Reporting and Output
- A report template is designed to display the data within the simulation table in a formatted way.
- Report Features:
- Title: DEMO blocking sessions table
- Information: Presents data regarding the moons and their respective sizes.
- SQL Command Used: “SELECT * FROM dbw_demo_blocking_session_tab”
- Table Display: The results are shown in a table format, focusing on moon names and radii.
Conclusion and Utility
This dbWatch job is an essential tool for educational purposes, demonstrations, and testing scenarios related to database blocking. It offers a controlled environment to experiment with and study the impacts of database session blocking, accompanied by easy reset and data management functionalities.