Operational db without an .ldf file and no useful backups on SQL Server 2005.

This is the place to discuss the latest computer hardware issues and technology. Please keep the discussion ON TOPIC!
Post Reply
perkins
Legit Little One
Legit Little One
Posts: 2
Joined: Tue Mar 08, 2016 9:29 am

Operational db without an .ldf file and no useful backups on SQL Server 2005.

Post by perkins »

No, the question isn't stupid but the "admin" sure is.... BUT, if you can help, please do! The problem is how to recover a .mdf file into an operational db without an .ldf file and no useful backups on SQL Server 2005. See, I told you - STUPID!!

Now, I've seen plenty of suggestions for SQL 2K, but not 2005. Single file attach - no go. Detach wasn't proper. DBCC REBUILD_LOG, where most SQL 2K solutions end up - can't get there on 2005. At least not in any method I've tried. Access to those system tables not allowed (no "ad-hoc queries"). 3rd party recovery tools? Anything....?

(This isn't a big db, ~ 8GB, but it is rather important AND urgent).

Many thanks!
OrnSveinsson
Legit Little One
Legit Little One
Posts: 2
Joined: Mon Mar 21, 2016 1:24 pm

Re: Operational db without an .ldf file and no useful backups on SQL Server 2005.

Post by OrnSveinsson »

You will have data loss but it can be done.
1) Detach database and move your mdf to save location.
2) Create new databse of same name, same files, same file location and same file size.
3) Stop SQL server.
4) Swap mdf file of just created DB to your save one.
5) Start SQL. DB will go suspect.
6) ALTER DATABSE <your db> SET EMERGENCY
ALTER DATABASE <your db> SET SINGLE_USER
7) DBCC CHECKDB (<your db>, REPAIR_ALLOW_DATA_LOSS)
8) ALTER DATABASE <your db> SET MULTI_USER
ALTER DATABSE <your db> SET ONLINE
From programs you can try SQL Server Recovery Toolbox if you want. There is a demo version, so you can check it will help you or not. http://www.oemailrecovery.com/sql_repair.html
OrnSveinsson
Legit Little One
Legit Little One
Posts: 2
Joined: Mon Mar 21, 2016 1:24 pm

Re: Operational db without an .ldf file and no useful backups on SQL Server 2005.

Post by OrnSveinsson »

May be this article will give you more information.
http://www.techrepublic.com/forums/ques ... corrupted/
perkins
Legit Little One
Legit Little One
Posts: 2
Joined: Tue Mar 08, 2016 9:29 am

Re: Operational db without an .ldf file and no useful backups on SQL Server 2005.

Post by perkins »

I am very grateful for your advice. Thank you very much! The issue has been resolved.)
Post Reply