question

basit 1 avatar image
basit 1 asked

Can we remove default User from Database

Hi Team, Can we remove the default user from Database for example, the Administrator, guset and distributor_admin, is there any harm if i removed these account from a database? Thanks Basit Khan
sqllogin
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I would have to ask why you want to do this?
1 Like 1 ·
mikelanders avatar image
mikelanders answered
If those users don't need access then sure.
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

will this harm to our database.
0 Likes 0 ·
Shawn_Melton avatar image
Shawn_Melton answered
The guest user can be disabled and should be in most instances. Although to be on the safe side ensure no application requires it. The distributor_admin is the account used by replication stored procedures. This account is required if the database is involved in replication: http://msdn.microsoft.com/en-us/library/ms151735.aspx The Administrator account depends on your environment. It would depend on the type of account it is (SQL Login, Windows login, or Windows group). This should be confirmed with whoever (developer, DBA, etc) works with that database whether it is needed or not. I would try to confirm with whoever uses the database as to whether the Administrator account is used or not. If no one can tell you then I would take note of the date and time you disable or remove the permission. Be sure to script out the account so in the event someone actually needs it you can restore the account as it was configured.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DaniSQL avatar image
DaniSQL answered
you can safely remove guest account from a user database, and if someone lost access you can grant him back using another user. However, removing a `guest` account from **system databases** will create you a problem: [Link1][1], [Link2][2] [1]: http://www.mssqltips.com/tip.asp?tip=1172 [2]: http://sqlblog.com/blogs/buck_woody/archive/2010/08/02/don-t-mess-with-the-system-databases-in-sql-server-or-error-916.aspx
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.