?
Solved

Create Oracle Synonym

Posted on 2012-03-28
12
Medium Priority
?
554 Views
Last Modified: 2012-08-14
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
Comment
Question by:Nakuru1234
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
12 Comments
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 600 total points
ID: 37778518
log in as UTGUSER....

create synonym YOURSYNONYM for UTG.UTGWEBRESULTS
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1400 total points
ID: 37778520
If you have the proper permissions:
create synonym UTGUSER.UTGWEBRESULTS for UTG.UTGWEBRESULTS;
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 600 total points
ID: 37778524
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 1400 total points
ID: 37778525
>>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
 

Author Comment

by:Nakuru1234
ID: 37778676
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
 

Author Comment

by:Nakuru1234
ID: 37778789
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
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37778800
You need to grant specific privs on the base table as the table owner.  This was mentioned in http:#a37778524
0
 

Author Comment

by:Nakuru1234
ID: 37778843
What is http:#a37778524? If its a link it does not work.

N.
0
 

Author Comment

by:Nakuru1234
ID: 37778857
I am doing GRANT select, update, delete on UTG.UTGWEBRESULTS. Is that correct?

TIA,
N.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37778862
It is a reference link to post 37778524 in this question.

works for me.
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 1400 total points
ID: 37778867
>>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
 

Author Comment

by:Nakuru1234
ID: 37782284
Yes, its not Prod. So, I can give them those permissions. Thank you for asking.

TIA,
N.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question