DATABASE

Programming Microsoft SQL Serve 2005 : An Overview of SQL CLR - Security

2/24/2011 4:34:43 PM
Depending on the deployment method, you have numerous ways to specify what security level to grant a CLR assembly. All of them demand that you specify one of three permission sets:
  • Safe Assembly can perform local data access and computational tasks only.

  • External_Access Assembly can perform local data access and computational tasks and also access the network, the file system, the registry, and environment variables. Although External_Access is less restrictive than Safe, it still safeguards server stability.

  • Unsafe Assembly has unrestricted permissions and can even call unmanaged code. This setting can significantly compromise SQL Server security; only members of the sysadmin role can create (load) unsafe assemblies.

When you deploy an assembly from Visual Studio, its security level is set to Safe by default. To change it, you can select the project node in the Solution Explorer window and set the Permission Level property in the Properties window by selecting Safe, External, or Unsafe from the combo box provided (Figure 1).

Figure 1. The Permission Level property and its options in the Visual Studio 2005 Properties window


Alternatively, you can right-click the project node in the Solution Explorer window and select Properties from the shortcut menu. You can also double-click the Properties node (or the My Project node in Visual Basic projects). Either action opens up the project properties designer. Select the designer’s Database tab and then select a permission set from the Permission Level combo box (Figure 2). (The same three options are available here as in the Properties window.)

Figure 2. The Database tab of the Visual Studio project properties designer

Finally, in the Management Studio New Assembly dialog box, you can select Safe, External Access, or Unsafe from the Permission Set combo box.

Other  
 
Video
Top 10
SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
The latest Audi TT : New angles for TT
Era of million-dollar luxury cars
Game Review : Hearthstone - Blackrock Mountain
Game Review : Battlefield Hardline
Google Chromecast
Keyboards for Apple iPad Air 2 (part 3) - Logitech Ultrathin Keyboard Cover for iPad Air 2
Keyboards for Apple iPad Air 2 (part 2) - Zagg Slim Book for iPad Air 2
Keyboards for Apple iPad Air 2 (part 1) - Belkin Qode Ultimate Pro Keyboard Case for iPad Air 2
Michael Kors Designs Stylish Tech Products for Women
REVIEW
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
Popular Tags
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Exchange Server Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe Photoshop CorelDRAW X5 CorelDraw 10 windows Phone 7 windows Phone 8 Iphone