Privileging the public synonym over schema object
Hello
I have a request.
I logged in a scheme called "SCOTT."
I have a table called 'EMP '.
Now, I created a view called "EMP_D" with the addition of more of a few columns.
Now I create a public synonym 'EMP' pointing to display "EMP_D".
Now, I'm pulled the query in the schema "SCOTT."
Select * from EMP
I want that data to the EMP_D view.
How to get there?
Thanks in advance
S. Jean-Charles
user629814 wrote:
My question is
is it possible to prioritize the resulting public synonym of the same schema?
Its only for a solution.
This is called "name resolution" and is documented here: http://docs.oracle.com/cd/B28359_01/server.111/b28310/general008.htm#ADMIN11561
1 oracle database attempts to qualify the first piece of the name referenced in the SQL statement. For example, in
scott.emp
,scott
is the first piece. If there is only one piece, the piece is considered to be the first piece.
- In the current schema, the database looking for an object whose name matches the first part of the name of the object. If it does not find such an object, it continues with step b.
- The database looking for a public synonym that matches the first part of the name. If it does not find one, it continues with stepc.
- ...
So if you have a schema object with the same name as a public synonym, oracle will always use first the schema object.
Your only chance would be to rename the schema object or use another schema.
Tags: Database
Similar Questions
-
How to find the sizes of all schema objects
Hi guru,.
I have a 10.2.0.4 database on the Windows platform.
How can I calculate the size of a particular schema objects (i.e.table, index, Mviews etc.)?
Is any dynamic script available for the same thing?
Thanks in advance.Why do you want to include nom_segment in the State? You need size of all objects in the schema.
simply question query provided that WHEN the OWNER = "tbl";
If you need that in Excel, you can use SQL Developer or any available for Oracle GUI tools.Murali Mohan
-
How to check what are the objects using this public synonym?
Hi Experts
Currently, I have a public synonym, WORK that is created for WORK table in the schema of the BRAND: "synonym PUBLIC EMPLOYMENT BRAND. JOB. "
SELECT THIS OPTION. WORK is granted to the TOM_UPDATE (a role): GRANT SELECT ON MARK. JOBS AT TOM_UPDATE;
I am using TOAD 9.6.1.1 and I wanted to drop the public synonym but I am not able to see that another object in the database uses this public synonym, JOB.
Help, please.moslee wrote:
Hi ExpertsCurrently, I have a public synonym, WORK that is created for WORK table in the schema of the BRAND: "synonym PUBLIC EMPLOYMENT BRAND. JOB. "
SELECT THIS OPTION. WORK is granted to the TOM_UPDATE (a role): GRANT SELECT ON MARK. JOBS AT TOM_UPDATE;I am using TOAD 9.6.1.1 and I wanted to drop the public synonym but
I am not able to see that another object in the database uses this public synonym, JOB.The objects are not "use the synonym".
The code use synonym to access object.use grep allows you to browse the source code that resides in your repository
-
What can I do for the creation of a public synonym view?
Hi people,
I create a public synonym of another object to users
SQL > create public synonym PAPD for scott.dept;
The synonym is created.
so I tend to create a view of this public syn
SQL > create view vpdep in select * from PAPD.
Create view vpdep in select * from PAPD
*
ERROR on line 1:
ORA-01031: insufficient privileges
I have the privilege to create view.also, I can create views of a public synonym for my own ex objects.for,
SQL > create public synonym cdep for dept.
The synonym is created.
SQL > create view vcdep in select * from cdep;
Created view.
What could be the reason behind this? is there any privilege required to me.pls suggest me.
Concerning
VIDSHi vidusnat!
It is onlinedocumentation to Oracle:
>
Privileges required to create viewsTo create a view, you must meet the following requirements:
You must have been granted one of the following system privileges, either explicitly, or by a role:
o CREATE The VIEW system privilege (to create views in your schema)
o The CREATE ANY VIEW system privilege (to create a view of another user schema)
You must explicitly obtained one of the following privileges:
o the SELECT, INSERT, UPDATE, or DELETE object privileges on all objects in the view's underlying base
o SELECT it ANY TABLE, INSERT a WHOLE TABLE, UPDATE ANY TABLE or DELETE ANY TABLE access privilegesIn addition, in order to grant access to your display of other users, you must have privileges to object to the base with the OPTION GIVING clause objects or system privileges with ADMIN OPTION clause. If you do not, users cannot access your view.
>I hope that this will bring a little light in the darkness!
Yours sincerely
Florian W.
-
2 various CARS: same Public Synonyms on the same 2 diagrams - any interaction?
I'm having a senior moment.
I have not worked with public synonyms that often, so I just want to make sure I got it right.
If you have two instances: Instance1 and Instance2
They both live on the same Oracle RAC cluster.
Intance1 and Instance2 have a schema named FRED. Both of them have a synonym Public THISTABLE for FRED. THISTABLE
Now, I want to just make sure that the public synonyms do NOT connect between two different, although instances on the same RAC system, right?
Someone on Instance2 inserting in fred.thistable is ONLY for this instance, instance1 do not affect all, correct?
You would have to do something like this, essentially a database link between them and could have a public link THISTABLE on Instance2 pointing to FRED. THISTABLE on Instance1... but simply want to make sure that I understand that only a dblink between two patterns on the two bodies will... allow traffic/access between the two bodies and public synonyms on their own will not cross the instance gap, even with two instances on the same cluster.
Once again, senior moment here and just want to make sure I have it directly.
Thanks in advance,
Cayenne
This case I put in place the same pattern of FRED and the same FRED table name. TABLEAUCETTE on the database instance instsqa... There is no link between the two with this public synonym on instdev. The only way you could link the two instances and schemas for the table would be by a... correct database link?
Yes. You got right.
Take CARS out of it. It's the same as if you had 2 databases one-off names instdev and instqa.
Post edited by: Brian Bontrager
-
name of the permission for ' drop public synonym '.
We fall synonymous public as:
How the permission/role is named to run this statement?GRANT DROP PUBLIC SYNONYM TO User1;
What table I can query to see if my connected user has this right?
I googled but did not.You must DROP PUBLIC SYNONYM privilege.
You can determine if your username has this privilege by running the following query:
SELECT * FROM dba_sys_privs WHERE grantee = 'your user here' AND privilege = 'DROP PUBLIC SYNONYM' ;
-
create or replace procedure proc_s
-return varchar2
is
v_Name varchar2 (20);
Start
-immediate execution "select name from r_temp where id = back 4: I ' using v_name;"
SELECT name in v_name from r_temp where id = 4;
-return (v_name);
dbms_output.put_line (v_Name);
end;
r_temp is the public synonym but this code generates the PL/SQL compilation error: ORA-00942: table or view does not exist
While that select * from r_temp code to return all rowsBut: the synonym is pointing to an underlying object: table.
"You can reference only synonymous with another user by using the privileges of the object that you got." For example, if you have the right to SELECT for the synonym of jward.emp, then you can query the synonym of jward.emp, but you cannot insert rows using the synonym of jward.emp. »
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14231/views.htm#sthref3138
Where my previous question. -
Oracle: 11.2.0
OS: Windows
Is it possible to export the public synonym with the help of the utility expdp?
Otherwise, what is the reason behind this?
Thank you
AKPT
Hello
public synonyms can be extracted on their own by using:
expdp / full = include = PUBLIC_SYNONYM/SYNONYM
Full database export then by default includes
Kind regards
Harry
-
Revoke the public object privileges
Hi guys,.
Database: 10.2.0.5
Recently, we have an audit performed on one of our production DB:
We are informed by the Auditor:
1 revoke execute to the public for the bottom of the packages/function:
UTL_SMTP
UTL_TCP
UTL_HTTP
UTL_FILE
DBMS_RANDOM
2 revoke access to table privileges (select, update, delete) public:
The owner of the tables where the privileges granted to public are essentially below which, according to me, are granted by default when creating the db:
CTXSYS
DMSYS
EXFSYS
MDSYS
OLAPSYS
ORDPLUGINS
ORDSYS
SYS
SYSTEM
WMSYS
XDB
I understand the risk to the public, this means that each what ID database in the database can use the access granted to the public.
Since he has granted by default by oracle, should really remove us it? I'm afraid that if I delete it, it will cause some complications.
Since he is identified as a result of security, why oracle grant to users who need instead of default public?
Avdvise nicely.
Thank you!Even better when defy you the Auditors use information from Oracle:
Be careful when you remove the privileges granted to the PUBLIC [247093.1 ID]
Invalid objects after revocation RUN privilege to the PUBLIC [797706.1 ID]
There are a couple of specific Oracle Application notes of the questions of dismissal of public which can also be interesting if you use Oracle Applications.
HTH - Mark D Powell.
-
Import only the public objects and patterns
Oracle 11.2.0.1
I have a test database set up with all users of the application - no data, no object.
I want to import only (production), users of the DDL application and also public objects such as synonyms and links from db. This will give what I need?
impdb system/******@orcl parfile=imp.txt --parfile contents full=yes network_link=remote_link content=metadata_only directory=DATA_PUMP_DIR logfile=schema_only_from_prod.log INCLUDE=SCHEMA:"IN('APPSYS1_GLOBAL','APPSYS2_GLOBAL','GLOBAL','PCDB','QDB','VCDB','ZAP')"
Hi orclrunner,
This command will import all the metadata this schema in your clause 'include', including the structure of the table and other items. If you want just synonymous inside and db links patterns, I think that you need will use the 'patterns' clause to specify patterns and the include to specify that you want just the links to the db and synonyms.
Something like this:
impdb system/***@orcl parfile = imp.txt
-parfile content
schemas = APPSYS1_GLOBAL, APPSYS2_GLOBAL, GLOBAL, PCDB, QDB, VCDB, ZAP
network_link = remote_link
Content = metadata_only
Directory = DATA_PUMP_DIR
logfile = schema_only_from_prod.log
INCLUDE = DATABASE_LINK, SYNONYM
Sorry, I can't test whether the syntax of the command is correct at this time.
I hope this helps.
Kind regards
Anatoli has.
-
How to revoke all privileges on a public synonym of a user
How to revoke all privileges on a public synonym of a user in 9i?you know the difference between PRIVATE and PUBLIC means?
Public synonyms are accessible to all users.
Private is accessible only inside its schema.If you do not want this user, use this synonym drop it and create a synonym in other schemas where users need.
-
Tables in the schema APEX_050000 not granted to the PUBLIC in the runtime environment
Hi all
I compare development and Runtime environment APEX_050000 property schema and subsidies. I have no error in two newspaper plants
Select count (*) in the dba_tab_privs where owner = 'APEX_050000' and recipient = "PUBLIC";
In development, count = 270, at runtime, count = 109
Select count (*) in the dba_synonyms where owner = 'PUBLIC' and table_owner = 'APEX_050000. '
To = 293, runtime development County, County = 270
Is this a bug? I'm running on DB 11.2.0.4
Any script available in APEX I can run to grant so many pictures?
Thank you, Dorothy
Dorothy salvation,
a single runtime system has intentionally less public synonyms and subsidies, because we do not install all the packages that are needed for a dev environment. But see wwv_flow.accept null off the coast of the element leader through the runtime environment to find the declaration of re - create these synonyms/grants.
Concerning
Patrick
-
How can I determine what were the privileges granted to the PUBLIC?
I don't know 'out of the box' privileges by default Oracle, but rather the privileges that have been granted since the day 0.
SQL > select * from dba_sys_privs where dealer = "PUBLIC";
no selected line
SQL > grant create any table to the public;
Grant succeeded.
SQL > select * from dba_sys_privs where dealer = "PUBLIC";
DEALER PRIVILEGE SMA
------------------------------ ---------------------------------------- ---
PUBLIC CREATE ANY TABLE NO.
SQL > revoke create any table of public;
Revoke succeeded.
SQL > select * from dba_sys_privs where dealer = "PUBLIC";
no selected line
SQL >
The
PUBLIC
role is a special role that each database user account is automatically when the account is created. By default, it has no privileges granted to it, but there are many grants, especially for Java objects.The same binding, which was provided by a member.
DBA_ROLE_PRIVS - roles granted to users and roles
ROLE_ROLE_PRIVS - roles that were granted to roles
ROLE_SYS_PRIVS - privileges granted to the roles system
ROLE_TAB_PRIVS - Table privileges granted to roles
Concerning
Girish Sharma
-
privileges, held by the public...
HOW CAN SIR WE FIND THE PRIVILEGES THAT ARE HELD BY THE PUBLIC USERGROUP IN THE ORACLE DATABASE. -
Does not receive the table name in the list of schema objects creating EO
Hello
IAM does not have my name of the table custom in the list of schema objects during the creation of EO.
I created a custom table and I need to use this table looks for creation EO,
But while creating the EO, I'm not able to find the table in the schema object list.
in the connection database, these tables are present, but only in this window (window of creation of Eo) these tables do not come
can someone please help how to solve this problem.
Hello
I found the solution
in business components that there is another database link that I've changed now, it works fine now
Maybe you are looking for
-
Need replacement screen for my computer pavilion laptop of 17 inches
I need the part number to replace the screen of my hp PavilionModel # 17 - g113dxI need to buy the cheapest please help if I replace my carThanks in advance
-
Vista is not using my default monitor.
I have VISTA 32 and I use an Acer H series LCD monitor, all software and drivers installed. When I go to customization under display settings, for the monitor, it shows "1. Generic PNP monitor on ATI Radeon HD 4300/4500 Series. On the drop-down menu
-
Windows 7 starter edition - can not enter my Optimum email
I have a new Dell netbook - using Windows 7 starter. Using McAfee for security. I used to be able to access my optonline email, but now when I connect, it just keeps "encircling"... it seems that I will see my email, but it never comes to the top -
-
Technical problem of the MFP HP Laserjet 1536dnf
I have windows 7 64 bit running on a Dell Optiplex 9010. I contacted HP, but they directed me here. I load fonts into the MFP from HP Laserjet 1536dnf printer. When I print files, fonts are cancelled. One thing that causes the font to cancel the a
-
Why my printer to its good installation used series c3140
Why used my install photosmart with correct serial number? He said a c3100 when it's an error c3140