control-sessions

Identify and terminate problematic database sessions using MCP tools.

7|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/teradata-labs/claude-cookbooks --skill control-sessions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: control-sessions
Source: https://github.com/teradata-labs/claude-cookbooks/tree/main/skills/operations/workloadmanagement/control/control-sessions
Command: npx skills add https://github.com/teradata-labs/claude-cookbooks --skill control-sessions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides the ability to manage and control active database sessions, addressing issues like runaway queries, blocking situations, and hung sessions to ensure system health.

Core Features & Use Cases

  • Session Identification: View all active sessions and identify resource-heavy or blocking ones.
  • Session Investigation: Review the SQL activity of specific sessions.
  • Session Termination: Safely terminate problematic sessions with documented reasons.
  • Use Case: When a query is consuming excessive CPU and impacting system performance, this skill can identify and terminate that specific session to restore normal operations.

Quick Start

Use the control-sessions skill to terminate session ID 12345.

Frequently Asked Questions about control-sessions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I terminate a runaway query that is consuming excessive database resources?

To terminate a runaway query, you identify the active database session consuming excessive resources and execute a termination command to safely stop that specific process, restoring normal system performance.

What is the best way to resolve blocking sessions in a database?

The best way to resolve blocking sessions is to identify the active processes holding locks, investigate their SQL activity, and terminate the specific blocking process to clear the bottleneck and restore system health.

How do I view active database sessions to investigate performance issues?

You view active database sessions by executing session identification commands, which list all running processes so you can monitor resource-heavy queries and review the specific SQL activity of unresponsive or blocking sessions.

Can I safely terminate unresponsive database sessions without causing system instability?

Yes, you can safely terminate unresponsive database sessions without causing system instability by using dedicated session management commands, which stop the problematic process while maintaining overall operational database health and normal operations.

When should I use session management to handle hung queries instead of waiting for them to finish?

You should use session management to handle hung queries when they are impacting system performance or causing blocking situations. Terminating these unresponsive sessions proactively ensures database stability and restores normal operations for other active queries.