Kenneth Oh
09/11/2026, 5:35 AMRocky
09/11/2026, 5:36 AMSHOW PROPERTY command to see the default catalog and database assigned to a user.
* View your own properties:
sql
SHOW PROPERTY;
* View properties for a specific user (requires user_admin role):
sql
SHOW PROPERTY FOR 'username';
Output example:
text
+----------------------+-----------------+
| Key | Value |
+----------------------+-----------------+
| catalog | default_catalog |
| database | sales_db |
| max_user_connections | 100 |
+----------------------+-----------------+
2. How to Set
Use the ALTER USER command with the SET PROPERTIES clause. This feature is supported starting from StarRocks v3.3.3.
* Set the default catalog:
sql
ALTER USER username SET PROPERTIES ("catalog" = "your_catalog_name");
* Set both default catalog and database:
sql
ALTER USER username SET PROPERTIES ("catalog" = "your_catalog_name", "database" = "your_db_name");
* Clear the default settings:
sql
ALTER USER username SET PROPERTIES ("catalog" = "", "database" = "");
Important Notes:
* Username format: When using ALTER USER ... SET PROPERTIES, you must specify the username (e.g., 'jack'), not the full user identity (e.g., 'jack'@'%').
* Session Level: To change the catalog or database only for your current session (not permanently for the user), use:
sql
SET CATALOG <catalog_name>;
USE <db_name>;
-- OR
USE <catalog_name>.<db_name>;
References
• sql-reference/sql-statements/account-management/SHOW_PROPERTY.md
• data_source/catalog/default_catalog.md
• sql-reference/sql-statements/Catalog/SET_CATALOG.md
• sql-reference/sql-statements/account-management/ALTER_USER.md
• data_source/catalog/unified_catalog.md
• sql-reference/sql-statements/account-management/SET_DEFAULT_ROLE.mdKenneth Oh
09/11/2026, 5:52 AMRocky
09/11/2026, 5:52 AMsql
-- View all resource groups and their classifiers
SHOW RESOURCE GROUPS ALL;
-- Or view a specific group
SHOW RESOURCE GROUP <group_name>;
In the output, look for the classifiers column. It will look like (id=15016, weight=1.0, user=jack). Note the ID.
2. Remove the Classifier
Use the ALTER RESOURCE GROUP command to drop the specific classifier ID you identified.
sql
ALTER RESOURCE GROUP <group_name> DROP (<classifier_id>);
Example:
sql
ALTER RESOURCE GROUP rg1 DROP (15016);
3. (Alternative) Remove all classifiers
If you want to clear all mappings (users, roles, etc.) from a resource group at once:
sql
ALTER RESOURCE GROUP <group_name> DROP ALL;
Important Notes
* Default Group: If a user is removed from all resource groups and doesn't match any other classifiers, their queries will fall back to the default_wg (default resource group).
* Session Override: If a user has manually set a resource group for their session using SET resource_group = 'xxx';, they can revert it by setting it to the default or another group:
sql
SET resource_group = 'default_wg';
* Privileges: You must have the ALTER privilege on the target resource group to perform these actions.
References
• administration/management/resource_management/resource_group.md
• sql-reference/sql-statements/cluster-management/resource_group/ALTER_RESOURCE_GROUP.md
• sql-reference/sql-statements/cluster-management/resource_group/SHOW_USAGE_RESOURCE_GROUPS.md
References
• sql-reference/sql-statements/cluster-management/resource_group/DROP_RESOURCE_GROUP.md
• administration/user_privs/authorization/privilege_item.md
• administration/management/resource_management/resource_group.md
• sql-reference/sql-statements/cluster-management/resource_group/ALTER_RESOURCE_GROUP.md
• sql-reference/sql-statements/Resource/DROP_RESOURCE.md