create a SQL job

Yeboah, Isabella 0 Reputation points
2024-02-14T10:53:25.19+00:00

How do I create a SQL job to remove logs from a database periodically

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
726 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,897 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CosmogHong-MSFT 23,796 Reputation points Microsoft Vendor
    2024-02-15T02:33:29.5866667+00:00

    Hi @Yeboah, Isabella

    to remove logs from a database

    If you mean shrink the current database's specified data or log file size. Then try DBCC SHRINKFILE.

    To setup a SQL Job, see this doc: Schedule a Job.

    Best regards,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    0 comments No comments