Quote:
Originally Posted by sathyaram_s
If you are on FP2+, then you can also use
DB2_RESTORE_GRANT_ADMIN_AUTHORITIES
This will work for RESTORE command or db2inidb command.
If you are using unix cp, and relocate then this is not the option
In HADR environment, do not use this registry to restore the standby. There is a known open APAR.
|
I set this registry variable, restarted the instance, dropped the db and restored it again. This is after the restore with this registry variable set:
$ db2set -all
[i] DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
[i] DB2_ATS_ENABLE=YES
[i] DB2_PINNED_BP=YES
[i] DB2_FCM_SETTINGS=FCM_MAXIMIZE_SET_SIZE:NO
[i] DB2COMM=tcpip
$ db2 get authorizations
Administrative Authorizations for Current User
Direct SYSADM authority = NO
Direct SYSCTRL authority = NO
Direct SYSMAINT authority = NO
Direct DBADM authority = NO
Direct CREATETAB authority = NO
Direct BINDADD authority = NO
Direct CONNECT authority = NO
Direct CREATE_NOT_FENC authority = NO
Direct IMPLICIT_SCHEMA authority = NO
Direct LOAD authority = NO
Direct QUIESCE_CONNECT authority = NO
Direct CREATE_EXTERNAL_ROUTINE authority = NO
Direct SYSMON authority = NO
Indirect SYSADM authority = YES
Indirect SYSCTRL authority = NO
Indirect SYSMAINT authority = NO
Indirect DBADM authority = NO
Indirect CREATETAB authority = YES
Indirect BINDADD authority = YES
Indirect CONNECT authority = YES
Indirect CREATE_NOT_FENC authority = NO
Indirect IMPLICIT_SCHEMA authority = YES
Indirect LOAD authority = NO
Indirect QUIESCE_CONNECT authority = NO
Indirect CREATE_EXTERNAL_ROUTINE authority = NO
Indirect SYSMON authority = NO
It looks the same as before setting this variable and I can't access the tables created with the source-schema name. The manual seems to indicate that this setting is not supported with a full db restore... not sure why??
I don't have access to the source system so I think my only option is create the source-instance ID and use it to do the grants.