Hi, i saw on event viewer that the connection allowed to this instance is 5, i guess maybe this is the problem.
Yes, exceeding that setting produces exactly that error message; I just tested.
Thankfully, there is an easy way to resolve the issue. When you connect to the server, prepend ADMIN:
to the server name. This will log you in on the admin connection, which does not count against that configuration setting. You may still get an error when you connect, because SSMS may try to set up a second connection for Intellisense, but that will not work out. (Because there can only be one session on the Admin connection.)
Once you are connected, you can run
EXEC sp_configure 'user connections', 0
RECONFIGURE WITH OVERRIDE
You need to restart SQL Server for the change to take effect.
Of course, it is an interesting question, why the setting is set to five. Normally, you should not touch this setting, as SQL Server controls this itself. And 5 is a ridiculously low number. One reason I can think of is that there is a third-party software running on this machine, and the setting is there to enforce a license of five users.
I have a question, as the backup maintenance plan failed on this instance and can't check it as i can't access the instance, so i stop the services of the instance and i copy the mdf and ldf files to another location. Can i consider this method as backup until i resolve the login issue?
Yes, that works. But you could also use the ADMIN connection in the maintenance job.