DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: drawbacks of using v_$ tables

  1. #1
    Join Date
    Dec 2002
    Posts
    18

    drawbacks of using v_$ tables

    Hello...

    Oracle recommends that we don't use v_$ tables... instead they recommend using v$ views... if I need to use a v_$ table (e.g. v_$backup), is there a danger on doing that?

    Thanks

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    well v_$ are not tables, they are views

  3. #3
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    why? ... as in: What is the difference between v$backup and v_$backup?
    Tomaž
    "A common mistake that people make when trying to design something completely
    foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams

  4. #4
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Originally posted by TomazZ
    why? ... as in: What is the difference between v$backup and v_$backup?
    The differences are

    1. v$ are synonyms of v_$ views.
    2. you cannot give grants on v$ only on v_$ views.

    Other than that they are the same and there is no difference AFAIK.

    And i don't see any Danger in using v$ or v_$ unless you have given the wrong grants on v_$ views.
    Last edited by adewri; 06-23-2003 at 04:56 AM.
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  5. #5
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    yeah, that's what i meant:
    why to use v_$backup over v$backup - they are essentially the same.

    thanks for additional info, didn't know about point 2.
    Tomaž
    "A common mistake that people make when trying to design something completely
    foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams

  6. #6
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Maybe the v_$ views are more subject to change - it's just speculation, but perhaps Oracle do not guarantee that columns will not be dropped or renamed from V_$ views. If the v$ viewsd are more stable then that would justify their advice
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  7. #7
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Even if subjected to change how does it matter, since the v$ are synonyms of v_$ views, so if v_$ changes v$ will change (its just a different name of the same thing without an _ ).

    Only benifit i see is that if you use v$ you need not give the prefix of sys where as in v_$ you need to give the prefix sys.v_$
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  8. #8
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by adewri
    1. v$ are synonyms of v_$ views.
    2. you cannot give grants on v$ only on v_$ views.
    Please dont generalise the statement, there are some V$ views & you can grant on them.

    Code:
    US18_DBA> select owner, OBJECT_type, OBJECT_NAME from dba_objects 
      2  where owner = 'SYS' and object_type='VIEW' and object_name like 'V$%';
    
    OWNER                          OBJECT_TYPE        OBJECT_NAME
    ------------------------------ ------------------ --------------------------------------
    SYS                            VIEW               V$CACHE
    SYS                            VIEW               V$CACHE_LOCK
    SYS                            VIEW               V$CACHE_TRANSFER
    SYS                            VIEW               V$FALSE_PING
    SYS                            VIEW               V$LOCK_ACTIVITY
    SYS                            VIEW               V$OBJECT_USAGE
    SYS                            VIEW               V$PING
    SYS                            VIEW               V$XPPOOLSEGS
    Abhay.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  9. #9
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Originally posted by abhaysk
    Please dont generalise the statement, there are some V$ views & you can grant on them.
    Thats not called general, thats called exception. And exceptions are always there.
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  10. #10
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Maybe they are by default created as synonyms, until the time when the v_$ view changes in a way that would break any existing queries against V$, at which point V$ becomes a view and is constructed to prevent queries against it from being broken by an upgrade.

    Personally, if Oracle say use V$ instead of V_$, then I'll use them. don't care why.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width