April 16, 2010 at 5:54 am
Hi All,
Today my database suddenly went to suspect mode and i recover it normal mode by using below query.
EXEC sp_resetstatus 'databaseName';
ALTER DATABASE databaseName SET EMERGENCY
DBCC checkdb('databaseName')
ALTER DATABASE databaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('databaseName', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE databaseName SET MULTI_USER
now the problem is when i see the property of my database and select Files option at that time it don't show me the log files.
and may be because of that reason when i try to insert records in the table at that time it gives me an error. :w00t:
I really don't understand why it behave like this ???
Thanks in advace
April 16, 2010 at 7:30 am
Krishnraj (4/16/2010)
Hi All,Today my database suddenly went to suspect mode and i recover it normal mode by using below query.
EXEC sp_resetstatus 'databaseName';
ALTER DATABASE databaseName SET EMERGENCY
DBCC checkdb('databaseName')
ALTER DATABASE databaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('databaseName', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE databaseName SET MULTI_USER
now the problem is when i see the property of my database and select Files option at that time it don't show me the log files.
and may be because of that reason when i try to insert records in the table at that time it gives me an error. :w00t:
I really don't understand why it behave like this ???
Thanks in advace
Did u check the sql server error log & OS ?
why do u run the "REPAIR_ALLOW_DATA_LOSS" without knowing the problem ?
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
April 17, 2010 at 12:20 am
Hi muthukkumaran,
First-of-all thanks for yr reply....
Yes, I check the error logs in sql server. Here below is the detail...
At 2.35 pm I got the below message.
[298] SQLServer Error: 4060, Cannot open database "ProductManagement" requested by the login. The login failed. [SQLSTATE 42000]
and then i got the below message.
[298] SQLServer Error: 3313, During redoing of a logged operation in database 'ProductManagement', an error occurred at log record ID (21867:665:7). Typically, the specific failure is previously logged as an error in the Windows Event Log service. Restore the database from a full backup, or repair the database. [SQLSTATE HY000]
At this time when i check my database, it goes into the suspect mode.
This was first time i got this error. :crazy: Previously, I never got this type of error. so i just done some googling and get the above query from codeproject site.
Plz tell me is there another way to recover my log file. Actually It is there in hard-drive but doesn't show me in database property.
Thanks again....
April 17, 2010 at 5:10 pm
Your best option is to restore from backups, applying all of your transaction log backups up to the point in time of the failure. You do have a good backup and transaction log backups - right?
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
April 19, 2010 at 7:21 am
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply