Can I remove sa login from SQL server?

2020-02-09 09:02发布

问题:

I am a beginner in database field and this question might sound too stupid but I want to know why there is a login called sa and can I delete it?

I want to delete it because it seems to have pretty serious privileges on database server!

If it matters, I am using SQL Server Express 2008.

回答1:

You can't remove the sa account but you can rename and/or disable it. Arguably this is good practice as otherwise you have a known username that an attacker could launch a brute force password attack against.

Just make sure if you disable the sa account that you have another account with administrator privileges.



回答2:

sa is the admin account! do not delete it, give it a strong password that you provide to no one except the database admin and a backup person.



回答3:

sa is the main administrator account, it was the owner of master database (holding data for user roles,schema,etc), so it can't be deleted.

just change the password (and i think it was asked in installation progress) and create guest/public account with more restrictive privileges for use with your application a.k.a don't use sa in your application (application you develop)



回答4:

Also, dependent on your environment you can just turn off SQL Server Authentication whatsoever.

There are two types of authentication supported by SQL Server - Windows Authentication and SQL Authentication - you can have both or one of them active. If you switch off SQL Authentication then only valid Windows (as defined in the system) users will be able to use the server (normal permissions still apply, so each account has to be added to SQL Server as well, the fact that somebody has an account in the system doesn't mean they can access the SQL Server instance).

You can configure this in the server settings from the Management Studio.



回答5:

Never do it . To understand more appropiately please refer http://blog.sqlauthority.com/2008/12/24/sql-server-disable-and-enable-user-sa/