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 > How to alias a user

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-19-04, 08:51
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
How to alias a user

Anyone can explain how should a user be aliased ( please explain command ).
If aliased can we limit the permission compared to original user to aliased user ?

Thanks in Advance.
Reply With Quote
  #2 (permalink)  
Old 07-19-04, 09:20
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
If my understanding of your question is correct, then , you cannot alias a user afaik

Please explain with an example ...

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 07-19-04, 14:11
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
OK.
suppose you are a 'db2inst1' user with syadm/dbadm previledges and a new user 'mytask' wants to use all the object created by 'db2inst1' so if you alias 'mytask' to 'db2inst1'.
Reply With Quote
  #4 (permalink)  
Old 07-19-04, 15:20
browen browen is offline
Registered User
 
Join Date: Apr 2003
Posts: 17
Aliases are for objects, not users.

If you want to access objects in a schema other than one matching the connected ID, you can either:

--specify the objecte with db2inst1.TABNAME

--issue "db2 set schema db2inst1" This lasts for the duration of your session or until you change it.

--create aliases for each object:
create alias mytask.tabname for db2inst1.tabname
Reply With Quote
  #5 (permalink)  
Old 07-20-04, 10:48
famudba famudba is offline
Registered User
 
Join Date: Jan 2004
Location: Tallahassee, FL, USA
Posts: 96
you can create alias for user like below


db2 -x " select ' create alias mytask.'||rtrim(name)||' for '||rtrim(creator)||'.'||ltrim(name) ||';' from sysibm.systables where creator = 'DB2INST1' " > crtalias.sql


db2 -tvf crtalias.sql -z crtalias.log



that will generate DDL for create alias & create alias


hope it may help you


Thank You


Lekharaju Ennam
Certified Oracle & DB2 UDB DBA
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