Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    149

    Unanswered: schema privelages

    I have successfully granted connect to the group that requires it, now i am finding out that I need to grant select on the schema.tableame. My question this time is can it be done on the entire schema? ie the access is needed to do the same schema for the group, ex root.tablename where root is the schema that everyone needs to access.

    thanks in advance

    mark

  2. #2
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    149
    I grant select on a table in the database by issuing the following command

    db2 grant select on table schema.tablename to group groupname

    I then log in as a member of that group and connect to the database. I then I try to issue a SQL statement against the table i just gave permission on

    db2 select * from schema.tablename

    But i get the following error message

    SQL0104N An unexpected token "." was found following "admin.config archa99".
    Expected tokens may include: ",". SQLSTATE=42601

    I looked in the message reference and i can't make out what is wrong with what I am doing

    thanks in advance

    Mark

  3. #3
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    149
    Figured out the problem, for some reason it was reading all the files in the person's home directory(still don't know why it would?) but as long as the command is entered from the command line processor window everything is fine.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Mark,
    Looks like you are working on some Unix flavour. If so, it is best to enclose the command/sql within double quotes... for example,

    db2 "select * from syscat.tables"

    Unix command line interprets the * as an indication to list all files in the directory ....

    Hope this helps ...

    Cheers

    Sathyaram

    Originally posted by mark_maz
    Figured out the problem, for some reason it was reading all the files in the person's home directory(still don't know why it would?) but as long as the command is entered from the command line processor window everything is fine.

Posting Permissions

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