Help Center>
Relational Database Service>
FAQs>
Log Management>
How Can I Obtain RDS for SQL Server Error Logs Using Commands?
Updated on 2022-05-07 GMT+08:00
How Can I Obtain RDS for SQL Server Error Logs Using Commands?
- Log in to the Microsoft SQL Server client as user rdsuser.
- Run the following statement to query error logs:
EXECUTE master.dbo.rds_read_errorlog FileID,LogType,FilterText,FilterBeginTime,FilterEndTime
- FileID: indicates the ID of an error log. The value 0 indicates the latest logs.
- LogType: indicates the log type. The value 1 indicates error logs and value 2 indicates agent logs.
- FilterText: indicates a keyword, which can be NULL.
- FilterBeginTime: indicates the start time in queries, which can be NULL.
- FilterEndTime: indicates the completion time in queries, which can be NULL.
Example:
EXEC master.dbo.rds_read_errorlog 0,1,'FZYUN','2018-06-14 14:30','2018-06-14 14:31'
Figure 1 shows the query results.
Parent topic: Log Management
Log Management FAQs
- How Long Is the Delay for RDS MySQL Slow Query Logs?
- How Do I View All SQL Logs Executed by RDS for MySQL?
- How Can I Obtain RDS for SQL Server Error Logs Using Commands?
- How Do I View Deadlock Logs of RDS for MySQL?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore