Home > SQL Server News > SQL Server permissions and new objects
SQL Server News:
EMAIL THIS

SQL Server permissions and new objects

By Bob Beauchemin, Niels Berglund and Dan Sullivan
28 Feb 2005 | Addison-Wesley

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

A First Look at SQL Server 2005 for Developers The following excerpt, courtesy of Addison-Wesley, is from Chapter 6 of the book "A First Look at SQL Server 2005 for Developers" written by Bob Beauchemin, Niels Berglund and Dan Sullivan. Click for the complete book excerpt series or purchase the book.



SQL Server permissions and new objects

We have six new kinds of SQL Server objects in the managed world of SQL Server 2005. Three of these objects are managed code variations on SQL Server objects:

  • Stored procedures

  • User-defined functions

  • Triggers

Three of the objects are new with SQL Server 2005:

  • Assemblies

  • User-defined types

  • User-defined aggregates

The reason that all these objects are new is that they all run executable code, rather than having SQL Server run the code. In previous versions of SQL Server, extended stored procedures or COM objects using COM automation to run code always ran that code in the context of the Windows user account that was running the SQL Server service process. With the introduction of a managed environment that can control aspects of code loading (through the assembly loading policy mentioned in Chapter 2) and code execution through Host Protection Attributes (HPAs) that work through code access security, execution of .NET assembly code is safer than extended stored procedures and as safe as running Transact-SQL code from inside SQL Server.

When SQL Server is used as a host for the .NET runtime:

  • Managed user-code does not gain unauthorized access to user data or other user code in the database.

  • There are controls for restricting managed user-code from accessing any resources outside the server and using it strictly for local data access and computation.

  • Managed user-code does not have unauthorized access to system resources such as files or networks by virtue of running in the SQL Server process.

  • CLR procedures and functions are a way to provide security wrappers similarly to the way T-SQL procedures and functions do, by using ownership chaining.

We'll first look at the extension of the traditional SQL Server object security to the new objects and then go on to describe .NET-specific considerations.

Click for the next excerpt in this series: Assembly permissions -- Who can catalog and use an assembly?


Click for the book excerpt series or visit here to obtain the complete book.


Tags: .NET Development for SQL ServerSQL/Transact SQL (T-SQL)Microsoft SQL Server 2005SQL Server SecurityVIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
.NET Development for SQL Server
Creating Windows PowerShell scripts to manage SQL Server 2008 instances
Manipulate column names in a SQL Server table
Code to restore SQL Server databases in VB.NET
Custom VB.Net scripting in SQL Server Integration Services
Retrieve images from SQL Server and store in VB.Net
Connect to SQL Server database with Visual Basics
Top 10 SQL Server development questions
Developing CLR database objects: 10 tips, 10 minutes
CLR architecture
CLR stored procedures
.NET Development for SQL Server Research

SQL/Transact SQL (T-SQL)
Using DELETE and TRUNCATE TABLE statements to delete data in SQL Server
SQL language crash course (just enough to be dangerous)
Working with IntelliSense in SQL Server 2008 Management Studio
SQL Server Mailbag: Stored procedures, triggers and SSRS reports
Working with sparse columns in SQL Server 2008
Determining the source of full transaction logs in SQL Server
New GROUP BY option provides better data control in SQL Server 2008
Using the OPENROWSET function in SQL Server
Loading data files with SQL Server's BULK INSERT statement
Importing and exporting bulk data with SQL Server's bcp utility
SQL/Transact SQL (T-SQL) Research

Microsoft SQL Server 2005
End of life comes for SQL Server 2005 SP2, 2008
SQL Server Reporting Services Fast Guide
SQL Server Service Broker Tutorial and Reference Guide
Tips for tuning SQL Server 2005 to improve reporting performance
SQL Server consolidation: Why it's an optimization technique
Parent-child dimensions in SQL Server 2005 with Analysis Services MDX
Enforcing data integrity in a SQL Server database
SSIS error message due to installation problem on SQL Server 2005
Should you upgrade to SQL Server 2005 or SQL Server 2008?
Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
Microsoft SQL Server 2005 Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
ACID  (SearchSQLServer.com)
Collaboration Data Objects  (SearchSQLServer.com)
commit  (SearchSQLServer.com)
container  (SearchSQLServer.com)
DAO  (SearchSQLServer.com)
fetch  (SearchSQLServer.com)
OLE DB  (SearchSQLServer.com)
query  (SearchSQLServer.com)
SQL  (SearchSQLServer.com)
T-SQL  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



SQL Administration: SQL Security, SQL Backup, SQL Server Performance
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts