REWRITE ADD Command | bcmadmin | Teradata Business Continuity Manager - REWRITE ADD - Teradata Business Continuity Manager

Teradata® Business Continuity Manager User Guide - 2.02

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Business Continuity Manager
Release Number
2.02
Publication Date
March 2026
Content Type
User Guide
Publication ID
B035-2550-125K
ft:locale
en-US
ft:lastEdition
2026-03-19
dita:mapPath
yae1762370477731.ditamap
dita:ditavalPath
ft:empty
ft:sourceId
dita
dita:id
otc1639627713801
Product Category
Analytical Ecosystem

Purpose

Adds query rewrite patterns.

Syntax

REWRITE ADD id input regexp output regexp ;

Parameters

id
A unique string to identify the specific Rewrite Rule.
input regexp
The Tool Command Language (TCL) regular expression that enables matching SQL from a client.
To make sure that only the SQL required is matched, make the input regexp pattern be as specific as possible. Include a ^ at the beginning and a $ at the end of each pattern.
output regexp
The SQL regular expression that Business Continuity Manager generates and sends to Teradata.

Example

The following rewrite pattern forces all selected files on table myDb.myTable that does not have a where clause to use ACCESS locks.

bcmadmin>  REWRITE ADD forceAccessOnMyTable "^SELECT(.*)FROM myDb.myTable$" "LOCKING TABLE myDb.myTable FOR ACCESS SELECT \1 FROM myDb.myTable"; 
Rewrite rule add request completed successfully