Home > Database > Oracle > body text

What to do if Oracle synonym creation permission is insufficient

WBOY
Release: 2022-06-10 16:04:14
Original
5022 people have browsed it

In Oracle, you can use the "grant create synonym to username" statement to solve the problem of insufficient synonym creation permissions; this statement can add the permission to create synonyms to the specified user. If you want to create private synonyms in the architecture, Requires "CREATE SYNONYM" system permission.

What to do if Oracle synonym creation permission is insufficient

The operating environment of this tutorial: Windows 10 system, Oracle version 12c, Dell G3 computer.

What should I do if there is insufficient permission to create synonyms in oracle

Problem description

I need help understanding what a user creates when pointing to another (different) schema object What authorizations/privileges are required for synonyms.

When I try the below I get ora-01031 Insufficient permissions, so obviously I'm missing and unable to apply other required permissions. I tried my best to Searched but couldn't find anything specific to cross-architecture synonyms.

What to do if Oracle synonym creation permission is insufficient

Recommended answer

CREATE SYNONYM commands include: Prerequisites

To create a private synonym in your own schema, you must have the CREATE SYNONYM system privilege.

To create a private synonym in another user's schema, you must have CREATE ANY SYNONYM system permission.

To create a PUBLIC synonym, you must have the CREATE PUBLIC SYNONYM system permission.

You are trying to READWRITE a private synonym in your own schema, so you must do this:

Solution: Grant permissionGive permission to create synonyms, enter grant create synonym to scott; Note that the semicolon gives the user scott the ability to create synonyms. permissions.

grant create synonym to scott;
Copy after login

What to do if Oracle synonym creation permission is insufficientTo grant the create view permission, enter grant create view to scott; note the semicolon to grant the create view permission to the scott user.

The objects pointed to by the synonyms are in a different schema, but that is not relevant here.

If your new account is only intended to access objects in the GDACS schema, and especially if you are granting There are many objects with access rights, so as an alternative to having to create synonyms for everything that has access, change the current_schema for new users in each session - possibly via a login trigger.

Recommended Tutorial:《

OracleVideoTutorial

The above is the detailed content of What to do if Oracle synonym creation permission is insufficient. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!