Error trying to create a new Firebird user using Firebird client in C #

I am trying to create a new DB user for Firebird 2.5 DB from my C # application and get the error "add write error without permission to access to insert / write to TABLE USERS". I gave the rdb $ admin user a role by creating a database connection using this role, but still I get this error. The worst thing for me is that when I try to create a new user for my database in IBExpert, using the same user settings and role (rdb $ admin), everything goes well and I do not get eny errors.

What could be the problem? Why can't I execute SQL queries and procedures that update / insert into the USERS table, although I have the corresponding role that I use to establish the connection?

I use the latest FirebirdClient data provider - ADO.NET.

The connection string to the database looks like this:

`"User=developer;Password=*****;Database=C:\DB.fdb;DataSource=*****;Port=*****;Dialect=3;Charset=NONE;Role=rdb$admin;Connection lifetime=15;Pooling=True;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;"` 

Can someone help me with this problem?

+4
source share
1 answer

I found a solution - the problem was that I forgot to provide GRANT ADMIN ROLE to the user with whom I performed the procedure, so I can not manage database users.

So, GRANT ADMIN ROLE for the user solved the problem.

+1
source

Source: https://habr.com/ru/post/1442019/


All Articles