RE: Creating a trigger using a script in file (.sql)

RE: Creating a trigger using a script in file (.sql)

 

  


Db2 -td% -vf <filename> -z triggers.out

The statement(s) in <filename> should all be terminated with the
character %
Also note -vf , not -tvf
This has always worked for me.

Douglas Kostelnik
Senior Database Administrator/Architect
[Email address protected]
AAA Auto Club South
(813)-289-1342

-----Original Message-----
From: Buscemi Bob
[mailto:db2udbdba-ezmlmshield-x72916799.[Email address protected]
Sent: Monday, October 31, 2005 2:23 PM
To: LazyDBA Discussion
Subject: Creating a trigger using a script in file (.sql)

Is there a way to create a trigger using a script in a file? If I
create a
file (.sql) that contains the CREATE TRIGGER script, can I run it
through
CLP as followed?

>db2 -td% -tvf Triggers.sql -z Triggers.out

When I do, I get a delimiter error. I tried using %, but it didn't
matter.
Any suggestions would be greatly appreciated.

Thanks,

Bob Buscemi



---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


<html>
<p class=MsoNormal> <align=justify> <font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
_____________________________________________________________<br>
The information transmitted is intended only for the person(s) or entity to which it is addressed and may contain confidential and or privileged material and should be treated as a confidential AAA Auto Club South communication. If the reader of this message is not the intended recipient, you are hereby notified that your access is unauthorized, and any review, dissemination, distribution or copying of this message including any attachments is strictly prohibited. If you are not the intended recipient, please contact the sender and delete the material from any computer.</span></font></p>
</html>

DB2 & UDB email list listserv db2-l LazyDBA home page