SET TRUSTWORTHY ON when using SP_CONFIGURE

Published 17 July 07 02:09 AM | SQL Master 

SET TRUSTWORTHY ON, from the name itself it sounds like you are not allowing anything that cannot be trusted.

SQL Server 2005 has introduced a new database property called TRUSTWORTHY that is used to indicate whether the instance of SQL Server trusts the database and the contents within it. By default on any SQL instance this setting is OFF, by default to set it on the login must be a part of sysadmin fixed server role.

So what are uses in using this property within your SQL instance, this bit can be used and then it shows an alternative method of using a certificate as an authenticator. Also helpful to reduce certain threats that can exist as a result of attaching a database that contains one of the following objects:

  • Malicious assemblies with an EXTERNAL_ACCESS or UNSAFE permission setting.
  • Malicious modules that are defined to execute as high privileged users. (careful to use EXECUTE AS)

Make sure you have specified proper degree of privileges for security and that 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.

Also it is better to use this property setting when you have usage of CLR procedures in SQL Server environment and you'll need to run the this script against your database:

ALTER DATABASE <database> SET TRUSTWORTHY ON
go
sp_configure 'clr enabled', 1
go
reconfigure
go

 

Comments

# SSQA - SqlServer-QA.net said on July 17, 2007 3:26 PM:

SET TRUSTWORTHY ON, from the name itself it sounds like you are not allowing anything that cannot be

Anonymous comments are disabled

About SQL Master

**__________________________________** SQL Server MVP, Sr. DBA & industry expert. - Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.

Search

Go

This Blog

«July 2007»
SMTWTFS
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

Syndication