{"id":59,"date":"2006-09-05T10:30:24","date_gmt":"2006-09-05T15:30:24","guid":{"rendered":"http:\/\/stein.everybody.org\/brain\/db2-sql-error-sqlcode-551-sqlstate-42501\/"},"modified":"2011-03-10T10:57:31","modified_gmt":"2011-03-10T15:57:31","slug":"db2-sql-error-sqlcode-551-sqlstate-42501","status":"publish","type":"post","link":"https:\/\/jeremystein.com\/brain\/db2-sql-error-sqlcode-551-sqlstate-42501\/","title":{"rendered":"DB2 SQL error: SQLCODE: -551, SQLSTATE: 42501"},"content":{"rendered":"<p>I got this error when the database user account I had created for my application was unable to access a table I had recently created.  With DB2, you have to explicitly grant access to each table in the schema, and I hadn&#8217;t updated my user&#8217;s permissions to grant permission to that one.  What a waste of time!  Instead, I just went to the control center (DB2 8.1 PE) and changed the user to have the database permission &#8220;Database administrator authority&#8221;.  That&#8217;s equivalent to granting dbadm permission, which also gives access to all tables.<\/p>\n<p>Unfortunately, this also gives the user all sorts of extra permission I wouldn&#8217;t want him to have (like dropping tables, or worse &#8212; creating external routines), but this is just for development, so I&#8217;m not worried about it.  I wouldn&#8217;t recommend this for production configuration (especially for publicly-accessible applications).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got this error when the database user account I had created for my application was unable to access a table I had recently created. With DB2, you have to explicitly grant access to each table in the schema, and I hadn&#8217;t updated my user&#8217;s permissions to grant permission to that one. What a waste [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-db2"],"_links":{"self":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":0,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"wp:attachment":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}