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
 General SQL Server Forums
 New to SQL Server Programming
 restore fail

Author  Topic 

ann06
Posting Yak Master

171 Posts

Posted - 2008-12-29 : 07:40:49
hi i have a test database in the loading state, i wanted to recover
by using

restore database efilingtest with recovery

but its giving this error

File 'DAH_TEST2_Data' was only partially restored by a database or file restore. The entire file must be successfully restored before applying the log.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

what could be the reason, i forgot how i restored but since its in the loading stated shouldn' the recovery option make it online?

jason7655
Starting Member

24 Posts

Posted - 2008-12-29 : 23:15:13
have a look at this:
RESTORE DATABASE [AdventureWorksNew]
FROM DISK = N'\\nas\Backup\L40\SQL2005\AdventureWorks_backup_200702120215.bak'
WITH FILE = 1,
MOVE N'AdventureWorks_Data' TO N'C:\Data\MSSQL.1\MSSQL\Data\AdventureWorksNew_Data.mdf',
MOVE N'AdventureWorks_Log' TO N'C:\Data\MSSQL.1\MSSQL\Data\AdventureWorksNew_Log.ldf',
NOUNLOAD, STATS = 10

From here: [url]http://www.sqlteam.com/article/backup-and-restore-in-sql-server-full-backups[/url]

You could also do:
RESTORE FILELISTONLY
FROM DISK = 'D:BackUpYourBaackUpFile.bak'
GO

This will show you what logical filenames you are dealing with.

I believe the with recovery you are telling it that you still have files to restore before it being online.

Look here also:
[url]http://msdn.microsoft.com/en-us/library/ms186858(SQL.90).aspx[/url]
Go to Top of Page
   

- Advertisement -