[20241026]建立完善opeek.sql脚本.txt

来源:这里教程网 时间:2026-03-03 20:44:13 作者:

[20241026]建立完善opeek.sql脚本.txt --//原来写的如下: $ cat opeek.sql @ ti oradebug setmypid oradebug peek 0x&1 &2 &3 prompt --//存在一个问题有时候参数1习惯加入0x,导致执行报错。 SYS@book>  @ opeek 0x7324db30 48 0 New tracefile_identifier = /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_5948_0002.trc Statement processed. ORA-01858: a non-numeric character was found where a numeric was expected --//修改支持输入或者不输入0x或者x都可以,应该不会选择作为10进制地址输入。 --//而且有时候我并不想执行调用ti脚本,这个脚本也是来自tpt,给跟踪文件生成系列号,感觉这部分修改有点难度,这部分先注解。 $ cat opeek.sql -- Copyright 2023 lfree. All rights reserved. -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms and conditions. -------------------------------------------------------------------------------- -- -- Name:        opeek.sql -- Purpose:     oradebug peek -- Author:      lfree -- Usage: --     @ opeek <addr> <length> <1|0> -- argv3 : 1 -- write tracename and display 0 -- display -------------------------------------------------------------------------------- set term off col 1 new_value 1 select replace(lower('&&1'),'x','') "1" from dual; oradebug setmypid set term on --@ ti oradebug peek 0x&1 &2 &3 prompt

相关推荐