Get full query logs in redshift serverless

1

Hi friends, We need to access executed queries in our redshift serverless. It shows there's the sys_query_history table https://docs.aws.amazon.com/redshift/latest/dg/SYS_QUERY_HISTORY.html, but the query_text has a 4000 character limits, longer than that would be truncated. Is there another way for getting full query text in Redshift Serverless?

  • The connection log, user log, and user activity log can be enabled by using the AWS Management Console (parameter-group). I do not know if the same is also possible with serverless redshift. But I guess it should!

질문됨 일 년 전648회 조회
1개 답변
1

In Redshift Serverless the Cloudwatch logs will capture the full SQL text. You can enable user activity log from the Namespace configuration tab, under the Security and encryption sub-tab.

Once enabled I was able to capture the query text for a dummy query I ran that was 5990 characters in length.

From Cloudwatch you can enable Export data to Amazon S3 and then run queries on the logs itself.

profile pictureAWS
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인