2

We use SQL Server full text search functionality. As a result we have lots of full text log files like SQLFT0003200286.LOG.5 in the sql server error log folder. Is there anything we can do to ensure these files are periodically purged (oldest files purged first)?

3
  • Were you able to deal with the log files using the procedure (or some other method)?
    – Ronaldo
    Dec 4, 2020 at 20:15
  • Not yet, currently have hundreds of full text catalogs so not super quick to implement. Dec 6, 2020 at 19:54
  • 1
    Are you doing it one by one or querying sys.fulltext_catalogs? Cause you could run something like this: USE YourDatabase; SELECT 'EXEC sp_fulltext_recycle_crawl_log @ftcat = ''' + name + ''';' FROM sys.fulltext_catalogs; to generate scripts for all catalogs at once. And you can add that to sp_msforeachdb or an improved version.
    – Ronaldo
    Dec 7, 2020 at 11:57

1 Answer 1

5

It seems your option is this undocumented stored procedure running in a job:

EXEC sp_fulltext_recycle_crawl_log @ftcat = 'FullTextCatalogName';

Check the Recycle Fulltext Catalog Log Files article by Jonathan Kehayias.

I just tested it in a lab environment and it purges the oldest fulltext log file creating a new live file (in my lab I could see 1 live file and 6 old files, so this must be the default number of files SQL Server keeps).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.