question

KARUTHAPPANDYANMAHALINGAM-0018 avatar image
0 Votes"
KARUTHAPPANDYANMAHALINGAM-0018 asked SeeyaXi-msft commented

Need to view the history of sys.trace files

Hi Team,

We have deployed the sql traces in our SQL RDS instances and its created a multiple log files and we need to find a history of log file names and other details for our requirement.

--select path from sys.traces
D:\rdsdbdata\log\RDSSlowTrace_3.trc

Eg :
D:\rdsdbdata\log\RDSlowTrace_1.trc
D:\rdsdbdata\log\RDSSlowTrace_2.trc

Requesting your support to identify the history of trace files and its locations.

sql-server-generalsql-server-transact-sql
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @KARUTHAPPANDYANMAHALINGAM-0018 ,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

Best regards,
Seeya

0 Votes 0 ·
OlafHelper-2800 avatar image
0 Votes"
OlafHelper-2800 answered

Requesting your support to identify the history of trace files and its locations.

SQL Server don't store a trace history, you can only get the current traces with

 select *
 from sys.traces



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

These trace files will all be in the same location with a number tacked on in the end as in your example. To my knowing, SQL Server does not record elsewhere that a trace rolls over. How many rollover files that retained depends on what you said when you set up the trace.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @KARUTHAPPANDYANMAHALINGAM-0018,

Agree with them.
Here is a MS doc: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/default-trace-enabled-server-configuration-option?view=sql-server-ver15

Note: The extended event was introduced from SQL 2008. It is a highly extended tool for performance monitoring and fault detection. It is used to replace SQL Trace, which is not recommended since SQL 2012. It is lightweight and rich in events, and can meet many tasks that cannot be achieved or costly in SQL Trace at low cost.

Best regards,
Seeya


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.