db2 luw - How to unload data of syscat.tables on my prod db on instance1 -


how unload data of syscat.tables on prod db on instance1 on host , load data dev db on instance2 on host , want compare list of table names on dev db can correct table definitions.

do have use load , unload command let me know if not clear

if you're comparing table names , not else, can unload information text file via export command.

db2 "export tablenames.csv of del select tabschema, tabname syscat.tables order tabschema, tabname"

another way capture output of select statement -z option of command line processor (clp).

db2 -z tablenames.txt "select tabschema, tabname syscat.tables order tabschema, tabname"

that said, serious effort compare , contrast table definitions of different db2 databases should involve db2look command, can reverse-engineer db2 object set of ddl statements. highly recommend it.

regardless of how decide generate details each database, you're have easier time comparing them text files rows inside database. diff command has been around on forty years, , newer implementations such winmerge , beyond compare make quick work of identifying discrepancies in largest sets of text files.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -