Skip to content

Commit 5635246

Browse files
authored
Create create-sts-from-cursorcache.sql
1 parent de2712f commit 5635246

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
REM Script: create-sts-from-cursorcache.sql
2+
REM Load statements from cursor cache with SELECT_CURSOR_CACHE and LOAD_SQLSET
3+
4+
-- first create STS with create-sts.sql
5+
6+
-- enter filter criteria for parsing schema and sql text
7+
8+
DECLARE
9+
cur dbms_sqltune.SQLSET_CURSOR;
10+
BEGIN
11+
OPEN cur FOR
12+
SELECT VALUE(P)
13+
FROM dbms_sqltune.select_cursor_cache(basic_filter =>
14+
'parsing_schema_name = ''&schema'' and upper(sql_text) like ''SELECT%''') P;
15+
dbms_sqltune.load_sqlset(sqlset_name => '&stsname', sqlset_owner=>'&owner', populate_cursor => cur);
16+
CLOSE cur;
17+
END;
18+
/

0 commit comments

Comments
 (0)