简体   繁体   English

使用 MS 任务计划程序每 15 分钟自动将数据从 Excel 导入 SQL 服务器

[英]Import data from Excel to SQL Server automatically for every 15 min of time using MS Task Scheduler

How can I import data from Excel to SQL Server using MS Task Scheduler如何使用 MS 任务计划程序将数据从 Excel 导入 SQL 服务器

  1. Create a stored procedure with Bulk Insert in SQL Server.在 SQL 服务器中使用批量插入创建存储过程。 In Bulk import query itself you can specify the file location and Table structure.在批量导入查询本身中,您可以指定文件位置和表结构。 Refer this link for Bulk insert 请参阅此链接以获取批量插入
  2. Create a batch file and call the stored procedure using SQLCMD command.创建一个批处理文件并使用SQLCMD命令调用存储过程。 Refer this link for Example 请参阅此链接以获取示例
  3. Task Schedule the batch file using windows task scheduler.任务使用 windows 任务调度程序调度批处理文件。 Refer this link 参考这个链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM