Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2012
    Posts
    177

    Unanswered: Command to give the user priviliges

    Hi all,

    What is the command to give the user priviliges like select, insert,update,delete for the table under database?

    Ex:

    Database name: CN_STG
    Schema name : sc.stg
    user : sc_tl
    It contains nearly 500 tables.

    Thanks,
    laxman

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Refer to the GRANT statement (and all its variations) in the Infocenter for your version of DB2

  3. #3
    Join Date
    Aug 2008
    Posts
    147
    An example of granting SELECT privileges on a table is :
    GRANT SELECT ON MYSCHEMA.MTTBLE TO USER MYUSER
    ---------------------------------
    www.sqlserver-dba.com
    www.dba-db2.com

  4. #4
    Join Date
    Dec 2010
    Posts
    123
    Hi Bhanu,
    If it is AIX first we have add following two lines in /home/username/.profile
    If it is linux first we have add following two lines in /home/username/.bashrc

    # The following three lines have been added by UDB DB2.
    if [ -f /home/db2inst1/sqllib/db2profile ]; then
    . /home/db2inst1/sqllib/db2profile
    fi
    After we can perform grant command

  5. #5
    Join Date
    Sep 2012
    Posts
    177
    Hi JACK,

    Thanks for you kind reply..

    If it is possible to give the permissions for each table under database using a single command?

    Ex: Database contains 500 tables

    Thanks,
    laxman

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    no not possible- best is to create a script that will generate these statements
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

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