dbTalk Databases Forums  

how to execute a package in my schema context

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss how to execute a package in my schema context in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Norbert Winkler
 
Posts: n/a

Default how to execute a package in my schema context - 09-01-2008 , 01:08 AM






Hi,

I've written a package that works with a special set of tables I'm using
in different schemas (i.e. MY_WORK).
Now I'd like to create it in a special schema (i.e. SERVICE) to avoid the
redundance.
But executing it in MY_WORK it tries to modify the tables in SERVICE.
It is so by design, I understand it. Normal usage of packages requires it
in that way.
But is there a possibility to share the funcionality of a package for the
same tables in different schemas.

--
Thanks
Norbert

Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: how to execute a package in my schema context - 09-01-2008 , 01:30 AM






Norbert Winkler wrote:
Quote:
Hi,

I've written a package that works with a special set of tables I'm using
in different schemas (i.e. MY_WORK).
Now I'd like to create it in a special schema (i.e. SERVICE) to avoid the
redundance.
But executing it in MY_WORK it tries to modify the tables in SERVICE.
It is so by design, I understand it. Normal usage of packages requires it
in that way.
But is there a possibility to share the funcionality of a package for the
same tables in different schemas.
By default PL/SQL objects such as procedures, functions, and packages
run under AUTHID DEFINER rights. What you need to do is modify your
objects to run under AUTHID CURRENT_USER.

Go to Morgan's Library at www.psoug.org and look up PROCEDURES. On that
page, if you scroll down, you will find a demo under AUTHID that
shows what you describe and how to take control. The default, if you
don't specify is AUTHID DEFINER ... quite often not a good idea.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #3  
Old   
DA Morgan
 
Posts: n/a

Default Re: how to execute a package in my schema context - 09-01-2008 , 01:30 AM



Norbert Winkler wrote:
Quote:
Hi,

I've written a package that works with a special set of tables I'm using
in different schemas (i.e. MY_WORK).
Now I'd like to create it in a special schema (i.e. SERVICE) to avoid the
redundance.
But executing it in MY_WORK it tries to modify the tables in SERVICE.
It is so by design, I understand it. Normal usage of packages requires it
in that way.
But is there a possibility to share the funcionality of a package for the
same tables in different schemas.
By default PL/SQL objects such as procedures, functions, and packages
run under AUTHID DEFINER rights. What you need to do is modify your
objects to run under AUTHID CURRENT_USER.

Go to Morgan's Library at www.psoug.org and look up PROCEDURES. On that
page, if you scroll down, you will find a demo under AUTHID that
shows what you describe and how to take control. The default, if you
don't specify is AUTHID DEFINER ... quite often not a good idea.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #4  
Old   
DA Morgan
 
Posts: n/a

Default Re: how to execute a package in my schema context - 09-01-2008 , 01:30 AM



Norbert Winkler wrote:
Quote:
Hi,

I've written a package that works with a special set of tables I'm using
in different schemas (i.e. MY_WORK).
Now I'd like to create it in a special schema (i.e. SERVICE) to avoid the
redundance.
But executing it in MY_WORK it tries to modify the tables in SERVICE.
It is so by design, I understand it. Normal usage of packages requires it
in that way.
But is there a possibility to share the funcionality of a package for the
same tables in different schemas.
By default PL/SQL objects such as procedures, functions, and packages
run under AUTHID DEFINER rights. What you need to do is modify your
objects to run under AUTHID CURRENT_USER.

Go to Morgan's Library at www.psoug.org and look up PROCEDURES. On that
page, if you scroll down, you will find a demo under AUTHID that
shows what you describe and how to take control. The default, if you
don't specify is AUTHID DEFINER ... quite often not a good idea.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #5  
Old   
DA Morgan
 
Posts: n/a

Default Re: how to execute a package in my schema context - 09-01-2008 , 01:30 AM



Norbert Winkler wrote:
Quote:
Hi,

I've written a package that works with a special set of tables I'm using
in different schemas (i.e. MY_WORK).
Now I'd like to create it in a special schema (i.e. SERVICE) to avoid the
redundance.
But executing it in MY_WORK it tries to modify the tables in SERVICE.
It is so by design, I understand it. Normal usage of packages requires it
in that way.
But is there a possibility to share the funcionality of a package for the
same tables in different schemas.
By default PL/SQL objects such as procedures, functions, and packages
run under AUTHID DEFINER rights. What you need to do is modify your
objects to run under AUTHID CURRENT_USER.

Go to Morgan's Library at www.psoug.org and look up PROCEDURES. On that
page, if you scroll down, you will find a demo under AUTHID that
shows what you describe and how to take control. The default, if you
don't specify is AUTHID DEFINER ... quite often not a good idea.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.