Struttura della tabella per DB2 su un antico AS / 400
-
26-10-2019 - |
Domanda
Abbiamo una vecchia 400, dell'ordine di 10-15 anni, e ho bisogno di migrare i dati fuori di esso in modo che possa essere ritirato. Ho connettività ODBC ad esso attraverso un programma chiamato QTODBC che segnala che l'host che sto connessione a è la versione 03.01.0000. Sto cercando di tabelle di sistema di accesso in modo che possa ottenere i dati struttura della tabella e ho provato vari comandi che tutti sembrano essere scritti per le versioni successive di DB2.
Quali sono state le tabelle di sistema di back via del ritorno, allora? E come potrei tirare su nomi di schema, ammesso che li avevano con questo vecchio di una versione?
Soluzione
Your best bet for V3R1 will be to use the DSPFFD FILE(...) OUTPUT(*OUTPUT) OUTFILE(LIB/FILE)
command from a terminal session to create a file of field definitions.
There's a high chance with a system that old that the files may not even be externally described. This means that the file layout is hardcoded in each program that access the file. You can recognize this situation if you only find a few fields named F00001, K00001, etc.
Altri suggerimenti
You can retrieve the table structure quering QSYS2/SYSCOLUMNS tables.
Browse the QSYS2 library for tables and views about indexes and others.
describe output select * from creator_schema.tablename
This worked for me.