Kunal RanpuraMar 8, 20231 min readScript to find role assigned to the user in snowflake select GRANTEE_NAME AS "USERNAME", ROLE from SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS where DELETED_ON is null and Role = 'ROLENAME' and Grantee_name like '%username%' order by USERNAME;
select GRANTEE_NAME AS "USERNAME", ROLE from SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS where DELETED_ON is null and Role = 'ROLENAME' and Grantee_name like '%username%' order by USERNAME;
Identify slow running queries in snowflakeselect distinct count(query_id) as total_query --,QUERY_TEXT --,DATABASE_NAME --,SCHEMA_NAME --,QUERY_TYPE --,USER_NAME --,ROLE_NAME...
Script Find long running Queries in Snowflakeselect Total_Elapsed_Time/60000 Total_Time_MINS, Database_name, schema_name, User_name, Role_name, Warehouse_name, Warehouse_size,...
コメント