Link to home
Start Free TrialLog in
Avatar of Math Tec
Math TecFlag for United States of America

asked on

SQL Server 2008 R2 Error 926

Hi,
I have SQL 2008 cluster working under windows server 2008. SQL server agent has stop working and when I tried to login to SQL management studio. I got Database ‘msdb’ cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information. (Microsoft SQL Server, Error: 926).

Does the server agent stopping cause this? I mean if server agent not working am I able to login to management studio or not?
How I can solve this issue?
Avatar of lcohan
lcohan
Flag of Canada image

From your last comment from https://www.experts-exchange.com/questions/29177973/SQL-server-agent-stop-working.html you can see that the SQL Server is actually in a failed state so until you will bring that back to life there is no way to use SSMS or SQLCMD or anything else to connect to it.

You MUST check the SQL Logs from both nodes as one of them will have most likely the answer to why your SQL Server fails to start.

https://docs.microsoft.com/en-us/sql/tools/configuration-manager/viewing-the-sql-server-error-log?view=sql-server-ver15


And you also must upgrade both OS and SQL Server as running on non-supported 2008 versions brings sometimes unfortunate events/consequences.
Avatar of Math Tec

ASKER

Thank you. Please SQL service is working. The SQL agent is not working


User generated image
I removed SQL Agent now but I still get the error 926 when I tried to login to SQL management studio

User generated image12.jpg
Do you have SQL Management studio installed on both nodes? If yes, I would RDP into the active node (SQL2 if I'm not mistaken) and run SSMS from there.
Also, you do have backups of msdb right?

Also - did you checked SQL log files as I mentioned above? In the same location you should find a SQLAGENT.OUT file which is your SQL Agent log file.
Hi, when I try to login to SQL management studio I got the error "Database ‘msdb’ cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information. (Microsoft SQL Server, Error: 926"

This is the problem now. Any suggestion?

Below the output of SQLAGENT.OUT

2020-04-07 22:03:30 - ! [298] SQLServer Error: 18456, Login failed for user 'NIC1\administrator'. [SQLSTATE 28000]
2020-04-07 22:03:30 - ! [298] SQLServer Error: 4060, Cannot open database "msdb" requested by the login. The login failed. [SQLSTATE 42000]
2020-04-07 22:03:30 - ! [000] Unable to connect to server '(local)'; SQLServerAgent cannot start
2020-04-07 22:03:30 - ! [298] SQLServer Error: 18456, Login failed for user 'NIC1\administrator'. [SQLSTATE 28000]
2020-04-07 22:03:30 - ! [298] SQLServer Error: 4060, Cannot open database "msdb" requested by the login. The login failed. [SQLSTATE 42000]
2020-04-07 22:03:30 - ! [382] Logon to server '(local)' failed (DisableAgentXPs)
2020-04-07 22:03:31 - ? [098] SQLServerAgent terminated (normally)

User generated image
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, Thanks.
I tried to install sqlcmd Utility but I got error

Below all the database that I have. I do not know which one is the default.

User generated image
As far as I'm aware the sqlcmd.exe is installed by default in older versions like you run under .\Program Files\Microsoft SQL Server\100\Tools\Binn folder

Also...did you read carefully the log entries above??
2020-04-07 22:03:30 - ! [298] SQLServer Error: 18456, Login failed for user 'NIC1\administrator'. [SQLSTATE 28000]

Do you (or anyone else) knows a SQL Server "sysadmin" valid login - whether is SQL login or Active Directory login to connect to this SQL Server that's having these issues? Without a valid known login is little you can do.

There from an older SQL Server 2008 that I still have lingering around.
User generated image
Hi,

I have the Active Directory login and SA login. I did not change it. The problem happened after power failure.

Any suggestion?
Can you try run again SSMS and use SQL Authentication - SA login + password to connect to SQL?
And "The problem happened after power failure" is most likely the reason your msdb gort corrupted.
Also you still didn't answered my question if you have any available recent backups for msdb database?
I tried SQL authentication and Windows authentication and in both case I got the same error. I likely say the msdb corrupted but how I can repair it?

Any suggestion ?
Did you find sqlcmd.exe so you can use it to run the commands needed to fix/restore the corrupted msdb?
Hi everyone,

I bought application to recover the database "SQL Recovery + SQL Backup Recovery". When I tried to restore database using the application I got error. Failed to login. I do believe because the system database is in SUSPECTED mode.

Any help with this issue? Also, if there is anyone can help with this I will be very appreciated.  Its really urgent.

Thank you for all the help
Regards
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial