Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Advanced queuing : dequeing from remote database

Advanced queuing : dequeing from remote database

2005-02-18       - By Post, Ethan
Reply:     1     2     3     4     5     6     7     8     9     10  

=20

-- --Original Message-- --
From: oracle-l-bounce@(protected)
[mailto:oracle-l-bounce@(protected)] On Behalf Of John Dunn
Sent: Friday, February 18, 2005 6:49 AM
To: Oracle-L@(protected)
Cc: rjamya@(protected); ntilbury@(protected)
Subject: RE: Advanced queuing : dequeing from remote database

Ok, I'm getting further now. I got round the identifier 'DBMS_AQADM'
must be
declared error by explicitly granting execute on the package, rather
than
thru the role.

Now I get the error :

ORA-04052 (See ORA-04052.ora-code.com): error occurred when looking up remote object
OPD4678.DBMS_AQADM@(protected)
ORA-00604 (See ORA-00604.ora-code.com): error occurred at recursive SQL level 4
ORA-01005 (See ORA-01005.ora-code.com): null password given; logon denied
ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_AQADM_SYS", line 977

My database link is a private one. Is this the problem? Do I need to use
a
public database link with AQ, with a connect string?



-- --Original Message-- --
From:   John Dunn [mailto:jdunn@(protected)]
Sent:   17 February 2005 16:53
To:   'Oracle-L@(protected)'
Cc:   'rjamya@(protected)'; 'ntilbury@(protected)'
Subject:   RE: Advanced queuing : dequeing from remote database

I have overcome the connection description for remote database not found
error but now get the following error : Looks like a privilage thing,
but I
do not understand this. Since I am able to run dbms_aqadm commands under
my
user on both databases surely the privileges are OK?



SQL> select qname,failures,last_error_msg from dba_queue_schedules;

QNAME                            FAILURES
-- ---- ---- ---- ---- ---- -- -- ---- --
LAST_ERROR_MSG
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
----
----
NEW_JOB_MESSAGE_QUEUE                   5
ORA-06550 (See ORA-06550.ora-code.com): line 1, column 7:
PLS-00201: identifier 'DBMS_AQADM' must be declared
ORA-06550 (See ORA-06550.ora-code.com): line 1, column 7:
PL/SQL: Statement ignored

-- --Original Message-- --
From:   John Dunn [mailto:jdunn@(protected)]
Sent:   17 February 2005 13:33
To:   'Oracle-L@(protected)'
Cc:   'rjamya@(protected)'; 'ntilbury@(protected)'
Subject:   RE: Advanced queuing : dequeing from remote database

I have identified the error as :

connection description for remote database not found

The address being used in add_subscriber is
OPD4678.NEW_JOB_MESSAGE_QUEUE@(protected)

where VAN9 is my database link

but the entry on the queue seems to trying to use

OPD4678.NEW_JOB_MESSAGE_QUEUE@(protected)

Is this the problem?

Why is it trying to use VAN9.US.ORACLE.COM ???


The entry in tnsnames.ora is simply named VAN9.




From:   John Dunn [mailto:jdunn@(protected)]
Sent:   17 February 2005 10:46
To:   'Oracle-L@(protected)'
Subject:   Advanced queuing : dequeing from remote database

I am experimenting with advanced queueing in Oracle 9i and am able to
enqueue and dequeue messages within the same database.

However I would like to dequeue messages on a remote database via a
database
link.

I am confused as to what I need to set up on the remote server in order
to
dequeue the message.

I have set up the database link that points back to the enqueueing
database,
The database link works OK.

I am then trying to dequeue the message on the remote database using the
following code(which is the same I use when doing this all on the same
database except for the references to the database link). I get the
error :

   message              opd4678.new_job_message@(protected);
                                *
ERROR at line 6:
ORA-06550 (See ORA-06550.ora-code.com): line 6, column 34:
PLS-00331: illegal reference to OPD4678.NEW_JOB_MESSAGE@(protected)

Any ideas what I have done wrong?

John


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
----
-- ---- --


   set serveroutput on

declare

   dequeue_options      dbms_aq.dequeue_options_t;
   message_properties   dbms_aq.message_properties_t;
   message_handle       RAW(16);
   message              opd4678.new_job_message@(protected);
   --message              opd4678.new_job_message;

BEGIN

   dequeue_options.CONSUMER_NAME           :=3D NULL;
   dequeue_options.DEQUEUE_MODE            :=3D DBMS_AQ.REMOVE;
   dequeue_options.NAVIGATION              :=3D DBMS_AQ.NEXT_MESSAGE;
   dequeue_options.VISIBILITY              :=3D DBMS_AQ.IMMEDIATE;
   dequeue_options.WAIT                    :=3D DBMS_AQ.FOREVER;
   dequeue_options.MSGID                   :=3D null;
   dequeue_options.CORRELATION             :=3D 'TEST MESSAGE';

   DBMS_AQ.DEQUEUE (
      queue_name         =3D> 'opd4678.new_job_message_queue@(protected)',
      dequeue_options    =3D> dequeue_options,
      message_properties =3D> message_properties,
      payload            =3D> message,
      msgid              =3D> message_handle
   );



   dbms_output.put_line('+-- ---- ---- ----+');
   dbms_output.put_line('| New Job |');
   dbms_output.put_line('+-- ---- ---- ----+');
   dbms_output.put_line('- Message ID   :=3D ' || message.message_id);
   dbms_output.put_line('- Filename       :=3D ' ||
message.host_file_name);


   COMMIT;

   -- -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --

END;
/



--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l