从备份还原数据库后出现授权错误
Authorization errors after restoring a database from a backup
我想将 DB2 9.7 数据库中的不同权限导出为 DDL。
我在文档中找到了以下内容:
https://www.ibm.com/support/knowledgecenter/SSEPGG_9.8.0/com.ibm.db2.luw.admin.gui.doc/doc/t0021930.html
Authorization statements: Generates SQL authorization (GRANT) statements for the database objects.
当我尝试发出命令时
db2look -d DatabaseName -u user
我收到以下错误:
SQL0552N "USER1" does not have the privilege to perform operation
"BIND". SQLSTATE=42502
当我尝试将 DBADM 提供给 user1 时,出现以下错误:
db2 "GRANT DBADM ON DATABASE TO USER USER1"
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command.
During SQL processing it returned:
SQL4707N Workload "SYSDEFAULTUSERWORKLOAD" cannot service the request
because the workload is not allowed to access the database or is disabled.
Reason code: "" SQLSTATE=5U020
我在从备份恢复数据库后遇到这个问题。
好像https://www-01.ibm.com/support/docview.wss?uid=swg21568865
成功了:
db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
允许实例用户执行命令。
我想将 DB2 9.7 数据库中的不同权限导出为 DDL。
我在文档中找到了以下内容: https://www.ibm.com/support/knowledgecenter/SSEPGG_9.8.0/com.ibm.db2.luw.admin.gui.doc/doc/t0021930.html
Authorization statements: Generates SQL authorization (GRANT) statements for the database objects.
当我尝试发出命令时
db2look -d DatabaseName -u user
我收到以下错误:
SQL0552N "USER1" does not have the privilege to perform operation
"BIND". SQLSTATE=42502
当我尝试将 DBADM 提供给 user1 时,出现以下错误:
db2 "GRANT DBADM ON DATABASE TO USER USER1"
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command.
During SQL processing it returned:
SQL4707N Workload "SYSDEFAULTUSERWORKLOAD" cannot service the request
because the workload is not allowed to access the database or is disabled.
Reason code: "" SQLSTATE=5U020
我在从备份恢复数据库后遇到这个问题。
好像https://www-01.ibm.com/support/docview.wss?uid=swg21568865 成功了:
db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
允许实例用户执行命令。