Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching a database using sp_attach_db

Status
Not open for further replies.

fulbert

Programmer
Nov 18, 2002
10
0
0
PH
I've experience a power failure that makes my database a suspect and unusable. So what I did was to detach the suspect database and then reattach it. However, when attaching the said database using sp_attach_db, I've encountered an error like this:

-------------------------------------------
Server: Msg 3624, Level 20, State 1, Line 1

Location: pageref.cpp:3882
Expression: pPage->GetLsn()==lp->GetPrevPageLsn()
SPID: 8
Process ID: 720
[Microsoft][ODBC SQL Server] Communication link failure
Connection broken
-------------------------------------------

I think the database may be damage or may be something happened when it encountered a power failure. Anyway, I have a backup of the said the database, but it's almost a month old already, so I'm very desperate in recovering that database. Also, I'm using MS SQL 7.

If anyone have any idea/answer to what should I do, please post. Thank you.
 
Try restoring the backup on a new database, then apply what ever logs you have, unless the database is running, or was, usin the simple recovery mode which does not keep transaction logs..

You can try DBCC Repair command from query analyzer.
more info at :
________________________________________________________________________________
If you do not like change, get out of the IT business...
 
Server: Msg 3624, Level 20, State 1, Line 1

Location: recovery.c:2657
Expression: seenCkptEnd
SPID: 9
Process ID: 900

Connection Broken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top