Firebird3 - добавление/удаление пользователей ============================================= Соединение с БД с помощью isql: ------------------------------- CONNECT security3.fdb USER SYSDBA PASSWORD 'masterkey'; Проверка текущих пользователей: ------------------------------- SELECT CAST(U.SEC$USER_NAME AS CHAR(20)) LOGIN, CAST(A.SEC$KEY AS CHAR(10)) TAG, CAST(A.SEC$VALUE AS CHAR(20)) "VALUE", U.SEC$ADMIN AS ADM, U.SEC$PLUGIN "PLUGIN" FROM SEC$USERS U LEFT JOIN SEC$USER_ATTRIBUTES A ON U.SEC$USER_NAME = A.SEC$USER_NAME; Как узнать, кто владелей базы: ------------------------------ SELECT DISTINCT RDB$OWNER_NAME AS DATABASE_OWNER FROM RDB$RELATIONS WHERE (RDB$SYSTEM_FLAG = 1); Создание/изменение пользователей -------------------------------- CREATE USER name PASSWORD 'password' [<options>] [<tags>]; [CREATE OR] ALTER USER name [SET] [PASSWORD 'password'] [<options>] [<tags>]; ALTER CURRENT USER [SET] [PASSWORD 'password'] [<options>] [<tags>]; DROP USER name; В качестве опций можно указывать: --------------------------------- create user USERNAME password '111' firstname 'John' lastname 'Ivanov'; create user USERNAME password '111' grant admin role; alter user USERNAME set inactive;
SQL Справочник v0.05 © 2007-2025 Igor Salnikov aka SunDoctor