Created
November 5, 2020 15:44
-
-
Save BirgittaHauser/74b78ed5db37970155b5aacecb824266 to your computer and use it in GitHub Desktop.
How to search source physical file member for a specific String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It was just a question in a Forum: How to search (all) source physical file members for a specific string and list all those members | |
In this examples all source files beginning with "QSRC" in the "YOURSCHEMA" library are searched whether they include "String". | |
All Source Members that include "String" are returned | |
With a as (Select a.System_Table_Schema OrigSchema, | |
a.System_Table_Name OrigTable, | |
a.System_Table_Member OrigMember, | |
Trim(System_Table_Schema) concat '/' concat | |
Trim(System_Table_Name) concat '(' concat | |
Trim(System_Table_Member) concat ')' as OrigCLOBMbr | |
from Syspartitionstat a | |
Where System_Table_Name like 'QSRC%' | |
and System_Table_Schema = 'YOURSCHEMA') | |
Select OrigSchema, OrigTable, OrigMember | |
from a | |
Where Get_Clob_From_File(OrigClobMbr) like '%String%'; |
Yes, that's true! When working with Locators (LOB or XML-Locators) you have to run under commitment control. Normally the lowest level *CHG is enough.
Locators are kind of Pointers ... and Pointers have to be freed. ... LOB-Locators or XML-Locators get freed when executing a COMMIT or ROLLBACK statement! So you must use them under commitment control.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when i try to run this is ACS Run Sql Scripts, i receive sql0443 state 42927
LOB and XML locators are not allowed with COMMIT(*NONE)