Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Schemas & Forms applications

Re: Schemas & Forms applications

From: Matt Foster <matt_foster_uk_at_yahoo.co.uk>
Date: 2000/05/17
Message-ID: <3922C1A6.E636B794@yahoo.co.uk>#1/1

Kevin Hughes wrote:
>
> Hi, I've just created my first forms 6.0 application and am preparing to
> deploy it. I have one big concern though. The database name is "bangor" and
> I created an user "research" who created the tables for my application. The
> forms application was then also created by "research". My problem is that
> if I create another database user, say "User1", when user1 logs into the
> database via the application, will the application now find the tables. As
> far as i understand it tables are prefixed with schema names so when
> "User1" logs onto the application the forms will look for tables named
> user1.tablename which of course don't exist.
>
> How can I overcome this? Do I need to edit my forms application so that all
> references to tables are in the format "research.tablename"? Do I need to
> create synonyms for the tablenames? Does forms take care of this itself
> when you prepare the application for deployment?
> I'm really confused about this issue and would be grateful for any help.
> We're a new Oracle site and as yet don't have anybody with any oracle
> experience.
>
> Thanks in advance,
>

Just as other posts say, you have to grant rights to the users and then create public synonyms

A quick way of doing this is as follows;

Log on as research

SELECT 'grant select, update, insert, delete on '||table_name||' to public;'
FROM user_tables;

You can change public to user1 if you only want user1 to have access

This will bring back a statement for each table in the research schema

e.g.,

grant select, update, insert, delete on TEST to public;

You can then copy and paste these statements and they will perform the grants. This is just a quicker way then manually performing the grant for each table.

You can then do the same for the synonyms

SELECT 'create public synonym '||table_name||' for research.'||table_name||';'
FROM user_tables;

Again this will provide a list of statements that you can then run.

Hth,

Matt Received on Wed May 17 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US