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.
Nakuru1234Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.