Re: Oracle has Spool file; DB2 has ??

Re: Oracle has Spool file; DB2 has ??

 

  

I am on Windows Platform -- using DB2/UDB v9.1

Ideally, I'd like to run a SQL from within the Command Editor -- pipe to
an output file -- and run this output file as a "Task" ...

The pipe below "db2 ... > sqlstats.out" works great in the Command Window
but not in the Command Editor ... anyone help !!


Bob Khosla





"hsteiner" <db2udbdba-ezmlmshield-x58326449.[Email address protected]
11/22/2006 12:06 PM

To
"LazyDBA Discussion" <[Email address protected]
cc

Subject
Re: Oracle has Spool file; DB2 has ??






Are you looking for something like this:

db2 -x "select 'reorg table '||rtrim(tabschema)||'.'||rtrim(tabname)||';'
from syscat.tables" > sqlstats.out

db2 -tvf sqlstats.out

Best, Hal Steiner

-----Original Message-----
From: db2udbdba-ezmlmshield-x48183727.[Email address protected]
To: [Email address protected]
Sent: Wed, 22 Nov 2006 1:51 PM
Subject: Oracle has Spool file; DB2 has ??


What is an equivalent of an Oracle spool file in DB2?
That is, how can you spool some output from some sql into a spool file and

have it executed as a file ...


Bob Khosla


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
________________________________________________________________________
Check out the new AOL. Most comprehensive set of free safety and security
tools, free access to millions of high-quality videos from across the web,
free AOL Mail and more.


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




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