Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-7-sonnet-20250219-thinking-32k· AnthropicHugging Face LMArena Human Preference 140K

How do you grant a user the Oracle privilege to select against a certain database link?

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-sonnet-4-20250514’s answer.
  1. User

    How do you grant a user the Oracle privilege to select against a certain database link?

  2. Claude Assistant

    To grant a user the privilege to SELECT data through an Oracle database link, you need to:

    GRANT SELECT ON remote_schema.table_name@database_link TO username;
    

    This grants the user permission to query the specific remote table through the database link. For multiple tables, you'll need separate GRANT statements for each one.

    If you want to grant access to all tables in a remote schema:

    -- Create a view that joins to the remote tables
    CREATE VIEW local_view AS 
    SELECT * FROM remote_schema.table_name@database_link;
    
    -- Then grant access to the view
    GRANT SELECT ON local_view TO username;
    

    Important notes:

    • The user must also have the CREATE SESSION privilege
    • For public database links, users don't need special permissions on the link itself
    • The remote user account used by the database link must have appropriate permissions on the remote objects

    Would you like me to explain or break down this approach?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.