{"id":1310,"date":"2012-04-28T19:58:09","date_gmt":"2012-04-28T13:58:09","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=1310"},"modified":"2016-01-07T11:31:04","modified_gmt":"2016-01-07T05:31:04","slug":"gotcha-when-restoring-database-with-restrictive-access","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=1310","title":{"rendered":"Gotcha when restoring database with restrictive access !"},"content":{"rendered":"<p>Starting from DB2 V9.1, IBM added a parameter on the CREATE DATABASE command called RESTRICTIVE. \u00c2\u00a0 When this parameter is specified nobody other than the userid creating the database gets any implicit access to the database. \u00c2\u00a0The database is automatically in a &#8216;locked down&#8217; state. \u00c2\u00a0This is great for businesses that don&#8217;t like giving access to their databases by default. As a production dba, I love it. Only the users that needs to access the database can be granted any access. Very controlled environment. I am sure most of the dbas out there would agree with me.<\/p>\n<p>Restrictive doesn&#8217;t effect the SYSADMIN, DBADMIN, SECADMIN in anyway as long as they are in the right group. You can perform any functions within the database, within the same instance, until you decide to restore the database onto a different instance. \u00c2\u00a0When you restore it to a different instance db2 does not automatically give the new instance owner or the userid\/group the dbadmin privelege. \u00c2\u00a0This means, you might lose admin\u00c2\u00a0privileges\u00c2\u00a0against that database. I am not sure whether its by design or a bug ? \u00c2\u00a0I have opened a PMR with IBM to confirm.<\/p>\n<p>What you can do is, login with a userid that has dbadmin or secadmin\u00c2\u00a0privilege\u00c2\u00a0on the original database and then give the new instance or new dbadmin user or group dbadmin group.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting from DB2 V9.1, IBM added a parameter on the CREATE DATABASE command called RESTRICTIVE. \u00c2\u00a0 When this parameter is specified nobody other than the userid creating the database gets any implicit access to the database. \u00c2\u00a0The database is automatically in a &#8216;locked down&#8217; state. \u00c2\u00a0This is great for businesses that don&#8217;t like giving access [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[303,3,358],"tags":[788,943,232,789,787,786],"class_list":["post-1310","post","type-post","status-publish","format-standard","hentry","category-database","category-db2","category-how-to","tag-create-database-with-restrictive","tag-db2","tag-db2-v97","tag-no-admin-privilege-after-restoring","tag-restoring-with-restrictive-database","tag-restrictive"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1310"}],"version-history":[{"count":1,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1310\/revisions"}],"predecessor-version":[{"id":1311,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1310\/revisions\/1311"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}