Execute a set of DDL's as a single script

Database
KVB
Enthusiast

Execute a set of DDL's as a single script

Hi All,

 I have a set of DDL's where I need to execute them only all the syntaxes are correct else I dont need to execute any of the statement in the script.

I tried with MSR and came to know that it supports only DML.

What's the best approach that suits this requirement.

Any help in this regard is appreciable.

Regards

KVB

3 REPLIES
Junior Contributor

Re: Execute a set of DDL's as a single script

You're running CREATEs without prior testing?

Why don't you check the DDLs in a development database?

KVB
Enthusiast

Re: Execute a set of DDL's as a single script

Yes.Those statements will be checked in DEV and QA.But as part of the automation process,we prior check and execute.

We have all the create statements in one file and DML's in another.While placing them in files,there are chances of copy/paste mistakes.

That's the reason we are trying to do this.

Any help in this regard is appreciable.

Junior Supporter

Re: Execute a set of DDL's as a single script

Did you weigh the option of using BT ET in Teradata mode in bteq? If any one of them fail, both will roll back. You need to check if DDLs are allowed in this.

.LOGON

BT; (txn #1)

INSERT row1;

INSERT row2;

ET;

.LOGOFF