简体   繁体   English

定期将行插入SQL Server数据库

[英]Insert rows into SQL Server database periodically

Can anyone tell me the best practice to insert data into a SQL Server database periodically? 谁能告诉我最佳做法,即定期将数据插入SQL Server数据库吗? Say once a day. 每天说一次。 I get data once in a day from an external source such as a .csv file. 我每天从外部来源(例如.csv文件)获取数据。

Are there any service programming api that SQL Server supports? SQL Server是否支持任何服务编程API?

Assuming you're not using SQL Express you can create an SSIS package to do the import, or a BULK LOAD or something like that, and then run the import once a day using a SQL Agent job that uses a daily schedule. 假设您没有使用SQL Express,则可以创建一个SSIS包来执行导入,或者创建一个BULK LOAD或类似的东西,然后每天使用一次使用每日计划的SQL Agent作业运行一次导入。

You could also create a Windows Scheduled Task. 您还可以创建Windows计划任务。 The task could run a script that connects to SQL Server and runs an SSIS Package, a BULK LOAD , etc. It could also execute a custom program that loads the data. 该任务可以运行连接到SQL Server的脚本,并运行SSIS程序包, BULK LOAD等。它还可以执行自定义程序来加载数据。

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

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