Sql server security : User 'SA' - sql-server

Since a few week, there is a lot of attempt of connection on user 'SA' on my Database, Sql server.
Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: xxx.xx.xx.xx]
The IP adresses are all from China.
I think that a hacker try to connect to my Database.
What is the best practices to protect user 'SA' against hackers ?
I need to connect to the Database with Sql server authentification mode.
If i disable the user 'SA', can i still connect with Sql authentification ?
Thanks for any advices.

You may disable SA and enable it only to connect from internal network.
Either you can put your DB behind a firewall.

Related

Error: MySQL said: Documentation Cannot connect: invalid settings

On phpmyadmin I changed a database's user account privilege to require ssl and now I cannot access my databases. I have these Errors:
MySQL said: Documentation Cannot connect: invalid settings.
mysqli::real_connect(): (HY000/1045): Access denied for user 'root'#'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
I changed global privilege of user from REQUIRE NONE to REQUIRE SSL. Now I cannot connect to my database. Please help me with a solution to change this setting and connect back.

Self Hosted Integration Runtime unable to access on prem SQL Server

I have successfully created the Self Hosted Integration Runtime and it is showing up and running in ADF as well.
However when I try to create a linked service to connect to SQL database on the on prem system - I am getting the below error:
Cannot connect to SQL Database: '(localdb)\mssqllocaldb', Database: 'XXXX', User: 'XXXXX'.
Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.
Cannot open database "XXXX" requested by the login. The login failed.
Login failed for user 'NT SERVICE\DIAHostService'., SqlErrorNumber=4060,Class=11,State=1..
The login failed. Login failed for user 'NT SERVICE\DIAHostService'.
This is not a firewall error this is an authentication error.
You have not granted that windows user account NT SERVICE\DIAHostService access to your database.
This issue is identical to this one, which has instructions on how to solve:
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'
To select data from a table in SQL Server you need three things set up:
Network connectivity (this is fine for you, otherwise you'd get a network error)
The user account granted connect access to the server / db (this is what the error is complaining about - you need to do this)
The user account granted sufficient access to select from the table (you also need to do this)
Please do the below :
Allow outbound TCP communication on port 1433 for both the Windows firewall [
Windows-firewall-setup ] and the corporate firewall [ Ports-and-firewalls ]
Configure the firewall settings of the SQL Database to add the IP address of the self-hosted integration runtime machine to the list of allowed IP addresses.
SHIR setup reference

Error connecting to SQL Server with Windows Authentication

I want to connect to SQL Server with Windows authentication and create a SQL Server user.
The error I get while doing this is:
Login failed for user 'PCNAME\UserName'. Reason: The account is disabled. (Microsoft SQL Server, Error: 18470)
I also get the following error when I try to connect with PsTools:
Unable to connect: Login failed for user 'NT AUTHORITY\SYSTEM'.
Reason: The account is disabled.
What kind of process should I provide to activate the NT AUTHORITY\SYSTEM user? Or how can I act?
Thank you in advance for your help.
Well, you are trying to connect while logged on as pcname\username. If this user is not created as a Windows user in SQL Server or is disabled in SQL Server, then you will not be able to connect. What you need to do is use an authorized account to created the windows authenticated user in pcname\username in SQL Server then you will be able to connect.
As for pcname\SYSTEM, this is a built in SID that is used by services. There is no reason you could not add this as a Windows authenticated user in SQL Server.

Unable to login with SQL Server authentication

With Windows authentication, I am able to connect to SQL Server. Then I change password for sa, then I try to connect with SQL Server authentication, but I get an error
Login failed for user sa.
Thanks
Assuming you are entering the correct password and it still does not work, you need to enable SQL Server Authentication.

'sa' password change in SQL server 2008

When I tried to connect (with the 'sa' login) to our SQL server, I got an error message about invalid password. I tried again and again, with the same result.
So, I reconnected to the SQL server in Windows authentication mode and reset the password of 'sa', but the question is whether somebody could remotely change the 'sa' password?
Thanks,
Ilan.
Yes, the sa account's password can be changed remotely. That is, if someone already knows the sa password, they can log in with it, execute "alter login [sa] with password 'new password'" and bada bing the password is changed. Moreover, anyone with the alter any login permission on the server would be able to do the same.

Resources