Link to home
Start Free TrialLog in
Avatar of dakota5
dakota5Flag for United States of America

asked on

restore database when sql server won't start

I have a single instance of SQL server 2008 running on Server 2008 R2.  The SQL program files and most of the datafiles are on the main server box;  a few data files from a single partitioned table were on an external storage device that failed.

I have a complete backup of the database.  But SQL server won't start, so I can't use SQL Server Management Studio to do the restore.

It seems that all I really need to do is to use the complete backup (1Terabyte) to get the 100 GB of datafiles restored to the external storage device.

Is this the most efficient way of getting restored?  How do I do this?

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

>But SQL server won't start
you just need to solve that?!

please post the contents of the ERRORLOG file from the sql server log folder
Avatar of dakota5

ASKER

OK.  Will do this on Monday 10/17/11
Avatar of dakota5

ASKER

After creating the directory structure for the database files stored on the repaired external storage device, sql server now starts.
The database which had some of its datafiles on the repaired external storage device does not start.  When I right click on the name of the database in SSMS, my only options are to take the database offline, or to detach it.
I do not have the option to restore it.  (I have a complete backup online).

The other databases running on this instance of MS SQL are functioning normally-- only this one database had datafiles on the external storage device that malfunctioned.

How do I restore the entire database;  and I'd like to run restore in a verify only mode, first, just to make sure all the directory structures are in place.
As angelIII has indicated the answer to your question is in the ERRORLOG.
Avatar of dakota5

ASKER

The error log states the names of the datafiles that are missing from the restored external storage device.

But how do I selectively restore datafile1.ndf from the complete 1 TB backup without restoring the entire backup?  Or must I restore the entire 1TB database?
>But how do I selectively restore datafile1.ndf from the complete 1 TB backup without restoring the entire backup?  Or must I restore the entire 1TB database?

how did you "backup"?
Avatar of dakota5

ASKER

Backup was performed in SSMS.
Right click database | tasks | backup |

Full backup type, backup database (not files or filegroups)
Database has Simple recovery model.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial