DBMS_SQLTUNE (2 merged) [message #481132] |
Sun, 31 October 2010 23:30  |
vinodraj4u@gmail.com
Messages: 15 Registered: January 2010 Location: bangalore
|
Junior Member |

|
|
hi,
Anybodby please help with this issue.
Im trying to execute dbms_sqltune package but it is giving error,the steps i followed is below
UAT28~> exec dbms_sqltune.create_tuning_task(begin_snap => 14728,end_snap => 14729,sql_id => '8t7vr62cfukkw');
BEGIN dbms_sqltune.create_tuning_task(begin_snap => 14728,end_snap => 14729,sql_id => '8t7vr62cfukkw'); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'CREATE_TUNING_TASK'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
im not able to understand the error.Is there any prerequisite to run dbms_sqltune.
|
|
|
|
Re: DBMS_SQLTUNE (2 merged) [message #481139 is a reply to message #481132] |
Mon, 01 November 2010 01:46   |
John Watson
Messages: 8989 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Hi - if you do this,
you'll see that dbms_sqltune.create tuning_task is a function that returns a varchar2, so you can't execute it in the way that you are doing: your method will work only for procedures, that return nthing. Try this instead:
select dbms_sqltune.create_tuning_task(begin_snap => 14728,
end_snap => 14729,sql_id => '8t7vr62cfukkw') from dual;
|
|
|
|
|
|
Re: DBMS_SQLTUNE (2 merged) [message #481162 is a reply to message #481161] |
Mon, 01 November 2010 05:54   |
John Watson
Messages: 8989 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Sorry ! should gave done it like this:
jw> variable v varchar2(1000);
jw> exec :v:=dbms_sqltune.create_tuning_task(begin_snap => 1273,end_snap => 1274,sql_id => '459f3z9u4fb3u');
PL/SQL procedure successfully completed.
jw>
|
|
|
|