Unix Technical Forum

Getting queue table name

This is a discussion on Getting queue table name within the Oracle Database forums, part of the Database Server Software category; --> Hello I am trying to write a function which, when given a Queue Name, will run a select statement ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 03:50 AM
tim
 
Posts: n/a
Default Getting queue table name

Hello

I am trying to write a function which, when given a Queue Name, will
run a select statement on the Queue Table it resides in. Is there a
standard function in PL/SQL that can be used to get the Queue Table
name when given the Queue name? Or is there another way I could do
this?


Many thanks


Tim.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 03:50 AM
Ana C. Dent
 
Posts: n/a
Default Re: Getting queue table name

"tim" <traggatt@gmail.com> wrote in news:1170254724.073077.92350
@k78g2000cwa.googlegroups.com:

> Hello
>
> I am trying to write a function which, when given a Queue Name, will
> run a select statement on the Queue Table it resides in. Is there a
> standard function in PL/SQL that can be used to get the Queue Table
> name when given the Queue name? Or is there another way I could do
> this?
>
>
> Many thanks
>
>
> Tim.
>
>


HUH?
QUEUE NAME?
QUEUE TABLE?

Please elaborate.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 03:50 AM
sybrandb
 
Posts: n/a
Default Re: Getting queue table name

On Jan 31, 3:45 pm, "tim" <tragg...@gmail.com> wrote:
> Hello
>
> I am trying to write a function which, when given a Queue Name, will
> run a select statement on the Queue Table it resides in. Is there a
> standard function in PL/SQL that can be used to get the Queue Table
> name when given the Queue name? Or is there another way I could do
> this?
>
> Many thanks
>
> Tim.


Please check out dba_queues and dba_queue_tables.
A working select statement is provided on Metalink, which I just left.

I would recommend always to run
select * from dict where table_name like '%<any Oracle concept>%' as
that provides a wealth of information and pointers.

--
Sybrand Bakker
Senior Oracle DBA

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 03:50 AM
Niall Litchfield
 
Posts: n/a
Default Re: Getting queue table name

tim wrote:
> Hello
>
> I am trying to write a function which, when given a Queue Name, will
> run a select statement on the Queue Table it resides in. Is there a
> standard function in PL/SQL that can be used to get the Queue Table
> name when given the Queue name? Or is there another way I could do
> this?
>
>
> Many thanks
>
>
> Tim.
>


In addition to the comments already given it would be interesting to me
to know what you are trying to achieve. It maybe that you are
reinventing a wheel.


--
Niall Litchfield
Oracle DBA
http://www.orawin.info/services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 03:51 AM
tim
 
Posts: n/a
Default Re: Getting queue table name

Hi Niall

I am trying to dequeue queue items from one queue and place them into
a normal table. The normal table would be an identical copy of the
queue table placed in a backup schema. My approach is to select the
item from the queue table, insert it into the normal table, then
dequeue the item from the queue.

Originally, rather than creating a copy of the queue table, we were
going to create identical queues in the backup schema. But since we
are only using the backup table for archiving purposes (no actual
queuing functionality is required) we thought it would be better to
use a normal table.

Can you suggest a better way of doing this?

Tim.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-26-2008, 03:51 AM
DA Morgan
 
Posts: n/a
Default Re: Getting queue table name

tim wrote:
> Hi Niall
>
> I am trying to dequeue queue items from one queue and place them into
> a normal table. The normal table would be an identical copy of the
> queue table placed in a backup schema. My approach is to select the
> item from the queue table, insert it into the normal table, then
> dequeue the item from the queue.


Why not have your existing queue also publish to a queue with a
listening procedure that loads a table?
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com