0

I want one of my db2 user to be able to issue queries on a primary database that are replicated to a secondary database via HADR.

That user on my linux box is called EUSR.

Now logged as user db2inst1 (that is the user having administrative privileges) I call the following command

db2 "START HADR ON DATABASE MAMBO USER USR AS PRIMARY"

Enter current password for user: 

When I give the correct linux password I got the following

SQL1092N  "EUSR" does not have the authority to 
perform the requested command or operation.

What credentials I need to grant to that user to have HADR running?

If I enable HADR by using db2inst1 will then user EUSR replicate its query on the database MAMBO?

4

1 回答 1

1

There are two different things here. One is the privilege to issue queries (it does not matter if the hadr role is primary or standby), and other thing is to administer hadr (start/stop)

In order to give the privilege to issue queries to user eusr, you just have to give the grant select on the table it will use. The user could exist one in standby machine (defined at the OS level), it is not necessary to exist in both machines, however the privileges are for both machines.

If you want to give the privilege to start hadr to user eusr, you just have to give one of the following authorities:

  • sysadm
  • sysctrl
  • sysmaint

However, giving one of those authorities, it does not assure that the user can issue queries and access data.

Administration is different to data access. HADR is administration, Select is data access.

For more information, check the START HADR command. http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.cmd.doc/doc/r0011551.html

于 2013-05-10T18:45:00.380 回答