views:

269

answers:

2

Hi,

I'm using NetBeans and I need to connect to Oracle Database.

I set up the driver and the connection and it all works fine. I can run queries on this connection just fine (through the IDE).

The problem is this- The tables I want to work with are not defined on the same schema that I use for the connection, although, my schema does have all the premissions to view and alter those tables.

But since the tables don't belong to this schema, they are not presented in the Tables node of the connection in NetBeans, and I can't use the wizard in order to create entities for those tables.

Any solutions?

Thanks, Malki.

A: 

Why can't you create another connection with schema containing tables you need? Why can't you create a connection without specified schema (which will give you access to all schemes the user is authorized to access)?

witzar
I can't create the tables in my schema, because I'm operating inside a big organization. The tables are already defined on a different schema, and I can access them from my schema.Is it possible to create a connection without specifying a schema? How is it done?
Malki
A: 

Does NetBeans work with synonyms ? If so you could try creating synonyms in your connection schema pointing to the tables in the primary schema.

If it is just for the purposes of the Wizard, grab your own development database and create copies of the tables there. Generate your app against connections to that database, and then just change your connection when you are done.

You app may want to issue a 'ALTER SESSION SET CURRENT_SCHEMA = ....' on logon so that it looks at the appropriate schema by default, rather than that of the connected user.

Gary