[20240914]建立完善xt.sql脚本.txt
$ cat xt.sql
-- Copyright 2023 lfree. All rights reserved.
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms and conditions.
--------------------------------------------------------------------------------
--
-- File name: xt.sql
-- Purpose: query x$ table
-- Author: lfree
--
-- Usage:
-- @ xt <regexp_like_string>
--------------------------------------------------------------------------------
set termout off
column column_string new_value column_string format a200
select replace('&1','$','\$') column_string from dual;
set termout on
select * from gv$fixed_table where regexp_like (name,'&column_string','i');
SYS@book> @ xt x$kgl.*sql
INST_ID NAME OBJECT_ID TYPE TABLE_NUM CON_ID
---------- ---------------------------------------- ---------- ------------------------------ ---------- ----------
1 X$KGLCURSOR_CHILD_SQLID 4294952684 TABLE 65537 0
1 X$KGLCURSOR_CHILD_SQLIDPH 4294952680 TABLE 65537 0
1 X$KGLSQLTXL 4294953759 TABLE 65537 0
SYS@book> @xt x$kgldp|kglcursor
INST_ID NAME OBJECT_ID TYPE TABLE_NUM CON_ID
---------- ------------------------------ ---------- ------------------------------ ---------- ----------
1 X$KGLDP 4294951035 TABLE 675 0
1 X$KGLCURSOR 4294951061 TABLE 65537 0
1 X$KGLCURSOR_CHILD_SQLID 4294952684 TABLE 65537 0
1 X$KGLCURSOR_CHILD_SQLIDPH 4294952680 TABLE 65537 0
1 X$KGLCURSOR_CHILD 4294952683 TABLE 65537 0
1 X$KGLCURSOR_PARENT 4294953372 TABLE 65537 0
6 rows selected.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-3027890/ ,如需转载,请注明出处,否则将追究法律责任。