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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| "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. |
| |||
| 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 |
| |||
| 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 |
| |||
| 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. |
| ||||
| 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 |