dbms_sqldiag ????sql????????
???????????? ???????[ 2013/11/13 14:34:28 ] ????????
????????????????SQL??????????????????????????SQL??????????????????????????????????????oracle??????????????????
sys@ORCL> conn /as sysdba
???????
sys@ORCL> grant read??write on directory exp_dir to u2;
????????
sys@ORCL> grant read??write on directory exp_dir to u1;
????????
sys@ORCL> grant dba to u2;
sys@ORCL> grant dba to u1;
????????
????directory???????????????????????u1??u2?????????u1??u2??????dba????
sys@ORCL> conn u2/u2
???????
u2@ORCL> select count(*) from t;
COUNT(*)
----------
1
u2@ORCL> conn u1/u1
???????
u1@ORCL> select count(*) from t;
select count(*) from t
*
?? 1 ?г??????:
ORA-00942: ????????????
???????????u1??????????????t?????????????????u2????????sql????????u1??????
??????
u2@ORCL> conn u2/u2
???????
u2@ORCL> declare mycase clob;
2 begin
dbms_sqldiag.export_sql_testcase(directory => 'EXP_DIR'??sql_text => 'select count(*) from t'??user_name => 'U2'??exportData => true??testcase => mycase);
4 end;
5 /
PL/SQL ??????????ɡ?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11