The TRUSTWORTHY database property is used to indicate whether the instance of SQL Server trusts the database and the contents within it.
select name,is_trustworthy_on
from sys.databases
This will let you know if trustworthy property is enabled/disabled for all database.
If you want to set trustworthy property On the use the below command on the required database.
If you want to set trustworthy property On the use the below command on the required database.
ALTER DATABASE DatabaseName set
TRUSTWORTHY ON
If you want to set trustworthy property ON for all database in SQL SERVER except the system databases then please use the below command.
DECLARE @command varchar(1000)
SELECT @command = 'IF ''?'' NOT
IN(''master'', ''model'', ''msdb'', ''tempdb'') BEGIN USE ? EXEC(''ALTER
DATABASE ? set TRUSTWORTHY ON '') END '
EXEC sp_MSforeachdb @command
Thanks for sharing Good Information
ReplyDeleteSql server DBA Online Training