• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 557
  • Last Modified:

Create Oracle Synonym

Hello,

I have created a table name UTGWEBRESULTS in the UTG Schema. Now, I need to create a synonym in UTGUSER. How can I execute it? Here is my create sql statement;

CREATE TABLE UTG.UTGWEBRESULTS
(
  "Request ID"  CHAR(64),
  Results       CLOB
)
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
NOMONITORING;


ALTER TABLE UTG.UTGWEBRESULTS ADD (
  CONSTRAINT UTGWEBRESULTS_PK
 PRIMARY KEY
 ("Request ID"));


TIA,
N.
0
Nakuru1234
Asked:
Nakuru1234
  • 5
  • 5
  • 2
5 Solutions
 
sdstuberCommented:
log in as UTGUSER....

create synonym YOURSYNONYM for UTG.UTGWEBRESULTS
0
 
slightwv (䄆 Netminder) Commented:
If you have the proper permissions:
create synonym UTGUSER.UTGWEBRESULTS for UTG.UTGWEBRESULTS;
0
 
sdstuberCommented:
assuming utguser is supposed to have access to this table, don't forget to grant privileges to utguser or a role containing privileges on the table
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
slightwv (䄆 Netminder) Commented:
>>log in as UTGUSER....

To add, I don't like giving my users permission to create synonyms.  I create them for them...

It's a security thing.
0
 
Nakuru1234Author Commented:
Great help from all of you!!! It seems I do not have the suffcient privileges to create the synonym as UTGUSER. So, I have to wait for grants to do that before I can proceed. If I have further questions I will get back to you. Thank you.

Tia,
N.
0
 
Nakuru1234Author Commented:
I had to log into UTGUSER and create it with that account because I could not as UTG. But now I need to apply a GRANT back to UTG from UTGUSER table I created. How can I do that?

Tia,
N.
0
 
slightwv (䄆 Netminder) Commented:
You need to grant specific privs on the base table as the table owner.  This was mentioned in http:#a37778524
0
 
Nakuru1234Author Commented:
What is http:#a37778524? If its a link it does not work.

N.
0
 
Nakuru1234Author Commented:
I am doing GRANT select, update, delete on UTG.UTGWEBRESULTS. Is that correct?

TIA,
N.
0
 
slightwv (䄆 Netminder) Commented:
It is a reference link to post 37778524 in this question.

works for me.
0
 
slightwv (䄆 Netminder) Commented:
>>GRANT select, update, delete on UTG.UTGWEBRESULTS

As UTG:
GRANT select, update, delete on UTG.UTGWEBRESULTS to UTGUSER;

I cannot comment on 'correct'.  Do they need update and delete?
0
 
Nakuru1234Author Commented:
Yes, its not Prod. So, I can give them those permissions. Thank you for asking.

TIA,
N.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now