본문 바로가기
데이터베이스/snowflake

[snowflake] snowflake Connected IP List Selection

by ordinary_daisy 2024. 7. 23.

목적(Objective)

  • 사내 ip 대역 이외에 snowflake 로그인하여 접근하는 외부 사용자가 있는 지 조회해보기 위함

조회 쿼리문(Query)

  • ip 가 0.0.0.0 인 경우 password 로그인 방법 외에 다른 방법으로 로그인 한 경우
    select max(convert_timezone('Asia/Seoul',event_timestamp)) recently_login_time_kst, user_name, event_type, client_ip, first_authentication_factor from snowflake.account_usage.login_history where convert_timezone('Asia/Seoul',event_timestamp) >'2023-07-01' -- 원하는 날짜 범위 입력 group by user_name,event_type,client_ip,first_authentication_factor order by 1 desc ;