When running the Query Tuning Assistant (using the New Database Upgrade Session) on SQL Server 2017 I have a new schema msqta created in the corresponding database as supposed, along with six tables and five stored procedures in the schema.
After finishing the database upgrade and deleting all sessions in QTA, disabling the Query Store and purging the Query Store data (Purge Query Data button) the aforementioned schema and associated objects are still present in the database.
I did my google searching and reading but was unable to find an option or a command to remove the msqta schema and the associated objects. I guess these objects are supposed to be removed automatically in some sort, when not needed. It is a little bit annoying having the tables in every one of my production databases.
On a test server, I tried to remove the schema and the objects manually, first deleting the tables and the stored procedures and then trying to drop the schema, but got the error:
Cannot drop schema 'msqta' because it is being referenced by object 'ExecutionStatType'.
Strangely, this returns nothing:
SELECT * FROM sys.objects WHERE schema_id = SCHEMA_ID('msqta')
I would very much appreciate any sort of advice on the matter.