• +86-135-5029-3426
  • sales@vinchin.com
logo

Vinchin Blog

Vinchin Blog How to create a user with query permission in IQ database

How to create a user with query permission in IQ database

2021-07-28

< pre > recently, a customer needs to establish a query user with read-only permission in the IQ database during application development. He asked how to implement it. Let me share with you the specific methods. In order to make you understand this method easily, I will give an example to illustrate it: & nbsp Suppose abcuser creates an application table in the IQ database. We want to create a user user1 so that this user can read-only access the table created by abcuser. The implementation method is as follows: & nbsp ( 1) Create abcuser user (executed by DBA user or user with DBA authority) & nbsp  grant connect,resource to "abcuser" identified by "pwd123"  ( 2) Create a table and insert data (log in and execute with abcuser) & nbsp  create table customer(id int,name char(8))    insertedd into customer values(1,'abc')    commit   ( 3) Create a group with the same name as the primary user of the table (executed by DBA user or user with DBA permission) & nbsp  grant group to "abcuser"   ( 4)   Create user user1 (executed by DBA user or user with DBA authority) and authorize & nbsp  grant connect to "user1" identified by "pwd123"    Grant membership in group "abcuser" to "user1" -- make user1 belong to abcuser Group & nbsp  grant selected on abcuser.customer to user1  -- Give the query permission of the table created by abcuser user to user1 & nbsp ( 5) User user1 logs in and executes Query & nbsp  selected * from customer  -- ok   insertedd into customer values(2,
'aaa')  (b) error;27809;, 26377;, 26435;, 38480;, 25191;  nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 1920991919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191919191920204;, 35753;user1e20316;, 21482;, 35810;, 25143d   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; grant group to "abcuser"   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; grant connect to "user1" identified by "pwd123"   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; grant membership in group "abcuser" to "user1"   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; grant selected on abcuser.table1 to user1   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; grant selected on abcuser.table2 to user1   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; grant selected on abcuser.table3 to user1   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; grant selected on abcuser.table4 to user1   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 1)  "Supercharged 21019;" 27599;"26395;" user121482;"35775;" 38382;"25191;" selected21477     nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 2)  "22914;" 26524;"abcuser25317;" 26377;"24456;" 37027;"20889;" 33050;"36827;" 25480;"2643509251109DBAssistant2085525209125321;" 25110025321;"36827;" 25480264353d;"

  • Tag:
  • Cloud

Interested Blogs More

DOWNLOAD NOW YOU CAN ENJOY A 60-DAYS FULL-FEATURED FREE TRIAL !