Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to convert DBA from DBVERIFY to file and block_id for bigfile

Bobby DurrettFeb 23 2021

This is on 10.2.0.4 on HP-UX. I have DBVERIFY output like this on a bigfile data file:
DBV-00201: Block, DBA 18121156, marked corrupt for invalid redo application
I would like to query DBA_EXTENTS to find out what segment 18121156 is in. I know the file number because I have the datafile name from my dbv command. But how do I get the block_id?
Oracle's support site says that I cannot use dbms_utility.data_block_address_block for bigfiles but I cannot find the alternative.
Can anyone point me in the right direction?
Thanks!
Bobby

This post has been answered by Bobby Durrett on Mar 3 2021
Jump to Answer

Comments

Marwim

Do you mean the EXECUTE command in SQL*Plus?

You can't use it to run a procedure with an out parameter.

Edit: EXECUTE only "Executes a single PL/SQL statement." To handle the out parameter you need more than a single statement. But you can assign the value to a variable if you define it first.

Regards

Marcus

AndrewSayer

1043556 wrote:

Hi all please advise

how to run a package through execute command in oracle pl sql, my package is having one out parameter.

EXECUTE PKG_LOD_PATCH.SP_LOD_RPT(null);

Getting error

below script is working fine.

DECLARE

W_ERRMSG VARCHAR2(1000);

BEGIN

PKG_LOD_PATCH.SP_LOD_RPT(W_ERRMSG);

END;

/

What error?

Are you trying to assign somethimg to null? That won't work, you'll need to set up a variable for it to be contained in, if using sqlplus then you can

var sErrorMessage varchar2(1000)

exec pkg_lod_patch.sp_lod_rpt(:sErrorMessage)

print :sErrorMessage

BTw you don't execute a package, you execute a stored program that's inside the package.

And it is utterly silly to return errors like this, raise them! You are making life very difficult for yourself. You didn't even check the contents of that variable in your own block which just shows how crazy an idea it is!

1043556

this is not sql *plus, i want to execute in sql command window in plsql developer tool.

Hemant K Chitale

You're executing a *Procedure* in a *Package*.  Does it have to be a Procedure  ?  Can it be a Function ?

Hemant K Chitale

BluShadow

Marwim wrote:

Do you mean the EXECUTE command in SQL*Plus?

You can't use it to run a procedure with an out parameter.

Edit: EXECUTE only "Executes a single PL/SQL statement." To handle the out parameter you need more than a single statement. But you can assign the value to a variable if you define it first.

Regards

Marcus

Just to clarify with an example, as you CAN run a procedure with an out parameter...

SQL> create or replace procedure x(x out number) is
  2  begin
  3    x := 1;
  4  end;
  5  /

Procedure created.

SQL> var myX number;
SQL> execute x(:myX);

PL/SQL procedure successfully completed.

SQL> print myX;

      MYX
----------
        1

SQL>

Mustafa KALAYCI

write package/procedure name into worksheet, right click menu and click "Test".

Saubhik

If I understood your question correctly then, you want to test the EXECUTE command from your client IDE PL/SQL developer by Allround Automation. It is better if you would have asked in the tool specific forum.

However, EXECUTE is a SQL * Plus (another client tool) specific command, which you can use in PL/SQL developer also, if you use the command line tool there.

Nimish Garg

Like this

nimish@garg> create or replace procedure myproc(p_out out number)

  2  is

  3  begin

  4    select count(*) into p_out from emp;

  5  end;

  6  /

Procedure created.

nimish@garg> var cnt number;

nimish@garg> execute myproc(:cnt);

PL/SQL procedure successfully completed.

nimish@garg> print cnt;

       CNT

----------

        14

nimish@garg> select :cnt from dual;

      :CNT

----------

        14

1 - 8

Post Details

Added on Feb 23 2021
1 comment
537 views