简体   繁体   English

将数据从Mulitple访问数据库文件导入到MS SQL Server

[英]Importing Data from Mulitple access database files to Ms Sql Server

Am working on a project where a user has to import multiple access database files (up to 20 mdb files at once ) with same table structure into Ms SQL server where the system links with the data for further Analysis. 我正在一个项目中,用户必须将具有相同表结构的多个访问数据库文件 (一次最多20个mdb文件)导入到Ms SQL服务器中 ,在该服务器中系统与数据链接以进行进一步分析。 i would like a most efficient way of accomplishing this task (using c#, Ms Sql Server) , without consuming too much time while exporting data to sql server. 我想要一种最有效的方式来完成此任务(使用c#,Ms Sql Server),而不会在将数据导出到sql服务器的过程中花费太多时间。 i have not done this before, so can you kindly guide me through. 我以前没有做过,所以您能引导我通过。

thanks in advance 提前致谢

If this needs to be run in an automated fashion, you should write an SSIS package and schedule it as a job. 如果需要以自动化方式运行,则应编写一个SSIS程序包并将其安排为作业。 If it needs to be run once, you can just use the Import wizard in SQL Server. 如果需要运行一次,则可以只使用SQL Server中的“导入”向导。

You might want to check out SQL Server Integration Services ( SSIS ). 您可能想签出SQL Server集成服务( SSIS )。 There are some answers on StackOverflow already (eg here ) that show how to use SSIS to move data from Access to SQL Server. 在StackOverflow上已经有一些答案(例如在此处 ),它们显示了如何使用SSIS将数据从Access移到SQL Server。

If you build an SSIS package you could call it repeatedly from a C# program and set the parameters (path to the Access database file, table name, etc). 如果您构建SSIS包,则可以从C#程序中反复调用它并设置参数(Access数据库文件的路径,表名等)。 See here for an example. 请参阅此处的示例。

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

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