User privileges from other database
Posted in 2003
Topics: Stored Procedures & SPL, Security, Permissions & Auditing, Platform-Specific Issues, Versions, Editions & End-of-Life
Hi all,
I am using IDS 7.23 on solaris 5.6
We have our production database tables on DB1.
There will be lots of users who have to be given appropriate (select or
insert or update) permissions on some of the tables in DB1.
We have a Stored Procedure which contains following kind of statements...
Ex : grant select, insert on DB1:table1 to "user1".
We don't want to have any other tables(other than production tables) or
stored procedures in this production database DB1.
For this reason we have created a Database DB2.
We want to have the stored procedure (which contains permission details) to
be in DB2.
When I try to execute the following statement from external application..
EXECUTE PROCEDURE STORED_PROCEDURE1
Then I am getting the following error,
556: Cannot create, drop, or modify an object on an another database server
Can't I grant privileges to a user from database other than the database
where table exists??
When I use simple insert statement in any of the tables in DB1, in the
stored procedure, then it works fine...
Can anybody suggest me a better solution for this?
Thanks In Advance
anil