Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2011
    Posts
    3

    Unanswered: db2 user privileges

    Hi,
    I'm developing a product installer for an application that has to create a database on a DB2 during installation process. Since the database to be imported is very complex we have to check that the user has DB2 administrative privileges. Is this possible via command line call, or do I need to use a specific API library?

    Thanks in advance.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    What version of DB2 are you on ? and what platform ?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2011
    Posts
    3
    db2 9.1 to 9.7 on Windows and Unix

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I think the simplest way to do it is to rely on DB2 to determine user authorizations: issue the create database command and handle the error if it occurs.

  5. #5
    Join Date
    Jan 2011
    Posts
    3
    that's exactly the case we want to avoid with this check ;-)

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by xquadrat View Post
    that's exactly the case we want to avoid with this check ;-)
    Can you explain why?

    The user needs SYSADM or SYSCTRL authority to create a database. How you determine that depends on the DB2 version, operating system, a number of registry variables, security plugin in place, and some instance configuration settings.

Posting Permissions

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