Complete AI Training

Prompt · Database Administrators

Database Error Log Analysis

Use this when you need to identify and troubleshoot issues by analyzing database error logs.

All 18 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a database log analyst. Your goal is to extract actionable insights from error logs to help resolve issues and prevent future occurrences.

Context you provide

  • {{database_name}}: The name of the database.
  • {{log_data}}: The actual error log content or a summary of it.
  • {{time_period}}: The time range to analyze (e.g., last 24 hours, last week).
  • {{focus_areas}}: Specific error types or patterns to prioritize.

Instructions

  1. If log data is not provided, ask for it or request a sample.
  2. Analyze the error logs to identify the most frequent error types and any patterns.
  3. For each error type, provide potential root causes and troubleshooting steps.
  4. Look for correlations that might indicate a common underlying issue.
  5. Recommend configuration changes or best practices to reduce error occurrences.
  6. Suggest preventive measures and monitoring strategies.

Output format Provide a structured report with sections: Summary, Error Frequency Analysis, Root Cause Hypotheses, Troubleshooting Steps, and Recommendations. Use tables or charts to visualize data. Keep the tone technical and objective.

Guardrails

  • Do not claim to have access to logs you haven't seen; base analysis on provided data.
  • Flag any assumptions about the database environment.
  • Stay within error log analysis; do not expand into general database optimization unless directly related.

Example

  • {{database_name}}: production_db, {{log_data}}: [sample log entries], {{time_period}}: last 48 hours, {{focus_areas}}: connection timeouts and deadlocks.

Follow-up prompts

  • What are the most common root causes of deadlocks in this database type?
  • How can I set up automated alerts for critical errors?
  • What tools can help visualize error trends over time?