SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Attach Database failed for server 'M3'


Attach Database failed for server 'M3'

Author
Message
deba_20032004
deba_20032004
SSC Journeyman
SSC Journeyman (98 reputation)SSC Journeyman (98 reputation)SSC Journeyman (98 reputation)SSC Journeyman (98 reputation)SSC Journeyman (98 reputation)SSC Journeyman (98 reputation)SSC Journeyman (98 reputation)SSC Journeyman (98 reputation)

Group: General Forum Members
Points: 98 Visits: 221
Dear Sir,

I am in great trouble, at present I have no back of the database, while i attaching database in the sql server 2000, the Sql server giving error message which was mentioned below within single quotes.

'Attach database failed for Server 'M3'. (Microsoft.SqlServer.Smo)

An exception occurred while executing a Transact-SQL statement or batch.

I/O error (torn page) detected during read at offset 0x0000003d0f4000 in file 'D:\TEST\DS1213.mdf'.
Error while redoing logged operation in database 'DS1213'. Error at log record ID (1081:4550:10).
Could not open new database 'DS1213'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 823)'

how to attach the database I don't know please help me anybody

Thanking You

Debasis Bag
GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87521 Visits: 45272
No backup? Seriously why the hell not?

Your database is corrupt, it may be possible to get it back with some data loss, it may not. You need to 'hack' the database back into SQL Server.

Copy those files somewhere safe for the moment.
Create a new database with the same file structure (same number of files, same logical names) as the files for the DB you can't attach.
Stop SQL Server
Delete the files for the newly created database and put the files from that damaged database in their place.
Restart SQL Server. The database will probably come up suspect.

Once you're that far, post the error log entries and the output of querying sysdatabases for that DB. DO NOTHING ELSE AT THIS POINT.

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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87521 Visits: 45272
Please post the outcomes and messages here, not elsewhere. Keeping things in one place makes problems far easier to solve.

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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


seven.srikanth
seven.srikanth
Valued Member
Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)

Group: General Forum Members
Points: 74 Visits: 463
Try attaching to Higher Version of SQL server, if attaching works fix it. detach it and attach it back to SQL Server 2000.

I'm not sure, that this will work. But worth giving a try.
Steve Jones
Steve Jones
SSC Guru
SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

Group: Administrators
Points: 62737 Visits: 19111
Try attaching to Higher Version of SQL server, if attaching works fix it. detach it and attach it back to SQL Server 2000.


That will not work. Once you attach to a higher version, you cannot ever attach it back to a lower one.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
seven.srikanth
seven.srikanth
Valued Member
Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)Valued Member (74 reputation)

Group: General Forum Members
Points: 74 Visits: 463
I haven't done that before..

I'm aware that backups can't be restored to lower version and not about this.

Thanks for your inputs...
GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87521 Visits: 45272
seven.srikanth (5/26/2012)
Try attaching to Higher Version of SQL server, if attaching works fix it. detach it and attach it back to SQL Server 2000.

I'm not sure, that this will work. But worth giving a try.


Not only won't it work, but it's far less likely that a damaged database will attach to a higher version than to the version it was detached from and if it does by some small miracle work, the OP would not be able to get the DB back to the lower version.

Please don't give advice in the data corruption forums that can make a situation worse.

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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


prettsons
prettsons
SSChasing Mays
SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)

Group: General Forum Members
Points: 608 Visits: 1388
The I/O error (torn page) error occurs when SQL Server tried to access a page that had previously not been written to disk correctly. This can be happen due to power failure, disk failure, hardware failure when the disk is being written to.

When this error occurs, sql server ended your connection. If the torn page was detected during database recovery, then SQL Server will mark it as SUSPECT.

Solution: First Check your error logs and then restore your database form last good backups and transaction logs. It will definitely fix the problem, but you should also check your disk and fix any issues if there was a disk hardware failure. You can also use third party sql database recovery software to resolve this error.

SQL Database Recovery Expert :-)
Schadenfreude-Mei
Schadenfreude-Mei
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1669 Visits: 1336
prettsons (5/30/2012)
The I/O error (torn page) error occurs when SQL Server tried to access a page that had previously not been written to disk correctly. This can be happen due to power failure, disk failure, hardware failure when the disk is being written to.

When this error occurs, sql server ended your connection. If the torn page was detected during database recovery, then SQL Server will mark it as SUSPECT.

Solution: First Check your error logs and then restore your database form last good backups and transaction logs. It will definitely fix the problem, but you should also check your disk and fix any issues if there was a disk hardware failure. You can also use third party sql database recovery software to resolve this error.

The OP has said that there are no backups :-(

Adam Zacks

-------------------------------------------

Be Nice, Or Leave
prettsons
prettsons
SSChasing Mays
SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)SSChasing Mays (608 reputation)

Group: General Forum Members
Points: 608 Visits: 1388
Schadenfreude-Mei (5/30/2012)
prettsons (5/30/2012)
The I/O error (torn page) error occurs when SQL Server tried to access a page that had previously not been written to disk correctly. This can be happen due to power failure, disk failure, hardware failure when the disk is being written to.

When this error occurs, sql server ended your connection. If the torn page was detected during database recovery, then SQL Server will mark it as SUSPECT.

Solution: First Check your error logs and then restore your database form last good backups and transaction logs. It will definitely fix the problem, but you should also check your disk and fix any issues if there was a disk hardware failure. You can also use third party sql database recovery software to resolve this error.

The OP has said that there are no backups :-(


I shall suggest to Debasis Bag to try third party sql database recovery software.

SQL Database Recovery Expert :-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search