Database operations and health monitoring. USE FOR: PostgreSQL health check, database backup, database restore, connection string, database migration, database monitoring. DO NOT USE FOR: Azure infrastructure provisioning (use azure-cli), Terraform IaC (use terraform-cli), full platform deployment (use deploy-orchestration).
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Database operations and health monitoring. USE FOR: PostgreSQL health check, database backup, database restore, connection string, database migration, database monitoring. DO NOT USE FOR: Azure infrastructure provisioning (use azure-cli), Terraform IaC (use terraform-cli), full platform deployment (use deploy-orchestration).
When to Use
Database health checks
Connection verification
Performance monitoring
Backup status verification
Prerequisites
Azure CLI for Azure databases
psql for PostgreSQL operations
Appropriate database credentials
Commands
Azure PostgreSQL
# List PostgreSQL servers
az postgres flexible-server list -o table
# Show server details
az postgres flexible-server show --name <server> --resource-group <rg>
# Check firewall rules
az postgres flexible-server firewall-rule list --name <server> --resource-group <rg>
# Check backup retention
az postgres flexible-server show --name <server> --resource-group <rg> --query "backup"
Connection Testing
# Test PostgreSQL connection
psql "host=<host> dbname=<db> user=<user> sslmode=require" -c "SELECT version();"# Check active connections
psql -c "SELECT count(*) FROM pg_stat_activity WHERE state = 'active';"
Health Monitoring
# Check database size
psql -c "SELECT pg_size_pretty(pg_database_size(current_database()));"# Check table sizes
psql -c "SELECT schemaname, tablename, pg_size_pretty(pg_total_relation_size(schemaname||'.'||tablename))
FROM pg_tables ORDER BY pg_total_relation_size(schemaname||'.'||tablename) DESC LIMIT 10;"