hi,
"Sandbox is a safe place for running semi-trusted programs or scripts, often originating from
a third party."
Now for SQL Server it's .NET the external third party which is running and SQL Server
has to ensure that .NET runtime crashes does not affect his working. So in order that
SQL Server runs properly there are three sandboxes that user code can run :-
Safe Access sandbox
This will be the favorite setting of DBA's if they are every compelled to run CLR - Safe
access. Safe means you have only access to in-proc data access functionalities. So you can
create stored procedures, triggers, functions, data types, triggers etc. But you can not
access memory, disk, create files etc. In short you can not hang the SQL Server.
External access sandbox
In external access you can use some real cool features of .NET like accessing file systems
outside the box, you can leverage you classes etc. But here you are not allowed to play around with threading , memory allocation etc.
Unsafe access sand box
In Unsafe access you have access to memory management, threading etc. So heredevelopers can write unreliable and unsafe code which destabilizes SQL Server. In the
first two access levels of sand box its difficult to write unreliable and unsafe code.
THANKS.
Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator