Cannot access 1 database

  • Good Day to All,

    I encountered this problem just yesterday and it repeats again today.

    When I access this database using QA this is the error I received

    Server: Msg 945, Level 14, State 2, Line 1

    Database 'dbname' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

    Upon viewing the errorlog i saw many lines with this statement

    Starting up database 'dbname'

    Upon further inspection to the errorlog I saw two error messages

    FCB::Open failed: Could not open device C:\Program Files\Microsoft SQL Server\MSSQL\data\dbname_Data.MDF for virtual device number (VDN) 1.

    and

    udopen: Operating system error 32(The process cannot access the file because it is being used by another process.) during the creation/opening of physical device C:\Program Files\Microsoft SQL Server\MSSQL\data\dbname_Data.MDF.

    CPU and Memory usage are not even in 30% of its usage. I resolved this issue yesterday by stopping and starting sql server service. I think I can stop and start the service again but I want to know whats causing this. I have a SP in this database where in multiple databases from other server connects to this db and insert data but this procedure is running almost a year now. This error only occurs just yesterday. Advance thanks to all of you guys

    "-=Still Learning=-"

    Lester Policarpio

  • How are you backing up this database? Are you using Native SQL backups or a third party tool? Have you checked the locked files MMC snap-in to see what might be using the file?

  • Hi Jack,

    Backup is SQL Native backup. about the MMC snap-in is it in EM?

    "-=Still Learning=-"

    Lester Policarpio

  • The snapin is in Computer Management. You can run it from your PC. Connect to another computer then System Tools -> Shared Folders -> Open Files. It may not show either, but it is worth looking into.

    Have you rebooted the machine?

  • No. as of the error occured until now I have not restarted the machine. The only solution i made is to restart the services then the database is accessible again. as of today the error did not occur don't know when the problem will strike again :hehe:

    "-=Still Learning=-"

    Lester Policarpio

  • I had this issue with my server too. This happens when your drive which holds the data is not started but SQL server starts and cannot locate these files. Make SQL service dependent on the drives so that you will not be needed to restart SQL server everytime you have this issue....hope this helps!!

    The_SQL_DBA
    MCTS

    "Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."

  • No chance that your tempdb had gotten out of hand and sucked up all of your disk space is there? the Service restart would have freed up that space so you might not have noticed?

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Thank you for the inputs guys. When I received the error in my server i already checked the drive where in the mdf and ldf is and the size of the drive is still 1.5 gig so "I guess" temp db didn't consumes all the space in the drive. regarding "make sql dependent on the drive" do I have to configure something for it to be dependent?

    "-=Still Learning=-"

    Lester Policarpio

  • Is this SQL Server instance clustered?

    MJ

  • Is "Auto Close" enabled on the database? Is there anti-virus software which is allowed to scan inside the SQL folders? I have seen this error when a virus scanner is reading the data files at the time SQL is trying to start the db.

  • Thanks for the replies

    @manu-2

    - SQL Server Inatance is not Clustered

    @Edogg

    - "Auto Close" property is disabled

    as of today the problem did not occur

    "-=Still Learning=-"

    Lester Policarpio

  • Lester Policarpio (10/12/2008)


    Thank you for the inputs guys. When I received the error in my server i already checked the drive where in the mdf and ldf is and the size of the drive is still 1.5 gig so "I guess" temp db didn't consumes all the space in the drive. regarding "make sql dependent on the drive" do I have to configure something for it to be dependent?

    tempdb should be on another drive. Maybe that one was full.

  • Godd Day guys,

    The error I encountered 3 days ago occur in 1 of our production database. The database is in suspect mode and the error in the errorlog are as follows..

    Device activation error. The physical file name 'd:\mssql\data\database_Data.MDF' may be incorrect.

    - the file is in the directory

    FCB::Open failed: Could not open device d:\mssql\data\database_Data.MDF for virtual device number (VDN) 1.

    - same error with 1 of my database in the test server

    TempDB mdf = 595.44 MB (actual size is 8.19 MB, free tempdb space 587.25 MB)

    Hard drive space is almost 8 gig

    I cannot restart the sql service because transactions are going in and out on other databases. Lucky for us the database is just for report purposes...

    "-=Still Learning=-"

    Lester Policarpio

  • Problem was solved. We take the database to offline mode then switch the database to online mode then the database becomes available 😀

    "-=Still Learning=-"

    Lester Policarpio

  • I do agree that if virus scanning is going on those database files,it may give you a problem..

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

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