Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Secure Deployment
 TRUSTWORTHY Database Property
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
SQL Server 2008 Books Online (October 2009)
TRUSTWORTHY Database Property

The TRUSTWORTHY database property is used to indicate whether the instance of SQL Server trusts the database and the contents within it. By default, this setting is OFF, but can be set to ON by using the ALTER DATABASE statement. For example, ALTER DATABASE AdventureWorks SET TRUSTWORTHY ON;.

ms187861.note(en-us,SQL.100).gifNote:
To set this option, you must be a member of the sysadmin fixed server role.

This property can be used to reduce certain threats that can exist as a result of attaching a database that contains one of the following objects:

Both of these situations require a specific degree of privileges and are protected against by appropriate mechanisms when they are used in the context of a database that is already attached to an instance of SQL Server. However, if the database is taken offline, a user that has access to the database file can potentially attach it to an instance of SQL Server of his or her choice and add malicious content to the database. When databases are detached and attached in SQL Server 2005, certain permissions are set on the data and log files that restrict access to the database files. For more information, see Securing Data and Log Files.

Because a database that is attached to an instance of SQL Server cannot be immediately trusted, the database is not allowed to access resources beyond the scope of the database until the database is explicitly marked trustworthy. Also, modules that are designed to access resources outside the database, and assemblies with either the EXTERNAL_ACCESS and UNSAFE permission setting, have additional requirements in order to run successfully.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker