Solved

Create Oracle Synonym

Posted on 2012-03-28
12
512 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
  • 5
  • 5
  • 2
12 Comments
 
LVL 73

Assisted Solution

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

create synonym YOURSYNONYM for UTG.UTGWEBRESULTS
0
 
LVL 76

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 73

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
 
LVL 76

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

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 76

Expert Comment

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

works for me.
0
 
LVL 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now