- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Procedure
Operating System - HP-UX
1752865
Members
3949
Online
108791
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2003 05:10 AM
тАО12-23-2003 05:10 AM
Procedure
I created a procedure (proc1) in SchemaA.
It works fine.
Now i say,
Grant execute on proc1 to SchemaB.
and when try to execute from SchemaB
it wudnt work. it doesnt give any error but
doesnt fetch data from the tables. Tables are local tables , created seperately in both schemas.
Any thoughts!!!!
It works fine.
Now i say,
Grant execute on proc1 to SchemaB.
and when try to execute from SchemaB
it wudnt work. it doesnt give any error but
doesnt fetch data from the tables. Tables are local tables , created seperately in both schemas.
Any thoughts!!!!
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2003 08:10 PM
тАО12-23-2003 08:10 PM
Re: Procedure
A few things to check.
1. To execute from schema B you would have to prefix the proc name with the schema name, eg "exec SchemaA.proc1()". Alternatively you could create a synonym pointing eg "create public synonym proc1 for SchemaA.proc1".
If you are not doing either of these then you must be calling a local (ie in schemaB) version of proc1.
2. When SchemaA.proc1 runs, it does so within SchemaA and with the privs of SchemaA. So long as it is accessing tables and other objects in SchemaA this will be ok, but if you want it to access tables in SchemaB you will have to explicitly grant the permissions for SchemaA to see the SchemaB tables. Not only that, if you have tables with the same name in each schema, then SchemaA.proc1 is always going to use its local tables unless you explicitly stipulate SchemaB.TableName.
Hope this helps
-- Graham
1. To execute from schema B you would have to prefix the proc name with the schema name, eg "exec SchemaA.proc1()". Alternatively you could create a synonym pointing eg "create public synonym proc1 for SchemaA.proc1".
If you are not doing either of these then you must be calling a local (ie in schemaB) version of proc1.
2. When SchemaA.proc1 runs, it does so within SchemaA and with the privs of SchemaA. So long as it is accessing tables and other objects in SchemaA this will be ok, but if you want it to access tables in SchemaB you will have to explicitly grant the permissions for SchemaA to see the SchemaB tables. Not only that, if you have tables with the same name in each schema, then SchemaA.proc1 is always going to use its local tables unless you explicitly stipulate SchemaB.TableName.
Hope this helps
-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2003 08:47 PM
тАО12-23-2003 08:47 PM
Re: Procedure
hi,
exec schemaname.procname
should work.
Also note that invoker/definer rights also comes into play with procedures/functions and packages.
Where the invoker is the caller of the routine. If I (Yogeeraj) run a stored procedure owned by you that supports invoker rights - I (Yogeeraj) am the invoker and the procedure will run its SQL as if I typed it in -- not you.
If I (Yogeeraj) run a stored procedure owned by you that supports definer rights -- I am still the invoker HOWEVER the procedure will run with YOUR privs -- the DEFINERS privs, not mine.
To add to this -- suppose the definer rights routine YOU wrote calls that invoker rights routine. Now, if I (Yogeeraj) call your definer rights procedure -- it'll execute as you and when it calls the invoker rights routine the invoker this time is YOU -- not me. When we entered that definer rights routine -- that definer becomes the invoker for all other calls (unless it calls another definer rights routine in another schema -- then that schema becomes the invoker)
best regards
and Merry Christmas
Yogeeraj
exec schemaname.procname
should work.
Also note that invoker/definer rights also comes into play with procedures/functions and packages.
Where the invoker is the caller of the routine. If I (Yogeeraj) run a stored procedure owned by you that supports invoker rights - I (Yogeeraj) am the invoker and the procedure will run its SQL as if I typed it in -- not you.
If I (Yogeeraj) run a stored procedure owned by you that supports definer rights -- I am still the invoker HOWEVER the procedure will run with YOUR privs -- the DEFINERS privs, not mine.
To add to this -- suppose the definer rights routine YOU wrote calls that invoker rights routine. Now, if I (Yogeeraj) call your definer rights procedure -- it'll execute as you and when it calls the invoker rights routine the invoker this time is YOU -- not me. When we entered that definer rights routine -- that definer becomes the invoker for all other calls (unless it calls another definer rights routine in another schema -- then that schema becomes the invoker)
best regards
and Merry Christmas
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP