Solved

Create Oracle Synonym

Posted on 2012-03-28
12
537 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 150 total points
ID: 37778518
log in as UTGUSER....

create synonym YOURSYNONYM for UTG.UTGWEBRESULTS
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 350 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 150 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 350 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 350 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Nested table uses ? 2 59
PL/SQl Expanding the WHERE statement in query 3 53
Dbms_job.change procedure 16 31
Oracle Date add 9 30
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database

737 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