getdiskfreespace during sql maintenance plan

liuwei@cesm 631 Reputation points

Good day,
SQL maintenance plan for schedule backup always run well untill one day it stop due to the storage used out.

I clean up the storage. but the maintenance no longer work. from the log:

2022-11-24 21:50:11.47 spid57 The operating system returned the error '21(The device is not ready.)' while attempting 'GetDiskFreeSpace' on 'Z:\'.

Z: drive is cd rom. It might be the root cause.

I am beginner. Please help me to restore to normal?

Liu Wei

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,277 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,461 Reputation points

    Hi @liuwei@cesm ,

    Welcome to Microsoft Q&A!
    Try to restart SQL Server service in SQL Server Configuration Manager.

    Best regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. PandaPan-MSFT 1,911 Reputation points

    Hi @liuwei@cesm ,
    Try this solution: Search Device Manager in the windows seraching place , then disable cd rom like the following picture shows :

    0 comments No comments