Doubt about namespaces

Informações sobre as certificações oracle, dúvidas, exemplos, OCP, OCA, OCM, etc.
Post Reply
ademilton
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 3
Joined: Sat, 12 Jul 2014 12:39 pm

Hello.

This is a very conceptual doubt. Studying for proof 1Z0-047 I see by the explanation of namespaces that Roles, Users and Public Synonyms objects occupy a namespace in database.

So I can not create a role with the same name as a user. But I can create a public synonym with the same name as a user. I can also create a Public Synonym with the same name as a role.

So is no longer correct to say that Public Synonym occupies a different namespace of Roles and Users, which in turn occupy another common namespace?
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Hi Ademilton,
Funny, I tried to reproduce your statements in my 11G base with the same results.

Select all

SQL> CREATE USER LIXO IDENTIFIED BY LIXO; 
User created. 
 
SQL> CREATE ROLE LIXO; 
CREATE ROLE LIXO 
            * 
ERROR at line 1: 
ORA-01921: role name 'LIXO' conflicts with another user or role name 
 
SQL> CREATE PUBLIC SYNONYM LIXO FOR DUAL; 
Synonym created. 

I think - based on his experience - we can consider Public Synonym as a namespace "apart", and roles and User share the same namespace.

But for the effect of examination 1Z0-047, you should always consider that User, Role and Public Synonym share the same namespace.

I looked on the theme in Oracle's manuals, but I did not find any observation on this topic. It may be that a forist may indicate some passage in the documentation on namespaces.

Hugs,

Sergio
ademilton
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 3
Joined: Sat, 12 Jul 2014 12:39 pm

Hello.

grateful for return.

This excerpt from the documentation seems to confirm the reasoning that public objects occupy a namespace aside:


(extracted from http://docs.oracle.com/cd/E21901_01/doc ... m#TTSQL445 )

I wonder the following ... If you set the idea that the same namespace houses User, Role and Public Synonym, and fall an issue simply demonstrating a Sequence of commands like this you tested and asking to answer which they would successfully execute and what would fail ... would not I be prone to err?
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Ademilton,

I have already read several documentations and preparation materials for this exam, and everything they taught me was that User / Roles / Public Synonym stand on the same tablespace, which would not be 100 % true, as you can prove yourself.

I think a question of namespace falls on the test, it is not likely to appear an issue by placing these alternatives:
a) the samer nameplace for user, roles and public synonyms
(b) the same namespet for user and roles
c) other ...
if by chance There is a situation like this ("a", "B") would say to respond "B".
In the absence of the "B" alternative, then answer "A", even though it is not 100% true.

is another suggestion, okay?

Hugs,

Sergio
ademilton
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 3
Joined: Sat, 12 Jul 2014 12:39 pm

Thanks again !!
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests