Since I haven't used SQL sever for almost two years, I just started to get familiar with it. Used to review SQL sever and take personal notes. So that you can review your data later.
Create a server Logon account:
(Statement: it is not possible to create an account using commands. It may need to be added to the post later .)
1. Check whether hybrid database logon is enabled before creating a database user.
Log on to the database as an administrator, right-click the database root directory, and choose server Properties> Security> set hybrid logon. Restart the server after you have set hybrid logon.
Restart the server, right-click the server on the left and choose stop from the shortcut menu ]. In this way, you do not have to go to [SERVICE] in [management] to restart the database.
2. Set the Logon account, and set whether to log on to the account and access the server.
Log on to the database as an administrator, open the root directory of the database, and choose security> Logon Name, right-click logon name, and choose new logon name ].
Create a new Logon account. In login name-New, set the logon identity to windows authentication or SQL Server Authentication.
I forgot to set the database available for the account. Otherwise, you cannot use the database you want to use when creating the account. In login name-New] user ing, set the user's access to the database.
Why can't I log on without creating an account? This still involves the login name-New] Status settings. Set whether to allow connection to the database engine and logon.