Syntax of GRANT: grant SELECT on table privileges to a user on a remote database

Hello
I have two databases: DEV1 and DEV2. Dev1 is my source database and DEV2 is the target database. There is a table in the diagram A on Dev1. I created a DBLINK PUBLIC 'TESTDBLINK' in the diagram B on DEV2 that connects to figure A on DEV1.

Machine of Table for the database schema
DEV1 AN EMP 192.168.210.10

Database Machine Lik database schema
DEV2 B TESTDBLINK 192.168.210.11

How to SELECT on the schema Table EMP (DEV1) diagram b the DEV2 privileges? What is the syntax?


Sign up for example in the form of scheme A on DEV 1

SQL > GRANT SELECT ON EMP to? * *

Thanks for your contributions
Harry

Do not give this table in diagram A diagram B.

Inside the diagram B, you can just issue a select statement as follows:

select *
from table@db-link-to-A

Oracle connects to the remote instance by using the credentials of the scheme A, and since A is the owner of this table, Oracle can already access the table.

Tags: Database

Similar Questions

  • Grant select any view privilege

    I want to grant a privilege to SELECT ANY VIEW user but not GRANT SELECT the ENTIRE TABLE. How can I make...

    Extract the query below and run it.

    Select ' grant select on ' | OWNER | '.' || view_name | « à » || ';' from dba_views;

  • Grant select on Tables

    Friends

    What would be the easiest way to give a user access to SELECT a table, but excluding him a specific column?

    TKS!

    Hello KeenOnOracle

    Yes. You can see the contents of the table in real-time in a view.

    Docu to version 11.2

    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_8004.htm#SQLRF01504

    Best regards, David

  • How to prevent a user not to access a table of perticular? This user has select any table privilege. Please help me solve this problem.

    Hello

    How to prevent a user not to access a table special (xxx)?

    This user has SELECT a TABLE ALL privilege. I need to restrict to only not for access xxx to the table, but this table is not existed in its own schema.

    But there is access able as select * from schema.table;

    How can I revoke this privilege.

    Please help me solve this problem.

    Thank you

    Lacombe

    1623609 wrote:

    How can I select privilege on specific tables at the same time?

    I want to create a new user and grants the right to select for tables, except a table (xxxx).

    It will be possible without the keystone of the database?

    One way, in several sql

    coil doit.sql

    Select ' grant select on ' | owner: '. ' || table_name |' to someuser. »

    from dba_tables

    where

    spool off

    Then sanity check "doit.sql" and execute it.

  • Grant Select on sys.dba_role_priv to the user; error

    version 10204
    It's the user's request: Add: select sys.dba_role_priv to: ROLE vas_user;

    I was just wondering what I'm doing wrong? How to fix?

    SQL > grant Select on sys.dba_role_priv to vas_user;
    Grant Select on sys.dba_role_priv to vas_user
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist

    I was just wondering what I'm doing wrong?

    incorrect spelling

    How to fix?

    Use the correct name

    SQL> desc dba_role_priv
    ERROR:
    ORA-04043: object dba_role_priv does not exist
    
    SQL> desc dba_role_privs
     Name                                                       Null?    Type
     ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     GRANTEE                                                   VARCHAR2(30)
     GRANTED_ROLE                                                  NOT NULL VARCHAR2(30)
     ADMIN_OPTION                                                   VARCHAR2(3)
     DEFAULT_ROLE                                                   VARCHAR2(3)
    
  • Granting select permission on the view to the schema of the database different.

    Dear all

    I need schema view 'data_model_eb' APPS to grant select permission on a different database schema "HHS" on another server.

    Kindly help me to create the link to the db and grant the select permission.

    Thank you.

    You have two solution, but I think the second One is the best for you, what is your version of the database!

    create view  as select * from table_name@dblink
    grant select on  to USER;
    

    OR create a PUBLIC database link

  • Grant select on the pattern of other users

    Say there are two patterns A and B, UserA is the owner of A schema and UserB is owner of the schema (B) can we have UserB gave a grant select on A diagram? If so, how? Thank you!

    A GRANT must be performed for each object in the schema of a user.

    Hemant K Collette
    http://hemantoracledba.blogspot.com

  • grant on the tables

    Hello

    I created a schema and select granted the privileges on the other tables in the schema.
    but the scheme may select all tables in other schemas, how to access the other tables in the schema:

    I HAV created the user, select granted privileges on the tables in the diagram B
    BT can select all tables of B?

    WHY?

    Because either

    (A) has been granted to another ROLE that allows him to query ANY table
    (b) has been granted the privilege to CHOOSE ANY TABLE
    (c) ' PUBLIC' has been granted SELECT on "table B

    Hemant K Collette

  • grant on the tables of a user

    Hi all

    I have an a_master of the master user, I have two users test1 and test2.

    a_master has 10 tables, and I got select on all these paintings to test1 and test2.
    ex:-grant select on table1 to test1;
    Grant select on table1 to test2;

    Test1 and test2 can create views on the tables of a_master.

    But if you try to assign a select on a view created by test1 (in the schema test1) on a_master to test2 tables,
    ex:-create view test_view as select a_master.table1-> created view name

    Grant select on test_view to test2; -> ERROR INSUFFICIENT PRIVILEGES


    a solution for this is to change my return and grant of a_master as
    Grant select on a_master.table1 to test1 with grant option;

    but this means test1 may grant select this option for any other user as well, which is a problem for me.

    is it possible that test2 user can just see the views created by test1 without renouncing the option "with grant option.

    any suggestions are appreciated.

    Kind regards

    Published by: user10243788 on February 1st, 2010 05:39

    user10243788 wrote:
    It is possible that the user test2 can simply select the views created by test1, I don't want to do "with grant option" test1 due to database security problems.

    This is possible only if the views created by test1 based objects belonged to test1.

  • Grant select privilege on the table column

    Hello
    I think that it is not possible to give the right to select level of column in a table.

    by example-grant select (col1, col2) on table1 to User1;

    Can anyone suggest what might be the way to achieve (apart from creating a view on the table).

    Hi, Anit,

    Anit says:
    Hi Frank,.
    Thanks for the reply. Nothing bad to see.

    Then use a notice. It is simpler and more robust.

    As that I knew WHAT EVP is used for the column data hide with a null value or other values. do not hide the entire column of the selection operation. Please correct me if I'm wrong.

    Maksing the column with a null value or another value is hide the column.
    Do what you should always do whenever you have a question. Post some sample data (CREATE TABLE and INSERT statements) and the results desired from these data. In this case, after an authorized user (that is, a user with all privileges) must get results and results that a user with lesser forge privileges.

    A view (or a copy of the table, as a materialized view) is the only way I know to prevent users to know that there is a column (for example) called credit_card_num.
    Use row-level security, you can return NULL when users not allowed to reference credit_card_num, or you can trigger an error if they try to refer to this column.

  • How to remove grant select to one user, if this table contains public subsidies.

    Hi all

    Owner of the table gave all access to a table to the public

    for example

    >

    grant all on table1  to public;
    

    But now for a user "user1" if we remove select grant

     revoke   select  on table1 from user1;
    

    I get the error ORA-01927: cannot REVOKE privileges you did not

    OK if I revoke all access to "user1."

    revoke   all  on table1 from user1;
    

    I get Revoke succeeded.

    But always in the connection of the User1, I can select data from table1.

    Why?

    Is it because I gave all subsidies to the public?

    Above scenario must revoke the access of a user to a table that has all government subsidies.

    Yes, it's because SELECT on the table access has been granted to the PUBLIC.  The user still has the option to SELECT the table after you have removed the direct subsidies because they can always access privileges granted by the PUBLIC.

    If you want all users to have access to the table, you shouldn't be granting access to the PUBLIC in the first place.  Create a new role, grant SELECT on the table for this new role and assign this role to all users need.

    If for any reason, you're stuck with the issuance to the PUBLIC, I suppose you could create a policy from the CAE on the table that prevents the user to see all the data.  But it's a lot more work to get grants of privilege correct in the first place.

    Justin

  • Access grant select on all tables in a diagram to another diagram

    Hi all

    I can grant select access on the tables of a schema (SAY USER1) to another (SAY USER2) by giving him a role and in turn grant this role to another scheme as below:

    FOR x IN (SELECT * from user_tables)
    LOOP
    RUN IMMEDIATELY "SELECT WE GRANT | x.table_name | "To < < role1 > > ';
    END LOOP;

    Role1 Grant User2;

    but my question is that suppose I create another table say "TEMP_TAB" in the scheme of USER1 after the execution of the block above user2 will be able to access the table TEMP_TAB. My guess is certainly not. If I'm wrong, I want a way to grant select on a table in the schema of user1 immediately as and when it is created to User2.

    Please suggest a solution.

    Thank you and best regards,
    Vipin Kumar Rai

    993280 wrote:
    Knani,

    but in this case the User2 can choose any table in any schema. I want only USER2 for the right to select for only User1 tables.

    Thank you
    Vipin

    Oh sorry. Misinterpreted your post. What you did is the right way to do it. You must add the select role privilege whenever you create a new table. There is no "SELECT the TABLE all THE" specific to a type of data user privilege.

  • GRANT SELECT on a table to the user / role changes for the tab last_DDL

    Hello

    Is grant select (or any private object) to the user/role a DDL statement?

    GRANT SELECT on a table to the user / role changes the last_DDL to the table.
    1 > is this expected behavior?
    2 > no way in which we can grant select on a table by another user, without changing the DDL? (for example create view).


    The test is performed:

    Prior to the issuance:


    OBJECT_NAME CREATED TIMESTAMP LAST_DDL_TIME OWNER
    ------- ---------------------- ---------- ------------- --------------------
    AR HZ_CUSTOMER_PROFILES 8 MAY 00 13 MARCH 13 2003-06 - 26:12:41:29



    Grant statement:
    GRANT SELECT ON "AR". "' HZ_CUSTOMER_PROFILES ' TO 'AR_VIEW ';

    Note: AR_VIEW is a role, I tried granting also directly to the user.


    After the grant:

    OBJECT_NAME CREATED TIMESTAMP LAST_DDL_TIME OWNER
    ------- ---------------------- ---------- ------------- --------------------
    AR HZ_CUSTOMER_PROFILES 8 MAY 00 21 MARCH 13 2003-06 - 26:12:41:29



    Old thread, discuss whether Grant is DDL or not, but no documented conclusions.
    ( Re: Grant, revoke is DDL and DCL? )

    Please help in the assessment above.

    -Best regards,.
    Mani

    It's the DOF.

    After all, this isn't DML, it implicitly committed and you cannot use it directly in PL/SQL: features of DDL. :-)

  • Grant on a table but do not see the TRIGGER

    I created a new user 10.2.0.4 on windows

    I have granted select and update on a couple of other users on the database table.

    My new user can see the table and the data but not the triggers on the table?

    What is the privilege of seeing these triggers?

    Give permission to the user to view the dba_triggers.

    Grant select on dba_triggers to abc;

    Concerning

  • Allows you to Grant Select, insert and update 10.2.0.4.0

    Hello

    I observed an unusual reflection in our database (version 10.2.0.4.0)

    We have 2 diagrams. Schema 1 has all the objects. We created synonyms for some specific Schema2 objects and have granted select privileges on the tables and execute on procedures and packages.

    While playing (in dev scheme of course), I found that I can update and insert records into tables having "Select" privilege only. I checked user_tab_privs_made schema1 and schema2 for this table user_tab_privs_recd, and in two places, it is show privilege as "Select". I checked a few other tables as well with the same results.

    It's very strange and I would like to know if any of you have experienced this problem. Is this a bug?

    Enjoy your entries.

    Thank you
    AT

    I did check the sys privs in the IMP_FULL_DATABASE role and found there:

    UPDATE/INSERT no matter WHAT TABLE, but it is not DELETE ANY table. This is why the 2nd scheme user can upgrade AND INSERTION using synonyms on the tables belonged to the 1st scheam user. Hemant was right.

    PRIVILEGE
    COMPREHENSIVE REWRITE
    CREATE ANY ORDER
    CREATE PUBLIC SYNONYM
    CREATING A CLUSTER
    SELECT ANY TABLE
    ALTER ANY TABLE
    ADMINISTER THE DATABASE TRIGGERS
    CREATE A LIBRARY
    CREATE ANY DIRECTORY
    CREATE PROFILE
    CREATE A TRIGGER
    REMOVE ANY SYNONYM
    REMOVE ANY INDEX
    DROP ANY CLUSTER
    DELETE A TABLE
    DROP TABLESPACE
    CREATE ANY DIMENSION
    DROP ANY DIRECTORY
    DROP ANY TRIGGER
    REMOVE ANY VIEW
    CREATE A VIEW
    INSERT A TABLE
    CREATE A TABLE
    ADMINISTER THE RESOURCE MANAGER
    DROP AN INDEXTYPE
    DROP ANY OPERATOR
    DROP ANY LIBRARY
    CREATE PUBLIC DATABASE LINK
    CREATE AN INDEX
    COMMENT BY ANY TABLE
    DROP ROLLBACK SEGMENT
    CREATE ANY SQL PROFILE
    RECOVERY POSSIBLE
    EXECUTE ANY TYPE
    EDIT A TRIGGER
    ANY AUDIT
    DROP PUBLIC DATABASE LINK
    CREATE A SYNONYM
    DROP ANY PROFILE OF SQL
    DROP ANY CONTEXT
    MANAGE QUEUES
    CHANGE ANY TYPE
    REMOVE ANY MATERIALIZED VIEW
    CREATE A MATERIALIZED VIEW
    ANALYZE A
    RUN A PROCEDURE
    CREATE THE ROLLBACK SEGMENT
    CREATE TABLESPACE
    DROP ANY SCHEMA
    DROP ANY DIMENSION
    CREATE ANY OPERATOR
    DROP ANY TYPE
    CREATE ANY TYPE
    CHANGE ANY PROCEDURE
    CREATE A PROCEDURE
    DROP ANY ROLE
    DROP ANY ORDER
    DROP PUBLIC SYNONYM
    BECOME A USER
    CREATE ANY CONTEXT
    CREATE AN INDEXTYPE
    DROP PROFILE
    DROP ANY PROCEDURE
    CREATE THE ROLE
    CREATE THE DATABASE LINK
    UPDATE ANY TABLE
    DROP USER
    CREATING USER

    Published by: Kevin_K on April 2, 2009 08:54

Maybe you are looking for

  • The user guide and the Support Page at launch?

    Depending on how you define a product launch (or how many different "spear" in how many different places) it's time to make the section and support pages available user guide?

  • Repair of cracked palmrest

    I have this small filamentous on my T500 just above crack of the mic Jack - what should I do? I don't want to get fat

  • DeskJet 1110: Printer does not print documents with text

    What works: all HP tools, including HP print and Scan Doctor Test page of alignment (including black) Print images of Paintshop Pro Printing images using Windows Printing of text of the text editor Acrobat Reader PDF containing only images What does

  • Need to delete files

    Under the Windows folder, there are a lot of filenames will astonish blue with the prefix $ and suffix containing uninstall... These may be safelyremoved as they appear to occupy a lot of hard drive space?

  • IHost process for Windows Services has stopped working

    I get the following message if displayed in a window pop up on my screen. "Host process for Windows Services has stopped working. A problem caused the blocking of the program works correctly. Windows will close the program and notify you if a solutio