Quantcast
Channel: Microsoft Dynamics GP
Viewing all articles
Browse latest Browse all 38722

Forum Post: RE: upgraded from 2010 want to remove all old users and start from scratch

$
0
0
Hi, Here's a script that might help if you can do them one by one: --Remove a user from all databases on the server EXEC sp_Msforeachdb "IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'baduser') DROP USER [baduser]" GO --Drop the login IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'baduser') DROP LOGIN [baduser] GO Kind regards, Leslie

Viewing all articles
Browse latest Browse all 38722

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>