ITPub博客

首页 > 数据库 > Oracle > [20240914]建立完善xt.sql脚本.txt

[20240914]建立完善xt.sql脚本.txt

原创 Oracle 作者:lfree 时间:2024-09-16 20:31:19 0 删除 编辑

[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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7971229