Sand box in sql server 2005

Posted by Karthikanbarasan under Sql Server on 2/10/2011 | Points: 10 | Views : 2272 | Status : [Member] [Moderator] [Microsoft_MVP] [MVP] | Replies : 3
Can any one give brief idea about SAND BOX in sql server 2005

Thanks
Karthik
www.f5Debug.net



Responses

Posted by: Dn2010 on: 2/10/2011 [Member] Starter | Points: 25

Up
0
Down
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

Posted by: Karthikanbarasan on: 2/10/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Thanks!!!

Thanks
Karthik
www.f5Debug.net

Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 2/10/2011 [Member] Bronze | Points: 25

Up
0
Down
Sandbox is safe place for executing semi trusted scripts, applications involving third party API needs. There are 3 sandboxes where user's code can run:

Safe access sandbox: User can create stored procedures, triggers, functions; data type's etc but cannot access memory, or disk, or create files.
External access sandbox: User can access file system outside the box, leverage classes but cannot manipulate threads, memory allocations etc.
Unsafe access sandbox: User has access to memory management, and threads. Allows users to create unsafe and untrusted code.

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response