Home » RDBMS Server » Server Administration » Record unique id for "select * from v$logmnr_contents"
Record unique id for "select * from v$logmnr_contents" [message #62330] Wed, 14 July 2004 23:46 Go to next message
Sami Zeitoun
Messages: 8
Registered: June 2004
Junior Member
Hi guys,
Does anyone know how can I can get a unique ID for each record/row returned when I do "select * from v$logmnr_contents"??
One very very important demand from this unique ID is to be an ascending ID, i.e oldest records will have the smallest id value and the newest will have the bigger value. 
I thought that I can use the SCN for this matter but as I can see, it's unique!! 
Can anyone help me??
 
Thanks,
Sami.
Re: Record unique id for "select * from v$logmnr_contents" [message #62332 is a reply to message #62330] Thu, 15 July 2004 01:15 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Here's an example using user_objects, but the principle is alike:
SQL> SELECT rownum
  2       , object_name
  3       , ddl_time last_ddl_time
  4    FROM ( SELECT object_name
  5                , TO_CHAR(last_ddl_time,'DD/MM/YYYY HH24:MI') ddl_time
  6             FROM user_objects
  7            ORDER BY last_ddl_time ASC
  8         )
  9 /

   ROWNUM OBJECT_NAME                    LAST_DDL_TIME
--------- ------------------------------ ----------------
        1 ****_*A**_**                   23/01/2004 11:31
        2 ****_*O*_A**O**                23/01/2004 11:31
        3 ****_*O*E_*A**_***_**_I**      23/01/2004 12:07
        4 ****_*O**_E**                  23/01/2004 12:18
        5 *****_*O*E_*O**_***_**_I**     23/01/2004 12:18
        6 ****_****_**                   23/01/2004 13:04
        7 ****_*E**_****_***_**_I**      23/01/2004 13:32
        8 **_*E**A*I**                   26/01/2004 09:38
        9 ****_*A_*O**E**                26/01/2004 10:22
       10 ****_*E**_U*                   27/01/2004 09:29
       11 ****_*OE*_**                   27/01/2004 11:21
       12 ****_****_*E*                  27/01/2004 14:43
       13 ****_*E**_*E**_***_**_I**      27/01/2004 15:42
       14 ****_*E**_U**_***_**_I**       27/01/2004 15:42
       15 ****_*E**_U**_***_**_I**       27/01/2004 15:42
       16 ****_*E**_**                   27/01/2004 15:42
       17 ****_*E**_*E**_***_**_I**      27/01/2004 15:42
       18 ****_*OE*_U***_***_**_I**      27/01/2004 15:49
       19 ****_*OE*_U**_***_**_I**       27/01/2004 15:49
       20 ****_*A**_O*I_***_**_I**       27/01/2004 16:03
...etc...etc...
Beware that the ROWNUM assignments are not fix! They are re-assigned every time you run the query.

MHE
Re: Record unique id for "select * from v$logmnr_contents" [message #62335 is a reply to message #62332] Thu, 15 July 2004 02:37 Go to previous message
Sami Zeitoun
Messages: 8
Registered: June 2004
Junior Member
Maaher,
This is not good for me... The ID has to be fixed!!
Any other idea??

Thanks,
Sami.
Previous Topic: Max. lenght exceeded error
Next Topic: High number of commits per day --> Big data files
Goto Forum:
  


Current Time: Thu Jan 09 03:55:15 CST 2025