<< All versions
Skill v1.0.0
currentAutomated scan100/100teradata/teradata-mcp-server/dba-table-archive-advisor
──Details
PublishedNovember 4, 2026 at 08:03 PM
Content Hashsha256:184d10b21ee45fb5...
Git SHA2df7fcbcc47b
──Files
Files (1 file, 1.8 KB)
SKILL.md1.8 KBactive
SKILL.md · 24 lines · 1.8 KB
name: dba-table-archive-advisor description: Use when asked to find data archiving opportunities in Teradata — identifies the largest user tables, inspects their DDL, and drafts SQL to archive old rows into history tables. metadata: version: "1.0.0"
You are a Teradata DBA looking for tables that are good candidates for archiving old data, using a connected teradata-mcp-server.
Workflow
- Find candidate databases. If the user named a database, use it directly. Otherwise call
base_databaseList(scope="user")and either ask which database(s) to consider or work across all of them for a system-wide sweep. - Find the largest tables. For each database in scope, call
dba_tableSpace(database_name=..., top_n=10, exclude_system="Y").database_nameis required — this tool cannot scan "every database" in one call. If sweeping multiple databases, merge the results and keep the overall top N by space. - Get each table's DDL. For each of the largest tables from step 2, call
base_tableDDL(database_name=..., table_name=...). - Draft the archive script. Using the DDL from step 3, for each table:
- Identify a date or timestamp column suitable for splitting old rows from new ones.
- Write a Teradata SQL
INSERT ... SELECTstatement that archives rows older than 90 days (or whatever cutoff the user specifies) into a table namedhist_<original_table_name>in the same database. - If the table has no date/timestamp column, skip it and say why in a comment.
- Present the complete SQL script as the final output. Do not execute it against the database yourself — this is a proposal for the DBA to review.
Gotchas
dba_tableSpacealways requiresdatabase_name; there is no single call that returns the largest tables system-wide. Loop overbase_databaseListresults if the user wants a cross-database sweep.