简体   繁体   English

SSIS包应该在数据库SQL Server还是单独的应用程序服务器上运行?

[英]Should SSIS Packages run on a database SQL Server or a separate app server?

It seems to be a policy in my company to place application code on a separate server than the database. 在我公司看来,将应用程序代码放置在与数据库不同的服务器上是一项政策。

We are a data warehouse that mostly use SSIS and T-SQL to transform and load data into a SQL Server. 我们是一个数据仓库,主要使用SSIS和T-SQL将数据转换和加载到SQL Server中。 We would like to use a C# .NET app to do some of the steps 我们想使用C#.NET应用程序执行一些步骤

For example, to iterate through a file and call a web service. 例如,要遍历文件并调用Web服务。

Given that SQL Server 2008 now automatically installs .NET 3.5 and supports .NET stored procedures, is it justified to prohibit .ETL code written in .NET from running on the database server? 鉴于SQL Server 2008现在可以自动安装.NET 3.5并支持.NET存储过程,是否有理由禁止以.NET编写的.ETL代码在数据库服务器上运行? Having both SSIS and .NET code running on the same box will help simplify our workflow so we don't have to worry about a scheduling app having to control flow across servers. 在同一个盒子上同时运行SSIS和.NET代码将有助于简化我们的工作流程,因此我们不必担心调度应用程序必须控制服务器之间的流。

I do understand that it would be appropriate, for example in a web app, to separate the business logic tier from the db tier. 我确实知道,例如在Web应用程序中,将业务逻辑层与数据库层分开是合适的。

One possible snag: In my company, the DBAs are not Admins of the App Servers and do not have rights to install the db Client tools to the app server and the App Serve admins probably should not have anything to do with installing database client tools. 一种可能的故障:在我的公司中,DBA不是App Server的管理员,并且无权将db Client工具安装到App Server,并且App Serve管理员可能与安装数据库客户端工具没有任何关系。 If they did, there would have to be coordination between the App server Admins and the DB server Admins. 如果他们这样做,则必须在App服务器管理员与DB服务器管理员之间进行协调。 Perhaps the DBAs could share ownership of the App Server. 也许DBA可以共享App Server的所有权。 How do companies usually handle this? 公司通常如何处理?

Best practice is to leave SQL Server completely alone on the box. 最佳做法是完全不使用SQL Server。 SQL Server uses a user mode cooperative multi-tasking and resource control that assumes 100% ownership of the systemn and does not play well if other processes are stealing memory or CPU. SQL Server使用用户模式的协作多任务和资源控制,该系统假定100%拥有系统所有权,并且如果其他进程正在窃取内存或CPU,则不能很好地发挥作用。 See Dynamic Memory Management and SQL Server Batch or Task Scheduling . 请参阅动态内存管理SQL Server批处理或任务计划

As for .NET doing ETL Web calls from inside SQLCLR: don't even think about it. 至于.NET从SQLCLR内部进行ETL Web调用:甚至不要考虑它。 NEver do any sort of blocking operations from SQLCLR, you'll starve the SQL scheduler. 除非从SQLCLR执行任何类型的阻止操作,否则您都会饿死SQL调度程序。

As a general rule, you should have your SSIS server be separate from the SQL Server as SSIS is an app layer. 通常,您应该将SSIS服务器与SQL Server分开,因为SSIS是应用程序层。 Next, your application code should run on a separate server (can be the same as the SSIS server). 接下来,您的应用程序代码应在单独的服务器上运行(可以与SSIS服务器相同)。

Keep your scaling concerns separate. 分开扩展您的关注点。

It depends on the code, the availability needed of the database, and the size of the box. 这取决于代码,数据库所需的可用性以及包装盒的大小。 If you're doing a lot in memory on the SSIS pipe or in your C# app, I'm a proponent of putting it on a separate box (all of the ETL, not just some of it). 如果您在SSIS管道或C#应用程序中占用大量内存,那么我建议将其放在单独的盒子中(所有ETL,而不仅仅是其中的一部分)。 If you're just using SSIS to call stored procs on the database, it's fine to leave it on the same system. 如果您仅使用SSIS来调用数据库中存储的proc,最好将其保留在同一系统上。

That being said, I'd avoid splintering the ETL across boxes unless there's an overwhelming reason to do so. 话虽如此,除非有绝对的理由,否则我将避免将ETL分散在各个框内。 It adds a lot of complexity for not much benefit (usually). 它增加了很多复杂性,却没有带来太多好处(通常)。

That being said, if you need C# stuff to run, you could always use the script tasks in SSIS to control its execution. 话虽如此,如果您需要C#东西来运行,则可以始终使用SSIS中的脚本任务来控制其执行。

我们通过将DTS程序包与SSIS服务器放置在同一服务器上来实现SSIS,并且有保留在另一台服务器上的winservice并远程执行DTS程序包。

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

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