简体   繁体   English

将SSIS包/作业转换或输出为SQL脚本?

[英]Convert or output SSIS package/job to SQL script?

I understand this may be a little far-fetched, but is there a way to take an existing SSIS package and get an output of the job it's doing as T-SQL? 我知道这可能有些牵强,但是有没有办法采用现有的SSIS包并获得其作为T-SQL所做的工作的输出? I mean, that's basically what it is right? 我的意思是,那基本上是对的吗? Transfering data from one database to another can be done with T-SQL as well. 也可以使用T-SQL将数据从一个数据库传输到另一个数据库。

I'm wondering this because I'm trying to get away from using SSIS packages for data transfer and instead using EF/linq to do this on the fly in my application. 我想知道这是因为我试图摆脱使用SSIS包进行数据传输,而是使用EF / linq在应用程序中即时执行此操作。 My thought process is that currently I have an SSIS package that transfers and formats data from one database to another in preparation to be spit out to an excel. 我的想法是,目前我有一个SSIS程序包,该程序可以将数据从一个数据库传输到另一个数据库并设置其格式,以准备将其输出到Excel。 This SSIS package runs nightly and helps speed up the generation of the excel as once the data is transferred to the second db, it's already nice and formatted correctly. 该SSIS包每晚运行一次,一旦将数据传输到第二个db时,它已经很好并且可以正确格式化,从而有助于加快excel的生成。

However, if I could leverage EF and maybe some linq to sql in order to format the data from the first database on the fly and spit it out to excel quickly without having to use this second db, that would be great. 但是,如果我可以利用EF以及可能的一些linq to sql来动态格式化第一个数据库中的数据并将其吐出以快速表现出优势而不必使用第二个db,那将是很好的。 So can my original question be done, can I extract the t-sql representation of an SSIS package some how? 因此,可以解决我原来的问题吗,可以通过一些方式提取SSIS包的t-sql表示形式吗?

SSIS packages are not exclusively T-SQL. SSIS包并非专门用于T-SQL。 They can consist of custom back-end code, file system changes, Office document creation steps, etc, to name only a few. 它们可以包括自定义后端代码,文件系统更改,Office文档创建步骤等,仅举几例。 As a result, generating the entirety of an SSIS package's work into T-SQL isn't possible, because the full breadth of it's work isn't limited to SQL Server. 结果,不可能将SSIS包的全部工作都生成到T-SQL中,因为它的全部工作范围不仅限于SQL Server。

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

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