Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7930505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:26:54+00:00 2026-06-03T20:26:54+00:00

The tSQLt test framework requires to set TRUSTWORTHY ON for the database, and to

  • 0

The tSQLt test framework requires to set TRUSTWORTHY ON for the database, and to enable SQL CLR for the server.

Why are these required? Is it possible to achieve the same/similar functionality without a CLR object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:26:56+00:00Added an answer on June 3, 2026 at 8:26 pm

    The following features are completely implemented as CLR code and would be particularly difficult (and probably impossible) to do without CLR:

    • CaptureOuput: useful for recording and validating output printed to the console
    • SuppressOutput: used internally to help keep the console clean of warnings resulting from renaming objects (particularly in FakeTable)
    • ResultSetFilter: necessary for capturing a specific result set produced from a stored proc that produces multiple result sets
    • AssertResultSetsHaveSameMetaData: used to compare the meta data of two result sets
    • NewConnection: allows an arbitrary SQL command to be executed in a new connection. Useful for testing when certain properties of the connection must be different. (If memory serves me correctly, this might be the sole reason for TRUSTWORTHY ON today).

    Other than that, tSQLt uses the CLR internally to produce formatted output for very large strings, such as those that can be produced by comparing two tables; and for generating new object names when renaming objects (such as for FakeTable or SpyProcedure).

    It is conceivable that tSQLt could be modified to remove these features and still function with its base feature set (with some limitations of course). However, as we look ahead as to what will be in future releases of tSQLt, it is very likely that there will be more done in CLR.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’ve been writing some tSQLt database unit tests (via Red Gate SQL Test) on
I have following tsql code in sql server 2008: declare @ID INT SET @ID
In SQL Server, how can I test the instance I'm currently connecting is default
I need a testing framework for SQL Server 2000 (yeah, I know). I would
I am setting up Database mail in SQL Server 2008 to send mail to
I have a non-nullable database column which has a default value set. When inserting
My businesses application supports only reporting with selected data from SQL server.In one business
Using Tsql, how can I find out when MS SQL server was installed?
I am writing a scheduled job to mimic a SQL Server maintenance plan for
TSQL (as used in MS SQL Server 2000 and 2005) allows multiple JOIN clauses,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.