Creating a Test case for Oracle
Posted: Tue Dec 22, 2009 11:13 pm
If you are using 11.x and you open up a ticket with oracle , they are now asking for a 'test case" when you report your issue.. it is easy to upload, and here is an example of how to upload the test case for
"select x from dual" run as app_user.. make sure you've created the directory "TMP_DIR" !
create or replace package define_vars is
sql_stmt1 varchar2(2000) := q'# SELECT x from dual #';
end;
/
set serveroutput on
declare
tco clob;
begin
-- Export test case
dbms_sqldiag.export_sql_testcase
(
directory => 'TMP_DIR',
sql_text => define_vars.sql_stmt1,
user_name => 'APP_USER',
exportData => FALSE,
testcase => tco
);
end;
/
Also see
http://optimizermagic.blogspot.com/2008 ... y-tar.html
"select x from dual" run as app_user.. make sure you've created the directory "TMP_DIR" !
create or replace package define_vars is
sql_stmt1 varchar2(2000) := q'# SELECT x from dual #';
end;
/
set serveroutput on
declare
tco clob;
begin
-- Export test case
dbms_sqldiag.export_sql_testcase
(
directory => 'TMP_DIR',
sql_text => define_vars.sql_stmt1,
user_name => 'APP_USER',
exportData => FALSE,
testcase => tco
);
end;
/
Also see
http://optimizermagic.blogspot.com/2008 ... y-tar.html