liveBook · Manning

Chapter 10: Database administration and development

What you will learn in chapter 10 of AI for Everyday IT

This chapter introduction positions AI as a bridge between database development and administration work and previews its use across SQL, optimization, maintenance, and advanced DBA tasks.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This chapter introduction positions AI as a bridge between database development and administration work and previews its use across SQL, optimization, maintenance, and advanced DBA tasks.

Key terms: administrative DBAs, development DBAs, database structure, application performance, AI tools, SQL syntax, administrative tasks, query creation, object creation, query optimization

10.1 Query and object creation basics

This section shows how chatbots can generate basic SQL queries and DDL tailored to database tasks, including DMV-based performance investigation and secure table design.

Key terms: SQL, DDL, T-SQL, CREATE TABLE, Dynamic Management Views, DMVs, sys.dm_exec_procedure_stats, stored procedures, total elapsed time, average elapsed time

10.2 Query optimization

This section shows how to use chatbots to analyze and improve database-query performance while supplying useful context and independently validating every proposed change.

Key terms: query optimization, execution plans, bottlenecks, query syntax, table schema, existing indexes, query plans, filtered index, common table expression (CTE), expected output format

10.3 Code documentation

This section shows how ChatGPT can turn a SQL Server performance query into ready-to-use code documentation with comments, explanations, assumptions, and usage examples.

Key terms: code documentation, comments, purpose of the query, expected output format, assumptions made, examples of usage, stored procedures, top 10, ExecutionCount, AvgElapsedTime

10.4 Heterogeneous database environments

This section introduces AI chatbots as teachers and translators that help DBAs transfer knowledge across multiple database platforms.

Key terms: heterogeneous database environments, AI chatbot, DBA, teacher, translator, syntactic knowledge, SQL syntax, interactive quiz, analogies, SQL syntax conversion

10.4.1 Staying up to date

This subsection shows how chatbots help DBAs stay current on database versions and licensing, learn difficult concepts through lay analogies, and communicate database responsibilities clearly.

Key terms: database engine, SQL Server 2022, Software Assurance, Oracle 23ai, Oracle 19c, Data Pump export, meta-prompt, [In lay terms], SQL Server transaction log, transaction log file

10.4.2 Teaching an old DBA new tricks

This section shows how an experienced SQL Server DBA can use AI and targeted prompt techniques to translate Oracle concepts and turn imperfect database inputs into usable SQL Server artifacts.

Key terms: Oracle, SQL Server, data types, DDL, CREATE TABLE, external tables, persona, instructor, constraints, table format

10.5 Maintenance jobs

This section explains how AI can assist DBAs with maintenance and recovery tasks while emphasizing regular validation, reliable documentation, and human oversight.

Key terms: recoverability, administrative DBA, default configurations, backups, maintenance, backup strategy, maintenance strategy, database maintenance, SQL Server Maintenance Solution, Ola Hallengren

10.6 Advanced administration

This introduction frames advanced DBA work around automation, data collection, reporting, and ongoing review to detect emerging database problems before operations are affected.

Key terms: automation, data collection, reporting, DBA, configurations, performance, data volumes, usage patterns, bottleneck, analysis

10.6.1 AI + dbatools = <3

This section shows how AI can generate and adapt dbatools PowerShell scripts to collect SQL Server administration data for reporting and automation.

Key terms: dbatools, PowerShell, SQL Server Registration, sysadmin privileges, HTML-formatted email, Write-DbaDataTable, PowerShell object, SQL Server table, SQL Server Agent job, centralized data

10.6.2 Analyzing memory configurations

This section shows how to use an AI chatbot to generate and refine a query that detects Oracle database instances with excessive memory use from collected configuration data.

Key terms: centralized SQL Server inventory database, server metrics, SQL Server Agent job, memory configurations, vOracleMemoryConfigs, memory_target, memory_max_target, pga_aggregate_target, sga_max_size, PhysicalMemory

10.6.3 Additional advanced administration prompts

This section shows how stronger, reusable AI prompts can extend SQL Server administration work while requiring attention to security and professional guidance.

Key terms: good prompt, better prompt, chatbot, best practice recommendations, detach, attach, stored procedure, parameters, database name, terminate connections

10.6.4 The role of the DBA in the AI era

This subsection argues that AI should augment rather than replace DBAs because human contextual, ethical, and legal judgment remains essential, then transitions the book toward development tools.

Key terms: data modeling, business requirements, logical data structures, contextual awareness, domain knowledge, stakeholders, sensitive data, regulatory compliance, data governance, ethical standards

10.7 Prompts used in this chapter

This section lists example prompts used for SQL Server development, DBA-role clarification, prompt refinement, and PowerShell syntax highlighting.

Key terms: SQL Server, Administrative DBA, Development DBA, optimized prompt, asciidoc, PowerShell, less effort, syntax highlighting, shell

10.8 Summary

This summary recaps how AI chatbots support database administrators with SQL, optimization, cross-platform work, maintenance, third-party tools, and advanced administration.

Where this is used later

Concepts explained in this chapter

← Chapter 9: Systems administration Chapter 11: Code assistants and development tools →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.