Private synonyms and multiple schemas

Posts   
 
    
tomc
User
Posts: 31
Joined: 28-Jun-2006
# Posted on: 26-Jul-2006 22:53:19   

I have a project that uses a single schema and has some entities that are based on private synonyms. The schema name starts with 'R' (this is revelant). I performed a catalog refresh in order to add another schema. The new schema's name starts with 'S', i.e. it is later in the alphabet than 'R'. After performing the refresh, Designer claimed that none of the entities that were based on private synonyms were available in the catalog. I loaded the original project and then tried adding a schema whose name started with 'P', i.e. earlier in the alphabet. In this case I did not experience any problems.

I was able to reproduce this behaviour using three other schemas.

Can you please try to reproduce this problem?

Tom

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 26-Jul-2006 23:09:12   

Please explain what the synonyms are: synonyms of tables in the same schema or in other schemas, and in WHICH schema, e.g. R has synonyms of tables in S or in P?

Frans Bouma | Lead developer LLBLGen Pro
tomc
User
Posts: 31
Joined: 28-Jun-2006
# Posted on: 26-Jul-2006 23:16:50   

They are synonyms to tables in other schemas. These other schemas are not R, S or P.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 27-Jul-2006 07:39:32   

Would you please state whether S or P have Synonyms to another schemas also? And if so whether they are to the same objects that R has Synonyms to?

Maybe a detailed presentation of Synonyms in each schema would be much helpful.

Thanks.

tomc
User
Posts: 31
Joined: 28-Jun-2006
# Posted on: 27-Jul-2006 17:06:20   

In what form would you like the 'detailed presentation'.

I can confirm that the target tables from the entities that are based on the R synonyms are not referenced by the S and P private synonyms. I have tried a number of cases where S and P have, and don't have, any private synonyms. This does not seem to affect the results. In fact, the S schema I used was the SCOTT sample schema that most people are familiar with. It is very simple and does not have any private synonyms. It causes the problem.

From your questions, I gather you are having trouble reproducing the problem. Is this the case? If it is, can you describe the scenario you have tried?

In case it is important, I am using V2.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 27-Jul-2006 17:31:19   

Ok, this gets very confusing, so use REAL names, and state precisely where the synonyms are located and in which schema(s) the targets for these synonyms are located.

For what I understand: - R contains synonyms, e.g. MySyn - MySyn is a synonym of S.Foo - When you load R and S, MySyn isn't available. This is logical, as Foo is available. - When you load R and P, MySyn is available, which is also logical, as Foo isn't available.

Is this the case?

Frans Bouma | Lead developer LLBLGen Pro
tomc
User
Posts: 31
Joined: 28-Jun-2006
# Posted on: 27-Jul-2006 18:27:16   

I am sorry if this is a bit confusing, but I have set up a very simple wink example that I will describe in detail.

I have four schemas: A, X, Y, and Z

A contains a table named ATABLE X contains a table named XTABLE Z contains a table named ZTABLE

All the tables have full public access rights.

There is a private synonym in Y named SYNONYM_TO_ATABLE that references A.ATABLE. There are no private synonyms in A, X or Z.

I create a project in the LLBLGen Designer and connect as user Y. I select only schema Y. I then create an entity named SynonymToAtable and save the project.

I then refresh the catalog and select both X and Y schemas. Everything works fine. However, if I select Y and Z rather than X and Y, Designer claims that SynonymToAtable is no longer in the catalog and deletes it from the project.

I hope that makes it a little clearer confused .

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 27-Jul-2006 19:14:41   

Hmm, that's indeed strange. I'll check it out.

Edit: reproduced: OE has syn to HR.JOBS, shows up nicely with OE in project. When SCOTT is added, which has no synonyms, Jobs is removed as OE.JOBS isn't found.

I must say, one of the weirdest errors I've seen in a long time simple_smile . Will check it out.

Edit: MondayMorningCoding.exe flushed

As you might have guessed, I store the sortedlist with the synonyms found in a structure, but this is always the same sortedlist, so if a schema follows another schema which doesn't have synonyms, they're gone. At least that seems like it. They're simply gone when I try to merge them into the main table list.

Fixed in next build (v2 and v1.0.2005.1).

Frans Bouma | Lead developer LLBLGen Pro