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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't access my sql database

Status
Not open for further replies.

fedum

Technical User
Mar 22, 2004
104
BE
My PC has been reset during that I was working with a application under SQL. The pc is a stand alone pc not connected with a server, with sql agent. When I try to attach the database to the sqlserver I get Error 3456: Could not redo log record(96:4510:19),for transaction ID(0:419159), on page(1:22808),database '...'(7),Page:LSN=(96:4434:17),type=1.Log:OpCode=2,context 2,PrevPageLSN:(96:4265:17). If I try to start the application I get the error Database could not been open. Cannot open database requested in login '.......'. Login fails(37000). Press ok to end this application. Please help because I do not have a recent backup!!!!!
Marc
 
Ouch! ... well first off and I have to say it for others to learn ... Need to have your backups working!

OK ... this is a Microsoft SQL Server DB is it not?

If so, go into Enterprise Manager(EM) and see if the database your application is trying to open is in Suspect or Emergency Mode.

Relay back what you find!

Thanks

J. Kusch
 
Well Jay,
About the backup I know but I think it's there where the problem started. The last backup is not complete and I can't but it back. I don't see this database in the EM because normaly this application is working on a stand alone PC with SLQ Agent. I have copied the dat and the log file (TT-Pos_V300_Data.mdf and TT-Pos_V300_Log.ldf)to my pc with slq 2000. When I try to attach I get the error.
Regards,
Marc
 
Have you tried to use the sp_attach_single_file_db yet?

Try this ...

RENAME your ldf to something like TT-Pos_V300_Log.ldf2

Then in Query Analyzer run the following ...

Code:
EXEC sp_attach_single_file_db @dbname = 'TT-Pos_V300', 
   @physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\TT-Pos_V300_Data.mdf'
Of course you may need to change up the path to point to where your TT-Pos_V300_Data.mdf file lives on your PC


Thanks

J. Kusch
 

Hi
I tryed the sp_attach before but no result. I justed tried youre code but with result errror:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'TT-Pos_V300_data'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'c:\Program Files\Tekton-IT\sqllog\TT-Pos_V300_Log.LDF' may be incorrect.
 
I have found a way to solve this problem and I can attach the database again. But now I have in the application a error when creating a new record. Couls not make the link to other tables. Somthing about the sysdatabases. I'm not at the right pc so I will send you the correct error on delay.
Thanks,
Marc
 
See if the attached database is in Suspect Mode.

Thanks

J. Kusch
 
It was but it's back. I get the error Attempt to fetch logical page(1:22848) in database('TT-Pos_V300' belongs to object '222623836', not to object 'PosBewegingsArtikels'.(S1000)
In stead of '222623836' was also 'sysindexes'

And in the application when creating a new record: Communications link failure(08S01)
Thanks,
Marc
 
Thanks Jay,
I have solved the problem. Have rebuild the database and the errors are gone. Thanks for your support.
Regards,
Marc
 
fedum,

you said "I have found a way to solve this problem and I can attach the database again."

can I ask how you solved this problem ?

I find myself in exactly the same position and am struggling to find out how to recover the database.

 
I found one of my development databases in a 'Suspect' state today, the way that I resolved it was to stop & restart SQL on the development server.

Each time SQL starts it checks the state of each database so I presume it had some kind of a cow when it was restarted last time?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top