Archives of the TeradataForum
Message Posted: Fri, 10 Aug 2007 @ 18:45:54 GMT
This bteq script will generate separate files for a variety of object types in one or more databases. You could combine it with Robert Hanson's unix script to limit to a single table. This would become the infile text for that exec bteq <<BTQEND call.
.os rm runme.btq .export file=runme.btq select x.txt (title '') from ( select 1 stp, tablekind, tablename, '.export file=' || trim(databasename) || '.' || trim(tablename) || '.ddl' txt from dbc.Tables t where databasename in (>br>
I've not included it, but it's run from a unix script that tacks on the logon string and cleans up afterward. (It uses the generated files to check any DDL changes into an RCS repository. So in addition to our regular change control, we have a parallel version that represents day- over-day changes that are actually present in production.)
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|