By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,558 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,558 IT Pros & Developers. It's quick & easy.

Need to extract schema only from db2 on old version of AIX

P: 2
Is there a way to grab the schema only for a database ? I know that exporting tables needed to ixf holds it, but I just want the schema only.
Sep 21 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 297

if you just need the names of the schematas, you could do with a "select distinct schema_name from sysibm.systables" (schema_name maybe incorrect, but there's a column in there for the schema names.)

Another possibility I'm using in my bash scripts on Linux is

Expand|Select|Wrap|Line Numbers
  1. db2 -x list tables for all | awk '{print $2;}' | sort | uniq
Regards, Bernd
Sep 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.