Collections:
"DROP USER" - Deleting a Database User in SQL Server
How To Delete an Existing Database User in SQL Server?
✍: FYIcenter.com
If you don't want to keep a database user any more, you should delete the user by using the "DROP USER" statement. This tutorial exercise shows how to delete "Dba_User":
-- Login with "sa" USE FyiCenterData; GO DROP USER Dba_User; GO -- List all user names SELECT name, sid, type, type_desc FROM sys.database_principals WHERE type = 'S'; name sid type type_desc -------------------- ------------------------ ---- --------- dbo 0x01 S SQL_USER guest 0x00 S SQL_USER INFORMATION_SCHEMA NULL S SQL_USER sys NULL S SQL_USER
User "Dba_User" has been deleted now.
2017-08-25, 848👍, 0💬
Popular Posts:
How to change the data type of an existing column with "ALTER TABLE" statements in SQL Server? Somet...
How To Select Some Specific Columns from a Table in a Query in SQL Server? If you want explicitly te...
How to create new tables with "CREATE TABLE" statements in SQL Server? If you want to create a new t...
How do you know if SQL Server is running on your local system in SQL Server? After installing SQL Se...
How to execute statements under given conditions in SQL Server Transact-SQL? How to use IF ... ELSE ...