Last active
February 16, 2022 18:55
-
-
Save viniciusmelocodes/3f813684df0a19f2e30e9e5fb08bdbd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR ALTER USER FB_ADMIN PASSWORD 'fb_admin' GRANT ADMIN ROLE; | |
EXECUTE BLOCK | |
AS | |
DECLARE VARIABLE tablename VARCHAR(32); | |
BEGIN | |
FOR SELECT rdb$relation_name | |
FROM rdb$relations | |
WHERE rdb$view_blr IS NULL | |
AND (rdb$system_flag IS NULL OR rdb$system_flag = 0) | |
INTO :tablename DO | |
BEGIN | |
EXECUTE STATEMENT ('GRANT ALL ON TABLE ' || :tablename || ' TO USER FB_ADMIN WITH GRANT OPTION'); | |
END | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment