문제

IBM DB2에서 지식이 제한된 Oracle / SQL Server DBA입니다.우리는 AIX 6에서 DB2 9.7 FP4를 실행하고 있으며 새 사용자를 만들고 특정 데이터베이스에 대한 읽기 전용 권한을 부여하고 싶습니다.제발 도와주세요!

감사합니다 모하메드

도움이 되었습니까?

해결책

There is no read only privilege on a database in DB2. You will need to grant SELECT privileges on specific tables, preferably via a role to avoid doing this multiple times.

  1. Create a new database role, e.g. create role readonly.
  2. Grant SELECT privileges on the required tables to that role: grant select on myschema.mytable to role readonly.
  3. Create a new user in the operating system, e.g. # mkuser newuser.
  4. Grant the role to the user: grant role readonly to user newuser.

Note that the new user will likely need to change the initial password before he or she can connect to the database.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top