Role creation
The dbschema -r command generates information on the creation of roles.
The following syntax diagram shows the creation of roles.
Element | Purpose | Key Considerations |
---|---|---|
-r role | Displays the CREATE ROLE and GRANT statements that are needed to replicate and grant the specified role. | You cannot specify a list of users or roles with the -r option. You can specify either one role or all roles. |
-r all | Displays all CREATE ROLE and GRANT statements that are needed to replicate and grant all roles. | None |
The following dbschema command and output show
that the role calen was created and was granted to cathl, judith, and sallyc:
sharky% dbschema -r calen -d stores_demo
DBSCHEMA Schema Utility
Software Serial Number RDS#N000000
create role calen;
grant calen to cathl with grant option;
grant calen to judith ;
grant calen to sallyc ;