-
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
-
well v_$ are not tables, they are views
-
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
-
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."
-
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
-
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
-
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."
-
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"
-
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."
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|