Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to delete user sql server

USE master ;
GO
REVOKE CONNECT SQL FROM ApplicationSQLUser2  AS ApplicationSQLUser1;
GO
GRANT CONNECT SQL TO ApplicationSQLUser2 AS SA;
GO
ALTER AUTHORIZATION ON SERVER ROLE::[ServerRoleOwnedByUser1] TO [sa] ;
GO
ALTER AUTHORIZATION ON DATABASE::Db2 TO sa;
GO
DROP LOGIN [ApplicationSQLUser1];
GO
Source by www.sqlshack.com #
 
PREVIOUS NEXT
Tagged: #delete #user #sql #server
ADD COMMENT
Topic
Name
4+8 =