Hi David,
If you are trying to restore production files into TEST environment, with SQL logical files (Views) then after you restore the physical file, you have to re-build the SQL views. I had the similar issue long time back when I found out that the SQL views are still pointing to the Production Physical files.
This is different from DDS Logical files, after you restore the physical files, if you restore the logical files in the same library (Assuming TEST) as the physical files then it should be fine, but if any of the DDS logical file goes to other library than the Physical file than you need to rebuild the DDS logical files as well.
I hope this helps.
Regards
Zahir Ahmed
------------------------------
Zahir Ahmed
ERP Analyst
City of Lacey
WA
------------------------------
Original Message:
Sent: Wed December 06, 2023 11:51 AM
From: Kurt Thomas
Subject: Access path for VIEWS and INDEXES
Hi David,
I am not aware of any IBM documentation that answers that question. There is some reference to access path maintenance and rebuilding here:
DatabasePerformance and Query Optimization (ibm.com) --> p. 211-212,
but nothing that clearly states which is which.
Is the loading performed through a restore? If yes, you can restore the physical file first and then any dependent logicals.
On a side note, for large files, it may be useful to control when table statistics are created. On that topic, you can find information here:
Best regards,
Kurt Thomas
------------------------------
Kurt Thomas
Original Message:
Sent: Wed December 06, 2023 10:58 AM
From: David Taylor
Subject: Access path for VIEWS and INDEXES
I should know this, but I cannot find the document to tell me. Searching the internet is like trying to find the right haystack among the torrent of needles. :)
I was discussing VIEWS with a colleague recently and they asked me about the impact on the system for a VIEW or an INDEX. With a standard DDS logical file, we have the MAINT keyword to specify the timing. When I tested changing that value for an INDEX or a VIEW, I get CPD3201 telling me hands off. I need to be able to answer the question with chapter and verse from the IBM documentation.
This comes in to play especially when we load data from production to test for large files.
------------------------------
David Taylor
------------------------------