Need examples of UDB UNIX Scripts

Richard Hagedorn

Need examples of UDB UNIX Scripts
Hello,

Does anyone have links to collections of UNIX scripts for UDB DB2 on AIX?

I need examples of load/import sql from a central instance to multiple remote instances.

Also, in Oracle, I can shut off FEEDBACK and supress headings and row counts, page breaks, etc. Is there a way to perform the same function in UDB script? I need to create output data files, comma delimited (no problem here), but need a Q&D way to either strip out the headings, etc., or supress them in the output file.

Any referral or examples are appreciated.

Thanks, Richard




_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Steve Westfall

Re: Need examples of UDB UNIX Scripts
(in response to Richard Hagedorn)
Richard,

The "-x" option on the command line processor turns off all those extraneous
messages, and it is frequently useful when running scripts. For example:

db2 -xf myscript.sql

will run the script in the file myscript.sql and return the actual data, but it
will omit the headings, row counts, etc.

This can be useful inside UNIX scripts too. For example:

for TBL in `db2 -x "select tabname from syscat.tables where tabschema =
"MYSCHEMA" order by tabname"`
do
db2 -v "runstats on table myschema.$TBL with distribution and detailed
indexes all shrlevel change"
done

builds an alphabetized list of all tables in the MYSCHEMA schema and runs
runstats on each. The "-x" option is used with the first invocation of the
command line processor to avoid storing anything but table names in the TBL shell
variable. In the second invocation, however, I used the "-v" (verbose) option so
that I can see the progress of execution as it loops through the table names.

I can send you some load script examples offline.

Steve Westfall
Equifax, Inc.
Lombard, Illinois





Richard Hagedorn
<richard_hagedorn@ To: [login to unmask email]
EXCITE.COM> cc:
Sent by: DB2 Data Subject: [DB2-L] Need examples of UDB UNIX Scripts
Base Discussion
List
<[login to unmask email]
RG>


01/08/2005 07:45
PM
Please respond to
richard_hagedorn





Hello,

Does anyone have links to collections of UNIX scripts for UDB DB2 on AIX?

I need examples of load/import sql from a central instance to multiple remote
instances.

Also, in Oracle, I can shut off FEEDBACK and supress headings and row counts,
page breaks, etc. Is there a way to perform the same function in UDB script? I
need to create output data files, comma delimited (no problem here), but need a
Q&D way to either strip out the headings, etc., or supress them in the output
file.

Any referral or examples are appreciated.

Thanks, Richard




_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page
at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or
Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List
Admins can be reached at [login to unmask email] Find out the latest on
IDUG conferences at http://conferences.idug.org/index.cfm






This message contains information from Equifax Inc. which may be confidential and
privileged. If you are not an intended recipient, please refrain from any
disclosure, copying, distribution or use of this information and note that such
actions are prohibited. If you have received this transmission in error, please
notify by e-mail [login to unmask email]

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Paul Turpin

Re: Need examples of UDB UNIX Scripts
(in response to Steve Westfall)
There are some scripts posted at:
http://db2eug.uni.cc/

You can find additional scripts and information at:
http://www.db-hq.net/

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm