SQL Corruption

  • Your installation is either corrupt or has been tampered with. (Error getting instance ID from name). Please uninstall then re-run setup to correct this problem.

    I recently built a 2-node SQL Server 2005 cluster. One of the support guys deleted the tempdb database (along with the parent folder), which was on its own drive.

    Obviously, the SQL Server instance would not start up. When I log in as myself I get access is denied error on the master database files.

    When I log in with the service account and try to start sql server from command line, i get the corruption error above.

    Is there a way to fix this issue w/o re-installing SQL Server?

    While researching online I saw someone mention its not a good idea to put the system databases on SAN. Is this true?

    Does the OS need to be rebuilt as well? The cluster is on Windows 2008 OS.

    Any suggestions?

  • Have you recreated the folder where TempDB should reside? Do this first if not and post back with information. Thanks.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • 2009-02-04 13:22:49.60 spid4s SQL Server started in single-user mode. This an informational message only. No user action is required.

    2009-02-04 13:22:49.60 spid4s Starting up database 'master'.

    2009-02-04 13:22:49.60 spid4s Error: 17207, Severity: 16, State: 1.

    2009-02-04 13:22:49.60 spid4s FCB::Open: Operating system error 5(Access is denied.) occurred while creating or opening file 'F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf'. Diagnose and correct the operating system error, and retry the operation.

    2009-02-04 13:22:49.60 spid4s Error: 17204, Severity: 16, State: 1.

    2009-02-04 13:22:49.60 spid4s FCB::Open failed: Could not open file F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf for file number 1. OS error: 5(Access is denied.).

    2009-02-04 13:22:49.60 spid4s Error: 5120, Severity: 16, State: 101.

    2009-02-04 13:22:49.60 spid4s Unable to open the physical file "F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf". Operating system error 5: "5(Access is denied.)".

    2009-02-04 13:22:49.61 spid4s Error: 17207, Severity: 16, State: 1.

    2009-02-04 13:22:49.61 spid4s FCB::Open: Operating system error 5(Access is denied.) occurred while creating or opening file 'F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf'. Diagnose and correct the operating system error, and retry the operation.

    2009-02-04 13:22:49.61 spid4s Error: 17204, Severity: 16, State: 1.

    2009-02-04 13:22:49.61 spid4s FCB::Open failed: Could not open file F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf for file number 2. OS error: 5(Access is denied.).

    2009-02-04 13:22:49.61 spid4s Error: 5120, Severity: 16, State: 101.

    2009-02-04 13:22:49.61 spid4s Unable to open the physical file "F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf". Operating system error 5: "5(Access is denied.)".

    2009-02-04 13:22:49.61 spid4s Error: 17053, Severity: 16, State: 1.

    2009-02-04 13:22:49.61 spid4s UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

    I did recreate the folders and tried to restart the SQL in single user mode and this is what's logged in the error log.

  • SA (2/4/2009)


    I recently built a 2-node SQL Server 2005 cluster. One of the support guys deleted the tempdb database (along with the parent folder), which was on its own drive.

    Obviously, the SQL Server instance would not start up. When I log in as myself I get access is denied error on the master database files.

    When I log in with the service account and try to start sql server from command line, i get the corruption error above.

    Is there a way to fix this issue w/o re-installing SQL Server?

    While researching online I saw someone mention its not a good idea to put the system databases on SAN. Is this true?

    Does the OS need to be rebuilt as well? The cluster is on Windows 2008 OS.

    Any suggestions?

    With a cluster your system databases have to be on the SAN so that the storage can be swung over to the other node, including the system databases so, I would disregard that post in relation to your situation.

    Are the master database files still there or have they been deleted as well?

    Did tempdb get recreated in the folder now that it is back?

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • SA (2/4/2009)


    2009-02-04 13:22:49.60 spid4s SQL Server started in single-user mode. This an informational message only. No user action is required.

    2009-02-04 13:22:49.60 spid4s Starting up database 'master'.

    2009-02-04 13:22:49.60 spid4s Error: 17207, Severity: 16, State: 1.

    2009-02-04 13:22:49.60 spid4s FCB::Open: Operating system error 5(Access is denied.) occurred while creating or opening file 'F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf'. Diagnose and correct the operating system error, and retry the operation.

    2009-02-04 13:22:49.60 spid4s Error: 17204, Severity: 16, State: 1.

    2009-02-04 13:22:49.60 spid4s FCB::Open failed: Could not open file F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf for file number 1. OS error: 5(Access is denied.).

    2009-02-04 13:22:49.60 spid4s Error: 5120, Severity: 16, State: 101.

    2009-02-04 13:22:49.60 spid4s Unable to open the physical file "F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf". Operating system error 5: "5(Access is denied.)".

    2009-02-04 13:22:49.61 spid4s Error: 17207, Severity: 16, State: 1.

    2009-02-04 13:22:49.61 spid4s FCB::Open: Operating system error 5(Access is denied.) occurred while creating or opening file 'F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf'. Diagnose and correct the operating system error, and retry the operation.

    2009-02-04 13:22:49.61 spid4s Error: 17204, Severity: 16, State: 1.

    2009-02-04 13:22:49.61 spid4s FCB::Open failed: Could not open file F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf for file number 2. OS error: 5(Access is denied.).

    2009-02-04 13:22:49.61 spid4s Error: 5120, Severity: 16, State: 101.

    2009-02-04 13:22:49.61 spid4s Unable to open the physical file "F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf". Operating system error 5: "5(Access is denied.)".

    2009-02-04 13:22:49.61 spid4s Error: 17053, Severity: 16, State: 1.

    2009-02-04 13:22:49.61 spid4s UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

    I did recreate the folders and tried to restart the SQL in single user mode and this is what's logged in the error log.

    I would also verify that the permissions to the drive / folder that is holding your database files has not changed as the error certainly seems to lean that way. 😎

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • Why does it say 'Access id denied'. Can you check to see if the folder holding the data files is accessible or not?

    Thanks!!

    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."

  • All the other system databases are in the original folders as expected. I've logged in with the service account to make sure i can access the drive (different from tempdb) where these are sitting.

  • The tempdb database wasn't created and am logged in with the service account and can open the master db log file in notepad so it shouldn't be a permissions issue.

  • Does your command look something like this?

    sqlservr.exe -d F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf -l F:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

    The last location should match your error log location....

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • i'm executing sqlservr.exe -c -f

    On trying the command you posted, i get an Access is denied error, however, i verified the service account has access to that path.

  • How about with sqlservr.exe -m? Still seems to be a permissions issue though based on the errors but we do know how those are sometimes. 🙁

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • Just out of interest, could you (temporarily) add the service account to the local administrators group and see what happens please?

  • The instance is up and running. It was a permissions issue after all. Here's what I had to do...

    I gave Full Control to the service account on the root parent folder (and have the permissions cascade to descendant files / folders) where the master databases were sitting and it worked. I did also notice that the root parent folder was marked read-only.

    Any idea why these permissions would change on the folders?

  • ...because someone changed them 🙂

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • The guy who made created this mess for me was apparently on the wrong box. He did manage to take out another 3 application databases other than tempdb.

    Thanks for all your help.

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

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