user creation [message #213845] |
Fri, 12 January 2007 08:47 |
|
Hi,
I am again with a user problem.
....
I am having a User name - Sample
having n no of objects in it.
Having another user - usesample
This usesample is not having any object. But have privlige to select and perform DML operations on Sample.
Sample is having a table - Samplesizes
now I am connecting to usesample.
and
here starts my problem .....
Want to select samplesizes data as
select * from samplesizes;
Dont want to use access specifiers as (means following query)
select * from sample.samplesizes;
Is it possible to select objects of first schema(sample) from second scema (usesample) having privileges to access first schema(sample) without specifying the name of first schema(sample) name.
Thank you.
|
|
|
|
Re: user creation [message #213962 is a reply to message #213845] |
Sat, 13 January 2007 00:27 |
|
Ohh Thank you,
Really helped me to find the way....
Just check the following Trigger for using SAMPLE from USESAMPLE.
CREATE OR REPLACE TRIGGER db_logon_USESAMPLE
-- Now login as the user name password given to use the schema
AFTER logon ON DATABASE WHEN (USER IN ('USESAMPLE'))
BEGIN
-- This statement set the working schema for USESAMPLE user to SAMPLE user.
execute immediate 'ALTER SESSION SET CURRENT_SCHEMA = SAMPLE';
end;
|
|
|
|