ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER' [message #629151] |
Wed, 03 December 2014 22:34 |
|
sajeeshts
Messages: 6 Registered: December 2014 Location: Noida
|
Junior Member |
|
|
Hi,
I am using the below query on a table through DBLINK, which is running into an error
Select * from Terra_Master@PEDRA Where OnCheckflag = 4 And Mod(DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID),5) = 3;
The error which I am getting is
ERROR at line 1:ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER'
Please advice, whether the ROWID_BLOCK_NUMBER function cannot be used in query accessing the table through DBLINK ?
Rgds
Sajeesh Satyan
[Updated on: Wed, 03 December 2014 22:37] Report message to a moderator
|
|
|
|
|
|
Re: ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER' [message #629160 is a reply to message #629154] |
Thu, 04 December 2014 00:51 |
|
sajeeshts
Messages: 6 Registered: December 2014 Location: Noida
|
Junior Member |
|
|
Hi,
This is not an IOT. Below is the DDL
-- Create table
create table TERRA_MASTER
(
ti_custom_decision_key101 NUMBER(7) default 0,
ti_custom_decision_key102 NUMBER(7) default 999,
ti_aligned_score1 NUMBER(4) default 0,
ti_aligned_score2 NUMBER(4) default 0,
ti_amt_due1 NUMBER(11,2) default 0,
ti_amt_due2 NUMBER(11,2) default 0,
ti_amt_pur1 NUMBER(11,2) default 0,
ti_amt_pur2 NUMBER(11,2) default 0,
ti_delq_scen_id NUMBER(3) default 0,
ti_spid NUMBER(2) default 0,
caccserno NUMBER(10),
pr10_scrd_type NUMBER(1) default 0,
ti_acct_num VARCHAR2(19) default ' ',
grpname VARCHAR2(25),
OnCheckflag NUMBER(1),
billingflag NUMBER(1),
postingflag NUMBER(1),
newflag NUMBER(1),
checkflag NUMBER(1)
)
tablespace ONLINE00
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
-- Create/Recreate indexes
create index I_ACCTNUM on TERRA_MASTER (TI_ACCT_NUM)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index I_OnCheckflag on TERRA_MASTER (OnCheckflag)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create unique index I_CACCSERNO on TERRA_MASTER (CACCSERNO)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index I_CHECKFLAG on TERRA_MASTER (CHECKFLAG)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create unique index I_GRPNAME on TERRA_MASTER (GRPNAME)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index I_NEWFLAG on TERRA_MASTER (NEWFLAG)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index I_POSTINGFLAG on TERRA_MASTER (POSTINGFLAG)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index I_SCEN_ID on TERRA_MASTER (TI_DELQ_SCEN_ID)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index I_SPID on TERRA_MASTER (TI_SPID)
tablespace ONLINE00
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
|
|
|
|
|
|
Re: ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER' [message #629168 is a reply to message #629159] |
Thu, 04 December 2014 01:51 |
John Watson
Messages: 8931 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Michel Cadot wrote on Thu, 04 December 2014 06:51
I doubt you can use DBMS_ROWID on a remote rowid.
What are the version of both databases (4 decimals like 11.2.0.4)?
Looks to me as though you are right:
c:\users\john>
c:\users\john>sqlplus scott/tiger
SQL*Plus: Release 12.1.0.2.0 Production on Thu Dec 4 07:47:44 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Thu Dec 04 2014 07:46:32 +00:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Session altered.
orclz> Select * from dept Where Mod(DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID),5) = 3;
no rows selected
orclz> create database link l1 using 'orclz';
Database link created.
orclz> Select * from dept@l1 Where Mod(DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID),5) = 3;
Select * from dept@l1 Where Mod(DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID),5) = 3
*
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER'
orclz>
|
|
|
|
|
|
Re: ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER' [message #629220 is a reply to message #629168] |
Thu, 04 December 2014 09:27 |
Solomon Yakobson
Messages: 3273 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
John Watson wrote on Thu, 04 December 2014 02:51
I doubt you can use DBMS_ROWID on a remote rowid.
On remote DB:
SQL> select dbms_rowid.rowid_block_number(rowid) from t_event_notification;
DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)
------------------------------------
7347
7347
7347
SQL>
Now on local DB:
SQL> select dbms_rowid.rowid_block_number(rowid) from t_event_notification@apsbox;
select dbms_rowid.rowid_block_number(rowid) from t_event_notification@apsbox
*
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to
'ROWID_BLOCK_NUMBER'
SQL> select dbms_rowid.rowid_block_number@apsbox(rowid) from t_event_notification@apsbox;
DBMS_ROWID.ROWID_BLOCK_NUMBER@APSBOX(ROWID)
-------------------------------------------
7347
7347
7347
SQL>
As you can see, we need to call package using same link. Then package will be called by same remote session.
SY.
|
|
|
|