RtvSql-Retrieve SQL source statement
Cette page
a été mise à jour le
14 septembre 2009.
Contact |
Versionning
last version : The SaveFiles
Avez vous
déjà utilisé le "SQL Visual Explain"
de iSeries Navigator ? Non ? vous devriez SQL Visual Explain Oui ? Alors vous avez surement trouvé très pratique la possibilité de créer l'index qui manque pour diminuer le temps de réponse de vos requêtes. Jusque là, tout va bien. Mais dès qu'il faut reporter la correction sur plusieurs machines de production, il serait plus confortable de disposer du code source de cet index. Cet outil permet d'interroger DB2 pour qu'il exporte le code source (DDL pour Data Description Langage) d'un objet SQL. DB2 sait reconstituer le DDL des ALIAS, CONSTRAINT, FUNCTION, INDEX, PROCEDURE, SCHEMA, TABLE, TRIGGER, TYPE, VIEW |
Did you already use the " SQL
Visual Explain " of iSeries Navigator ? No? you would have to. here is a link to find SQL Visual Explain Yes? Then you surely found it convenient to create the missing indexes to lessen your response time. Until there, all goes well. But as soon as it is necessary to report the correction on several production machines, it would be more comfortable to have the DDL of this index This tool permits to ask DB2 to export the code source
(DDL
for Data Description Language) of a SQL object. DB2 knows how to
rebuild the DDL of the ALIAS, CONSTRAINT, FUNCTION, INDEX,
PROCEDURE,
SCHEMA, TABLE, TRIGGER, TYPE, VIEW,, |
asking DB2 for DDL of object QSYS2/SYSTABLES *FILE
|
and the corresponding DDL
|
remarks :
this tool permits you to retrieve the ddl of an index as well as a view from a logical file when iSeries navigator permits only to retrieve the view.
the QSQGNDDL api don't permit to retrieve the index from a physical file if it is not unique. (when unique, it retrieve the primary key). Problem submitted to Rochester.
in V5R2, CONCAT expression for logical files are not retrieved correctly. OK in V5R3