Solved

dbms_utility.active_instances

Posted on 2001-07-16
3
638 Views
Last Modified: 2008-01-09
I am trying to determine the instance name using dbms_utility.  I get following error:

PLS-00306: wrong number or types of arguments in call to 'ACTIVE_INSTANCES'

Any suggestions. Code snippet below:


TYPE instance_record is RECORD
(
       inst_number number,
      inst_name   varchar2(60)
);
     

TYPE instance_table is TABLE OF instance_record INDEX BY BINARY_INTEGER;

inst_tab instance_table;
inst_count number;

BEGIN      
 DBMS_UTILITY.ACTIVE_INSTANCES(inst_tab, inst_count);
END;
0
Comment
Question by:curtjenk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Expert Comment

by:ser6398
ID: 6287427
try declaring your variable as follows:

inst_tab   DBMS_UTILITY.instance_table;



0
 
LVL 3

Expert Comment

by:UsamaMunir
ID: 6288450
SQL> declare
  2  inst_table DBMS_UTILITY.INSTANCE_TABLE;
  3  INST_NUM NUMBER;
  4  BEGIN
  5  DBMS_UTILITY.ACTIVE_INSTANCES(INST_TABLE,INST_NUM);
  6  END;
  7  /

PL/SQL procedure successfully completed.

I HOPE IT HELPS

Regards
Usama Munir
0
 
LVL 5

Accepted Solution

by:
ser6398 earned 25 total points
ID: 6288511
DECLARE

inst_tab     DBMS_UTILITY.instance_table;
inst_count   number;

BEGIN      
  DBMS_UTILITY.ACTIVE_INSTANCES(inst_tab, inst_count);
END;
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question