Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Creating views with procedures, help!
Hi!
I've got a problem programming in PL/SQL and I hope someone can give me some clues...
I have a procedure which creates a view. It does this creating a string like
"Create view ... as select * ... etc.", and executing that string using dbms
commands. But I want some other users to use the procedure, so I've created a
public synonym on it, and I've granted execution on it to that users.
Suppose the procedure's owner is called vader, and another user is called luke. When luke uses the procedure to create that view, it's created ok, but its owner is vader, like the procedure! And I want it to be luke's, because it's luke who runs the procedure and he should be the owner of that view, isn't it? How can I do it?
I've tried to change the "create view my_view" statement inside the procedure to "create view luke.my_view.." but it doesn't work... any tip?
Thanx in advance!!!
--
Isaac Asimov _____________________________________________________Received on Wed Jul 08 1998 - 09:06:01 CDT
![]() |
![]() |