table right user [message #687713] |
Tue, 16 May 2023 04:31  |
 |
mfahimaamirgmailcom
Messages: 64 Registered: May 2011 Location: pakistan
|
Member |
|
|
dear sir
i create EMP table data form with scott user
that run rightly
but when i run that form with fahim user that no give me the data and give me this error
no error-40505 unable to perform query
]error-40505 unable to perform query
see in attached file
how to other user use form for data feeding
i give the form to data entry operator for data feeding
please give me the solution
also i give all right to fahim of EMP table right
see sql command
CREATE USER fahim IDENTIFIED BY fahim;
GRANT CONNECT TO fahim;
GRANT CONNECT, RESOURCE, DBA TO fahim;
GRANT CREATE SESSION TO fahim;
GRANT SELECT, INSERT, UPDATE, DELETE ON emp TO fahim;
|
|
|
|
|
|
|
|
Re: table right user [message #687733 is a reply to message #687727] |
Wed, 17 May 2023 15:02  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If user FAHIM should see all SCOTT's tables, you could write code to write code for you.
For example, connected as SCOTT run the following PL/SQL block, spool output into a .SQL script and run it when connected as FAHIM.
SQL> spool fahim.sql
SQL> set serveroutput on;
SQL> declare
2 l_str varchar2(200);
3 begin
4 for cur_r in (select table_name from user_tables) loop
5 l_str := 'create synonym ' || cur_r.table_name || ' for scott.' || cur_r.table_name ||';';
6 dbms_output.put_line(l_str);
7 end loop;
8 end;
9 /
create synonym STAFF for scott.STAFF;
create synonym TEST for scott.TEST;
create synonym HOSPITAL_WARDS for scott.HOSPITAL_WARDS;
create synonym HOSPITAL_BEDS for scott.HOSPITAL_BEDS;
create synonym MASTER for scott.MASTER;
create synonym TABLEA for scott.TABLEA;
create synonym TABLEB for scott.TABLEB;
<snip>
create synonym BUY for scott.BUY;
create synonym RENT for scott.RENT;
PL/SQL procedure successfully completed.
SQL> spool off
SQL>
(Edit FAHIM.SQL first as it contains PL/SQL block as well, and you don't need it).
|
|
|