Skip to content

How to remove (clean-up) tsqlt from the SQL Server? #186

Open

Description

@ZedZipDev

The script tsqlt.clas.sql is not re-enterable.
I run it first time and received a lot of errors like owner sid of the db differs from owner's sid of master db. But after the 2nd run of the same script I have received messages about object already exists etc.
I am sure need to avoid this kind of statements but the script contains them
CREATE SCHEMA tSQLt;
GO
Need to check if exists etc.
Ok.
How to remove (clean-up) tsqlt from the SQL Server?

Activity

  1. mbt1 commented on Dec 22, 2022

    @mbt1
    Collaborator

    The tSQLt.class.sql script is idempotent, as it automatically removes tSQLt completely before creating new objects. However, if the install fails due to unforeseen circumstances, like a previously corrupt database or permission issues, that uninstall portion of the script might not work correctly.

    To address that, we should add an independent uninstall tSQLt script to the download. Note: In the case of a previously corrupted database, this clearly can do only a best effort.

    Thank you for bringing this to our attention.

  2. added a commit that references this issue on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions