Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    121

    Unanswered: 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.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  3. #3
    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'.

  4. #4
    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

  5. #5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •