Difference between revisions of "Sql convert from dds"
From MidrangeWiki
As400doofus (talk | contribs) m |
As400doofus (talk | contribs) |
||
Line 10: | Line 10: | ||
Big picture...create a new SQL table to hold the data, build indexes across this new table, rebuild the physical file DDS as a logical file, change the logicals to point at new physical. | Big picture...create a new SQL table to hold the data, build indexes across this new table, rebuild the physical file DDS as a logical file, change the logicals to point at new physical. | ||
− | # Retrieve the SQL for your physical table using API or iNavigator. | + | #Retrieve the SQL for your physical table using API or iNavigator. |
− | + | ##change the name of the table to match your company standards | |
− | + | ###for example, physical file MSPMP100, new SQL name MSPMP100SQ | |
− | + | ##use old format name for new table | |
− | # Retrieve list of key fields used across the file | + | #Retrieve list of key fields used across the file |
− | # Build indexes using longest number of key fields to shortest | + | #Build indexes using longest number of key fields to shortest |
− | # Rebuild the physical file DDS to be a logical file | + | #Rebuild the physical file DDS to be a logical file |
− | # Change the logical files to point to new physical | + | #Change the logical files to point to new physical |
− | + | ##if logical uses select/omit change to use dynslt | |
− | + | ##include a index across select/omit fields | |
− | # Compile all logical files (including the "old physical") | + | #Compile all logical files (including the "old physical") |
[[Category:SQL|DDS to SQL DDL]] | [[Category:SQL|DDS to SQL DDL]] | ||
[[Category:DDS|DDS to SQL DDL]] | [[Category:DDS|DDS to SQL DDL]] |
Revision as of 01:53, 10 January 2008
WORK IN PROGRESS - please help by editing this document - include code/specific commands where needed
SQL described tables work better (faster and more efficiently) than DDS described files.
How to convert from DDS to SQL without breaking existing programs...
Big picture...create a new SQL table to hold the data, build indexes across this new table, rebuild the physical file DDS as a logical file, change the logicals to point at new physical.
- Retrieve the SQL for your physical table using API or iNavigator.
- change the name of the table to match your company standards
- for example, physical file MSPMP100, new SQL name MSPMP100SQ
- use old format name for new table
- change the name of the table to match your company standards
- Retrieve list of key fields used across the file
- Build indexes using longest number of key fields to shortest
- Rebuild the physical file DDS to be a logical file
- Change the logical files to point to new physical
- if logical uses select/omit change to use dynslt
- include a index across select/omit fields
- Compile all logical files (including the "old physical")