Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

performance Tuning 10g reference poster
 
Oracle training in Linux 

commands
 
Oracle training 

Excel
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> PUBLIC SCHEMA
Guest_fortheppl_*
post Nov 23 2007, 05:27 AM
Post #1





Guests






Hi

Is there any shema called PUBLIC in oracle?
what i mean to say is by default will the oracle creates PUBLIC ScCHEMA at the time of DATABASE CREATION or
PUBLIC SCHEMA Means all the schemas in the database other that SYS and SYSTEM??

What actually the term "PUBLIC SCHEMA" Means?
Go to the top of the page
 
+Quote Post
dave
post Nov 23 2007, 05:29 AM
Post #2


Advanced Member
***

Group: Members
Posts: 5,205
Joined: 8-October 04
Member No.: 785



not there is no public schema, there is a public role which is granted to everyone
Go to the top of the page
 
+Quote Post
Laurent Schneide...
post Nov 23 2007, 06:52 AM
Post #3


Advanced Member
***

Group: Members
Posts: 243
Joined: 24-June 07
From: Switzerland
Member No.: 9,590



QUOTE (dave @ Nov 23 2007, 11:30 AM) *
not there is no public schema, there is a public role which is granted to everyone


no, there is no PUBLIC role.

Public is rather a schema than a role, because it contains objects like synonyms and database links. However, it is a very special user that is created by Oracle

CODE
SQL> select name from sys.user$ where user#=1;
NAME
------------------------------
PUBLIC


Every grants to public applies to any user, and any object of public can be accessed by any user. However, it is a very special thing... I would rather say it is neither a ROLE nor a SCHEMA


--------------------
Go to the top of the page
 
+Quote Post
Laurent Schneide...
post Nov 23 2007, 07:03 AM
Post #4


Advanced Member
***

Group: Members
Posts: 243
Joined: 24-June 07
From: Switzerland
Member No.: 9,590



Oracle sometimes uses the term PUBLIC SCHEMA :

ex:
http://download.oracle.com/docs/cd/B28359_....htm#sthref1394
When you connect as SYSOPER, you are in the public schema


--------------------
Go to the top of the page
 
+Quote Post
suresh_oradba
post Nov 23 2007, 07:14 AM
Post #5


Advanced Member
***

Group: Members
Posts: 81
Joined: 30-August 07
Member No.: 11,600



Dear Laurent,
In sys.user$ view, there is an additional column type# which is (probably- I haven't checked docs)
0 for roles
1 for schemas

If it is so, then public is more a 'role' than a 'schema'.
Go to the top of the page
 
+Quote Post
aussie_dba
post Nov 23 2007, 08:07 AM
Post #6


Advanced Member
***

Group: Members
Posts: 598
Joined: 28-August 04
Member No.: 495



> then public is more a 'role' than a 'schema'.

A role? It acts like a user in the syntax . . .

grant update on emp to public
Go to the top of the page
 
+Quote Post
Laurent Schneide...
post Nov 23 2007, 08:29 AM
Post #7


Advanced Member
***

Group: Members
Posts: 243
Joined: 24-June 07
From: Switzerland
Member No.: 9,590



QUOTE (suresh_oradba @ Nov 23 2007, 01:15 PM) *
Dear Laurent,
In sys.user$ view, there is an additional column type# which is (probably- I haven't checked docs)
0 for roles
1 for schemas

If it is so, then public is more a 'role' than a 'schema'.


well, you will not find the internal tables in the doc, do not search!

PUBLIC is neither in DBA_ROLES nor in DBA_USERS. And Oracle used the term PUBLIC SCHEMA more than once, but I would rather say PUBLIC is special, you cannot drop, create or alter PUBLIC. Under certain circumstances, public is seen a schema, as it is an OWNER in all_objects

CODE
SQL> connect / as sysoper
Connected.
SQL> show USER
USER is "PUBLIC"


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th April 2014 - 11:25 AM