April 27, 2012 at 12:14 am
Hi ,
UDFs can't change the server environment or your operating system environment.
SPROCs can change server or operating system environment variables.
How can we prove this.
please suggest.
Thanks,
April 27, 2012 at 5:00 am
There's no need for proof. It's right there in the SQL Server documentation as provided by Microsoft, the people who wrote the software.
----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software
April 27, 2012 at 5:26 am
That's certainly true for T-SQL UDFs.
Technically speaking a CLR UDF could affect pretty much anything it wanted, it would just be a bad idea as you have no guarantee of transactional consistency, order of execution etc. (hence why it's explicitly prevented in T-SQL)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply