August 18, 2011 at 1:10 am
Hi,
i have a database that seems offline or corrupt.
The problem is i cannot browse through the Database's objects because the Database appears to be not having any objects to browse when i check using SSMS.
pls assist.
August 18, 2011 at 2:06 am
Query sys.databases, what's the state_desc for that database?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 18, 2011 at 2:12 am
RECOVERY_PENDING
August 18, 2011 at 2:27 am
Look through the SQL error logs, there will be messages saying why the DB could not be opened. Post all of those messages here.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 18, 2011 at 2:27 am
when i run ALTER DATABASE DBNAME SET ONLINE command, i get the following result:-
Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\dbname.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
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.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
when i run SELECT state_desc FROM sys.databases WHERE name=dbname;
i get the state as RECOVERY_PENDING.
help?
August 18, 2011 at 2:32 am
I didn't say set the DB online. I said read through the SQL error logs and find all the errors relating to that database.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 18, 2011 at 3:55 am
Hi,
my bed.....
the db is not online. still
August 18, 2011 at 3:58 am
Date8/16/2011 12:24:45 PM
LogSQL Server (Archive #2 - 8/17/2011 7:43:00 PM)
Sourcespid147
Message
FCB::Open failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\bdname.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).
Date8/16/2011 10:35:14 AM
LogSQL Server (Archive #2 - 8/17/2011 7:43:00 PM)
Sourcespid261
Message
FCB::Open failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\bdname.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).
Date8/16/2011 10:35:14 AM
LogSQL Server (Archive #2 - 8/17/2011 7:43:00 PM)
Sourcespid261
Message
During upgrade, database raised exception 945, severity 14, state 2, address 017195C8. Use the exception number to determine the cause.
August 18, 2011 at 4:27 am
Ok....
Has this database has worked before on this server?
Is there another instance of SQL on this server?
Is there an anti-virus running?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 18, 2011 at 6:45 am
Hi,
According to the customer the Database was working before +- 24-48 hours ago.
There is another instance on the erver running but i have no access to that instance.
Microsoft forefront is the antivirus.
August 18, 2011 at 7:11 am
Make sure that the exclusions in the anti-virus are correct. It should exclude a,, mdf, ndf, ldf, bak and trn files.
Also, download sysinternals process explorer and use that to see what has a handle on that file. Some other process other than SQL has it open. The antivirus is a likely cause.
Lastly, find out from the server admin what has changed in that 24-48 hours. Speak to the person responsible for the other instance too.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply