Why doesn't SQL Server come preinstalled with

2019-08-17 10:50发布

If I want to reference something in the .net framework for use in my CLR stored proc, for example, I have to first load it into the Sql server database.

Why isn't it preinstalled? Is it performance related or for security issues or what else?

thanks.

4条回答
成全新的幸福
2楼-- · 2019-08-17 11:09

SQL Server 2000 came with everything turned on, after the slammer worm Microsoft learned their lesson and on SQL Server 2005 and up all the things that were enabled like xp_cmdshell, openrowset etc etc are turned off by default to reduce the attack surface. CLR is also turned off because of the same reason.

查看更多
我想做一个坏孩纸
3楼-- · 2019-08-17 11:11

It's off by default because it's increased attack surface area and won't be needed in may places. Lots of other SQL Server stuff has to be enabled specifically too.

Some fairly basic stuff can be off by default: KB 914277 for "remote access"

Secondary to this, it won't be allowed in many shops, which leads me to my cheeky answer: "because developers might use it". Using CLR in a relational engine has benfits: custom datatypes, custom aggregates etc, but it will be abused because it's easier to write c# rather than T-SQL for many folk.

查看更多
倾城 Initia
4楼-- · 2019-08-17 11:15

I'd imagine it's for security reasons as not installing it by default reduces the attack surface available to any hackers.

查看更多
我命由我不由天
5楼-- · 2019-08-17 11:16

Probably because it is an optional feature that isn't used that much. Yet.

查看更多
登录 后发表回答