SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SQL Server and T-SQL Development Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.




SQL Server 2019 Installation
download SQL Server 2019
download SQL Server 2017
download SQL Server 2016
download SQL Server 2014
download SQL Server 2012



Check If SQL Server Database is TrustWorthy for CLR Creation

To create CLR objects like User-Defined Functions, Stored Procedure, Triggers on SQL Server database, enabling TrustWorthy property of the database is one option for passing security issues for SQL developers. This guides shows how SQL Server professionals can check whether the database is set as TrustWorthy or not.


Launch SQL Server Management Studio (SSMS).
Connect to target SQL Server instance.
On Object Explorer window, right click on the target SQL Server database and choose Properties context menu option.
On database Options page, in Miscellaneous group you will see an option "Trustworthy" either set to False (by default) or to True.

display and set SQL Server database option Trustworthy

On SQL Server, database administrators can alter Trustworthy property of a database executiong one of the following SQL commands after replacing your target database with sample database name shared here

-- To set database Trustworthy property as True
ALTER DATABASE [kodyaz.test] SET TRUSTWORTHY ON

-- To set Trustworthy option of a database to False
ALTER DATABASE [kodyaz.test] SET TRUSTWORTHY OFF

Another way to check whether a database is set as TRUSTWORTHY or not is to query the sys.databases system view for is_trustworthy_on column value as follows.

select is_trustworthy_on from sys.databases where name = 'kodyaz.test'





Related SQL Resources

SQL Server Articles

SQL Server 2012

SQL Server Tools

SQL Blog

MS SQL Server Forums







Copyright © 2004 - 2019 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems