oradebug current_sql
CDB 或者PDB都可以,但是数据库sid不对找不到SQL TEXT
ps -ef|grep 3485015
oracle 3485015 1 51 21:19 ? 00:01:10 oracle (LOCAL=NO)
oracle 3489325 3488836 0 21:21 pts/0 00:00:00 grep --color=auto 3485015
. oraenv
[oracle@~]$ s
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 23 21:24:47 2023
Version 19.20.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
oradebug setospid 3485015
Oracle pid: 143, Unix process pid: 3485015, image: oracle@n1
SYS@> oradebug current_sql
alter table .。。。。。。。。。。。。。。。。
SYS@> alter session set container=;
Session altered.
SYS@> oradebug setospid 3485015
Oracle pid: 143, Unix process pid: 3485015, image: oracle@n
SYS@> oradebug current_sql
alter table
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Oct 23 21:26:43 2023
Version 19.20.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
SYS@> oradebug setospid 3485015
ORA-00075: process "Unix process pid: 3485015, image: " not found in this instance
SYS@>