-
HI,
I WANT TO COPY VIEWS OWNED BY ONE USER INTO ANOTHER ORACLE USER. CAN SOME ONE GIVE ME THE SCRIPT TO DO THAT ?
..DEVAL
-
View has no data associated with. It is just a definition. Data is extracted from the tables. So it is very difficult to understand "COPYING THE VIEW" ... Well, give the user access privilage to the views...
Thomas
-
You can get the source of the view from the dba_views view:
[code]
SQL> set long 4000
SQL> set linesize 100
SQL> col view_name for a15
SQL> col text for a40
SQL> l
1 SELECT view_name, text
2 FROM DBA_VIEWS
3* WHERE VIEW_NAME = 'DBA_VIEWS'
SQL> /
VIEW_NAME TEXT
--------------- --------------------------------------------------
DBA_VIEWS select u.name, o.name, v.textlength, v.text, t.typ
etextlength, t.typetext,
t.oidtextlength, t.oidtext, t.typeowner, t.
typename
from sys.obj$ o, sys.view$ v, sys.user$ u, sys.typ
ed_view$ t
where o.obj# = v.obj#
and o.obj# = t.obj#(+)
and o.owner# = u.user#
[code]
Jeff Hunter
-
Hi All
Any one , Please, can tell me the usage of copying the View from one User to another User..
Marist89..??
Thanks
Thoams
-
I'm not sure what you mean.
1. get the view definition from dba_views
2. create view newuser.view_name as results from step 1
Jeff Hunter
-
he just wants to create the same views, but with a different owner ...
just do what marist89 suggested you ...
or create all your views with another user, make synonyms, and grant what is needed for the authorized users to have access to the view ...
-
My concern is re-creating the view in another user is recomended or giving object prililage to the user..?? Which recomeded ..?
Thanks
Thomas
-
Depends. What are you trying to do?
Jeff Hunter
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
|