Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are the steps to set up an SQL job to automatically remove all the logs located in C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\Polybase\dump:

  1. Open SQL Server Management Studio.

  2. Connect to the SQL Server instance you want to configure.

  3. In the Object Explorer, navigate to the SQL Server Agent node > Jobs.

  4. Right-click the Jobs node, and select "New Job".

  5. In the "New Job" dialog box, enter a name and description for the job.

  6. On the "Steps" page, click "New" to create a new step.

  7. In the "New Job Step" dialog box, enter a name for the step.

  8. In the "Command" box, enter the following command:

DEL C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\Polybase\dump*.* /s /q

This command will delete all files in the specified directory.

  1. On the "Schedules" page, set the schedule for the job, such as daily, weekly, or monthly.

  2. Click "OK" to save the job.

The job will now run on the schedule you specified, deleting all logs in the specified directory. Be sure to test the job before using it in a production environment.