added files from swmgmt03

This commit is contained in:
Schork Thierry (Galenica - ADM)
2025-09-22 09:00:00 +02:00
parent de97031b1e
commit 63d058a7eb
67 changed files with 13300 additions and 1 deletions

17
orphaned users.sql Normal file
View File

@@ -0,0 +1,17 @@
use artikel_superset
select p.name,p.sid, 'DROP USER ['+p.name+']' as q
from sys.database_principals p
where p.type in ('G','S','U')
and p.sid not in (select sid from sys.server_principals)
and p.name not in (
'dbo',
'guest',
'INFORMATION_SCHEMA',
'sys',
'MS_DataCollectorInternalUser'
) ;
return