Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Error when running SQLRestor in sql server 2005

Author  Topic 

BFP
Starting Member

2 Posts

Posted - 2011-01-19 : 06:13:51
Hi I am having a problem when restoring sql databases. When restoring the databases I will get a sqlexception was unhandled error. The error message will applies to different database each time i do a restore.
i have taken four screan shots of the error message i can email the if any one can help,
Help

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-19 : 07:04:01
Post the text of the error (not a screenshot) and the exact command you're running.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

BFP
Starting Member

2 Posts

Posted - 2011-01-19 : 10:15:45
ALTER DATABASE mydb SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

RESTORE DATABASE mydb
FROM DISK = ‘c:\mydb.bak’
WITH
MOVE 'mydb' TO 'c:\sqldata\mydb.mdf',
MOVE 'mydb_log' TO 'd:\sqllog\mydb_log.ldf',
REPLACE;


Full text:
SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x6ce969b6; actual: 0x6cf69656). It occurred during a read of page (1:52) in database ID 10 at offset 0x00000000068000 in file 'c:\SqlData\lob.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Database 'lob' was restored, however an error was encountered while replication was being restored/removed. The database has been left offline. See the topic MSSQL_ENG003165 in SQL Server Books Online.
RESTORE could not start database 'lob'.
RESTORE DATABASE is terminating abnormally.
Processed 1272 pages for database 'lob', file 'matcher_classes' on file 1.
Processed 2 pages for database 'lob', file 'matcher_classes_log' on file 1.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-19 : 10:21:19
Looks like the backup is damaged or the database is corrupt.

Run the following on the database that's the source of that backup file and post the full results.
DBCC CheckDB(<Database name>) WITH No_INFOMSGS, ALL_ERRORMSGS


You should also do some checks of the IO subsystem, as this is almost always an IO subsystem problem.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -