If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > synonym ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-03-04, 06:09
SamCute SamCute is offline
Registered User
 
Join Date: Mar 2004
Posts: 205
synonym ?

Hi,

Is there any equivalent for Oracle synonym in DB2 ?

Eg :

CREATE SYNONYM test FOR test_tab

Thanks,
Sam
Reply With Quote
  #2 (permalink)  
Old 08-03-04, 06:17
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,

You shoud create alias!

Sintax:
Create alias db2admin.test_alias for db2admin.test

Hope this helps,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 08-03-04, 06:19
BrianFineos BrianFineos is offline
Registered User
 
Join Date: Jan 2004
Posts: 18
But you can only do this for Tables and Views.

You CANNOT create a Synonym/Alias for Sequences.

If anyone finds out how then feel free to post the answer.
Reply With Quote
  #4 (permalink)  
Old 08-03-04, 07:51
SamCute SamCute is offline
Registered User
 
Join Date: Mar 2004
Posts: 205
Hi,

Thanks for your reply. In Oracle, we have 'CREATE PUBLIC SYNONYM', wherein 'PUBLIC' provides the access to all users. How to do this in the 'CREATE ALIAS' query in DB2 ?

Also I tried with 'CREATE SYNONYM' in UDB DB2 8.1v, Its working fine, then what is the difference between 'synonym' and 'alias'

Thanks,
Sam
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On