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
 SQL Server Administration (2008)
 Attached DB fail...Urgent..need help

Author  Topic 

waterduck
Aged Yak Warrior

982 Posts

Posted - 2011-06-08 : 23:43:13
HELP!!!

Could not open new database 'DB_DUCK'. Create Database is aborted. File Activation failure. The physical file name "I\DB_DUCK_LOG.ldf" may be incorrect. The log cannot be rebuilt because there were open transactions/users when the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure. (Microsoft SQL Server, Error:1813)

Why i cannot restore this db....omg...

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-06-09 : 00:13:55
Are you trying to attach both the mdf and the ldf? Or just the mdf?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

waterduck
Aged Yak Warrior

982 Posts

Posted - 2011-06-09 : 02:34:55
i got only the mdf....dying soon....duno which fellow so smart to remove the harddisc without notify anyone of us...
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-06-09 : 03:36:47
Try
CREATE DATABASE ....
FOR ATTACH_REBUILD_LOG

Do you have a backup?

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

waterduck
Aged Yak Warrior

982 Posts

Posted - 2011-06-09 : 04:21:01
hahaha give up...had to use abit outdated backup....btw i notice that sql2008 cannot use DAC to edit sysdatabases ya? even with sqlcmd /A
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-06-09 : 05:09:47
sysdatabases isn't a table. Editing the real system tables is the fastest way to damage something beyond repair.

p.s. I could probably have helped you attach that file.

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

waterduck
Aged Yak Warrior

982 Posts

Posted - 2011-06-09 : 22:07:39
errr....gail...neither yours way work...i tried also with
1. sp_attach_single_file_db -- not work
2. CREATE DATABASE ....FOR ATTACH_REBUILD_LOG -- not work

The scenario was you create a DB(mdf & ldf) in a harddisc, you take out the harddisc, put it in again, copy mdf to C:\.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-06-09 : 23:10:35
Oh this was just a test and not a real thing? Why did you mark this as urgent?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-06-10 : 06:08:29
Ok, so be specific. "It didn't work" doesn't tell me enough to identify the next step. That's just the first try, far from the last.

And I agree with Tara. If this was a test, it was in no way 'Urgent'. Urgent is 'My main production system is down, we're losing $1 million an hour and I'll be fired if this isn't up today'

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

- Advertisement -