Unable to start SQLAgent - MSDB is Read-Only

  • I am unable to start the SQLAgent service. It is reporting that MSDB is read-only. I have checked in SQL Server and on disk and the MSDB is Not read-only.

    Here is my most recent errorLog:

    2016-03-05 04:03:23.07 Server Microsoft SQL Server 2014 - 12.0.4100.1 (X64)

    Apr 20 2015 17:29:27

    Copyright (c) Microsoft Corporation

    Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

    2016-03-05 04:03:23.07 Server UTC adjustment: -6:00

    2016-03-05 04:03:23.07 Server (c) Microsoft Corporation.

    2016-03-05 04:03:23.07 Server All rights reserved.

    2016-03-05 04:03:23.07 Server Server process ID is 3800.

    2016-03-05 04:03:23.07 Server System Manufacturer: 'VMware, Inc.', System Model: 'VMware Virtual Platform'.

    2016-03-05 04:03:23.07 Server Authentication mode is MIXED.

    2016-03-05 04:03:23.07 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL12.BISQLSERVER\MSSQL\Log\ERRORLOG'.

    2016-03-05 04:03:23.07 Server The service account is 'NT Service\MSSQLSERVER'. This is an informational message; no user action is required.

    2016-03-05 04:03:23.07 Server Registry startup parameters:

    -d C:\Program Files\Microsoft SQL Server\MSSQL12.BISQLSERVER\MSSQL\DATA\master.mdf

    -e C:\Program Files\Microsoft SQL Server\MSSQL12.BISQLSERVER\MSSQL\Log\ERRORLOG

    -l C:\Program Files\Microsoft SQL Server\MSSQL12.BISQLSERVER\MSSQL\DATA\mastlog.ldf

    2016-03-05 04:03:23.07 Server Command Line Startup Parameters:

    -s "MSSQLSERVER"

    2016-03-05 04:03:23.30 Server SQL Server detected 1 sockets with 1 cores per socket and 1 logical processors per socket, 1 total logical processors; using 1 logical processors based on SQL Server licensing. This is an informational message; no user action is required.

    2016-03-05 04:03:23.30 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

    2016-03-05 04:03:23.30 Server Detected 4095 MB of RAM. This is an informational message; no user action is required.

    2016-03-05 04:03:23.30 Server Using conventional memory in the memory manager.

    2016-03-05 04:03:23.32 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)

    2016-03-05 04:03:23.36 Server This instance of SQL Server last reported using a process ID of 2916 at 3/5/2016 4:03:21 AM (local) 3/5/2016 10:03:21 AM (UTC). This is an informational message only; no user action is required.

    2016-03-05 04:03:23.36 Server Node configuration: node 0: CPU mask: 0x0000000000000001:0 Active CPU mask: 0x0000000000000001:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.

    2016-03-05 04:03:23.36 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

    2016-03-05 04:03:23.36 Server The maximum number of dedicated administrator connections for this instance is '1'

    2016-03-05 04:03:23.38 Server CLR version v4.0.30319 loaded.

    2016-03-05 04:03:23.56 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.

    2016-03-05 04:03:23.56 spid8s Starting up database 'master'.

    2016-03-05 04:03:23.89 spid8s Resource governor reconfiguration succeeded.

    2016-03-05 04:03:23.90 spid8s SQL Server Audit is starting the audits. This is an informational message. No user action is required.

    2016-03-05 04:03:23.90 spid8s SQL Server Audit has started the audits. This is an informational message. No user action is required.

    2016-03-05 04:03:23.92 spid8s SQL Trace ID 1 was started by login "sa".

    2016-03-05 04:03:24.08 spid8s Server name is 'BHMBI01'. This is an informational message only. No user action is required.

    2016-03-05 04:03:24.09 spid15s A self-generated certificate was successfully loaded for encryption.

    2016-03-05 04:03:24.09 spid15s Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].

    2016-03-05 04:03:24.09 spid15s Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].

    2016-03-05 04:03:24.11 Server Server is listening on [ ::1 <ipv6> 1434].

    2016-03-05 04:03:24.11 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].

    2016-03-05 04:03:24.11 Server Dedicated admin connection support was established for listening locally on port 1434.

    2016-03-05 04:03:24.11 spid15s SQL Server is now ready for client connections. This is an informational message; no user action is required.

    2016-03-05 04:03:24.11 Server SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.

    2016-03-05 04:03:24.19 Server The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/BhmBI01.tmscorp.com ] for the SQL Server service.

    2016-03-05 04:03:24.21 spid16s A new instance of the full-text filter daemon host process has been successfully started.

    2016-03-05 04:03:24.26 spid8s Starting up database 'msdb'.

    2016-03-05 04:03:24.26 spid11s Starting up database 'mssqlsystemresource'.

    2016-03-05 04:03:24.27 spid11s The resource database build version is 12.00.4100. This is an informational message only. No user action is required.

    2016-03-05 04:03:24.34 spid11s Synchronize Database 'master' (1) with Resource Database.

    2016-03-05 04:03:24.40 spid11s Starting up database 'model'.

    2016-03-05 04:03:24.52 spid11s Synchronize Database 'model' (3) with Resource Database.

    2016-03-05 04:03:24.87 spid11s Clearing tempdb database.

    2016-03-05 04:03:25.26 spid11s Starting up database 'tempdb'.

    2016-03-05 04:03:25.30 Server Software Usage Metrics is disabled.

    2016-03-05 04:03:25.38 spid8s Synchronize Database 'msdb' (4) with Resource Database.

    2016-03-05 04:03:25.39 spid23s The Service Broker endpoint is in disabled or stopped state.

    2016-03-05 04:03:25.39 spid23s The Database Mirroring endpoint is in disabled or stopped state.

    2016-03-05 04:03:25.41 spid23s Service Broker manager has started.

    2016-03-05 04:03:25.53 spid8s Recovery is complete. This is an informational message only. No user action is required.

    Any ideas why it is reporting that MSDB is Read-Only will be much appreciated.

  • Assuming the Agent XPs configuration option is good to go, check out - https://thelonelydba.wordpress.com/2012/08/09/sql-database-misteriously-read-only/[/url]

  • What changed recently? Around the time that MSDB went Read Only or right before.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • I don't see in the log you posted where the system is reporting msdb as read-only, or any errors...

  • The log does not show any errors on MSDB but when I try to bring SQL Agent online, it fails with the error that MSDB is read_only.

  • Vyper426 (3/10/2016)


    The log does not show any errors on MSDB but when I try to bring SQL Agent online, it fails with the error that MSDB is read_only.

    What changed right before this happened?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Has it run out of disk space?

  • No. about 800GB available on that drive.

    Just before this, MSDB had been corrupted. We took the backup from the backup system and replaced it. The backup system does not create a .bak file, it snaps the .mdb and .ldb so those were what were copied over the corrupted one. When we brought SQL Server back online and try to start SQL Agent, it says that MSDB is read only even though everything indicates that it is not.

  • Vyper426 (3/11/2016)


    No. about 800GB available on that drive.

    Just before this, MSDB had been corrupted. We took the backup from the backup system and replaced it. The backup system does not create a .bak file, it snaps the .mdb and .ldb so those were what were copied over the corrupted one. When we brought SQL Server back online and try to start SQL Agent, it says that MSDB is read only even though everything indicates that it is not.

    And there's your problem.

    The .mdf and .ldf files cannot be "backed up" in this manner. When databases are online, these files are inaccessible. The only way to back up a SQL Server database is by properly using either native SQL tools or third party tools (like Litespeed) specifically created to use the SQL backup process.

    There is no solution to your problem unless you have a proper backup file. Sorry. You're going to have to rebuild your server.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • pls post the actual error message.

    Have you tried a restore from this type of backup before? This rather throws into doubt your whole backup strategy.

    Have you tried alter database msdb set read_write ?

    ---------------------------------------------------------------------

  • Yes, we do a restore test every six months. I have tried setting it to read-write with no effect. I have also looked in the database properties and it says that the database is read-write and checked the permissions on the files themselves but the error persists.

  • pls post the messages logged to the sql error log when these backups take place, and also post the actual error you receive when trying to start SQLAgent.

    ---------------------------------------------------------------------

  • What backup tool are you using? I'm pretty sure if it's VSS compatible it should work.

  • If you look at the properties of the database in SQL server, it is not Read_only. On the disk, it is not read_only. However, when I attempt to start SQL Agent, I get the following error:

    SQLServerAgent cannot start because the msdb database is read_only

  • Have you run a DBCC CHECKDB on MSDB?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 15 posts - 1 through 15 (of 22 total)

You must be logged in to reply to this topic. Login to reply