This is a migrated thread and some comments may be shown as answers.

Support for Synonyms

9 Answers 111 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Carlos Sesma
Top achievements
Rank 1
Carlos Sesma asked on 09 Jun 2010, 09:09 PM
I'd like to use reverse mapping for Synonyms in Oracle.

Currently access to the db schema is restricted, dba manage rights by creating synonyms, so, i cant see any information about tables, views, sp, other than the synonyms list,that is not being pulled by the OpenAccess wizard and i cannot generate the persistent classes.

regards.

9 Answers, 1 is accepted

Sort by
0
Accepted
Ady
Telerik team
answered on 14 Jun 2010, 09:35 AM
Hi CARLOS SESMA,

At the moment we are not reading the oracle synonyms. We will look into it. As a workaround you could have a database where the tables have the synonym names which you can then reverse engineer using the wizard, to generate the classes. You can then switch the connection string to your original database for the runtime. During runtime the generated sql will work for the synonyms as well. I know it is some work but maybe your tools supports something like that.

Sincerely yours,
Ady
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Carlos Sesma
Top achievements
Rank 1
answered on 14 Jun 2010, 05:25 PM
thank you , thats a very good idea,
I also noticed that,using the oracle tools for vs,  even that I'm not the dba, I was able to see the dba schema into the oracle panel.
could it be possible to do the same in OpenAccess?, that way if i am able to see others schemas, i dont need access to synonyms anymore.
Regards.
*note:by default openaccess only allows me to see my own schema.



0
Ady
Telerik team
answered on 16 Jun 2010, 04:24 PM
Hi CARLOS SESMA,

 It is possible to reverse map tables from other schemas. In the 'Options' dialog, in the wizard, you can select the desired schemas under the 'Schemata' section.

You will need to use the 'Merge' feature to read objects from the newly added schema(s).

Greetings,
Ady
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Carlos Sesma
Top achievements
Rank 1
answered on 18 Jun 2010, 02:33 PM
thank you for your answer
 as i put in the *note, for some reason the wizard doesn't allow me to add more schema's than my own.

as you can see in the picture, on the left panel, the connection tree shows two schema's, MARTDBA and MARTUSER.
same connection settings are being used for the "enable openaccess" wizard. despite that, only default schema is available at schemata dialog.

regards.




0
Carlos Sesma
Top achievements
Rank 1
answered on 18 Jun 2010, 02:36 PM
i know this has nothing to do with synonyms. ill open a new thread for the next reply.

regards.

0
Carlos Sesma
Top achievements
Rank 1
answered on 18 Jun 2010, 10:47 PM
I took the example provided in
edited to use the schema I wanted to see and it works.

thank you.

<?xml version="1.0" encoding="UTF-8"?> 
<openaccess> 
    <classGenerator defaultPackageName="ConsoleApplication1"
        <tables/> 
        <views/> 
        <procedures/> 
    </classGenerator> 
    <options> 
        <general mapTables="True" mapViews="False" /> 
        <sourcegeneration partial="True" /> 
        <allSchemata> 
            <schemata name="MARTDBA" /> 
        </allSchemata> 
        <usedSchemata> 
            <schemata name="MARTDBA" /> 
        </usedSchemata> 
        <mapping> 
            <identity explicitIDClass="False" /> 
            <class generateFKIDField="True" generateVersionField="True" /> 
            <procedure insert="False" update="False" delete="False" /> 
        </mapping> 
    </options> 
</openaccess> 

0
Ady
Telerik team
answered on 21 Jun 2010, 12:14 PM
Hello Carlos Sesma,

 I'm glad that this workaround worked for you. Does the 'MARTDBA' schema contain tables or only stored procedures? We have tested the scenario you mentioned and it works as expected i.e I can see the various non-default schemas. Does the 'MARTUSER' have access to objects in the 'MARTDBA' schema?

Regards,
Ady
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Carlos Sesma
Top achievements
Rank 1
answered on 21 Jun 2010, 02:49 PM

MARTDBA schema contains everything, SP, tables, vies, sequences, etc.
MARTUSER have access to all views and tables, execute all SP, and get sequence number, etc. from MARTDBA schema,
the only thing it cant do is delete or create objects.
MARTUSER rights are given through synonyms. thats why i cant see anything besides synonyms in MARTUSER schema.

Through this workaround i can see in openaccess exactly the same objects as using Oracle developer tools Treeview. (tables,views,sp) from MARTDBA that is what i was expecting.

*note:im using oracle 9i.

regards.
0
Ady
Telerik team
answered on 22 Jun 2010, 10:28 AM
Hello Carlos Sesma,

 Thank you for the input. I will look into this case where all the rights are managed via synonyms. Your Telerik points have been updated.

All the best,
Ady
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Databases and Data Types
Asked by
Carlos Sesma
Top achievements
Rank 1
Answers by
Ady
Telerik team
Carlos Sesma
Top achievements
Rank 1
Share this question
or