Ask Your Question
1

What is the process for setting up an SQL job to automatically remove all the logs located in C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\Polybase\dump?

asked 2023-06-30 01:26:13 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-30 01:55:02 +0000

lakamha gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-30 01:26:13 +0000

Seen: 10 times

Last updated: Jun 30 '23