how to schedule an export of a table from sql 2019

Robert Wills 20 Reputation points
2024-02-23T02:13:55.8433333+00:00

I would like to schedule a daily export of a table from SQL 2019 giving it a filename of current date. Thank you

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,695 questions
{count} votes

Accepted answer
  1. Greg Low 1,760 Reputation points Microsoft Regional Director
    2024-02-23T04:21:07.29+00:00

    There are other ways but two basic ways:

    • Create and schedule SQL Server Agent job that executes the bcp utility from the command line (or PowerShell) (probably the easiest if you just want a dump of the table data)
    • If you want more control, you could create a SQL CLR stored procedure and just schedule that like any other T-SQL command using a SQL Server Agent job.
    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Olaf Helper 44,311 Reputation points
    2024-02-23T05:55:47.87+00:00

    One easy way is to use Integration Services (SSIS) Packages and a scheduled SQL Server-Agent job

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.