Created
October 16, 2022 06:43
-
-
Save mrflo/10f24dc090cbf46f97fd09786818ed4d to your computer and use it in GitHub Desktop.
Change SQL schema owner back to dbo : run this query on your database then copy paste and execute the result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name | |
FROM sys.tables | |
WHERE schema_id != SCHEMA_ID('dbo'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment