Monday 22 April 2013

Troubleshooting db2 error " SQL0551N "

 


Error Message : SQL0551N "user does not have the privilege to perform operation GRANT"   
If you receive this message from the DB2 client while connecting to DB2 , you may have to bind the DB2 utility programs to the database. You must apply the procedure to each database you are using with the application server. Here is the binding procedure:
  1. Log in as your DB2 instance user (such as db2inst1), change to the bnd subdirectory of the instance, and start the DB2 utility.
      db2inst1@mymachine>  cd sqllib/bnd
      db2inst1@mymachine>  db2
    
  2. Connect to your database as the DB2 administrator:
      db2 => connect to mydatabase user db2admin using db2admin
    
    You will see the following info:
      Database Connection Information
      Database server        = DB2/NT 6.1.0
      SQL authorization ID   = DB2ADMIN
      Local database alias   = MYDATABASE
    
    1. Get the list of authorities for this authorization ID.  For example: SELECT * FROM TABLE (SYSPROC.AUTH_LIST_AUTHORITIES_FOR_AUTHID ('BOB', 'U'))AS T  ORDER BY AUTHORITY
    2. (Optional) Grant any missing authorities.  For example: GRANT DBADM ON DATABASE TO USER BOB
  3. Run the first bind command:
      db2 => bind @db2ubind.lst blocking all grant public
    
  4. Run the second bind command:
      db2 => bind @db2cli.lst blocking all grant public 
    

No comments:

Post a Comment