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
 how to restore database, only resotre data not log

Author  Topic 

zhangyoukun
Starting Member

1 Post

Posted - 2008-07-31 : 21:57:48
I have a 80GB backup file RVTV420080730.sls from another team's daily backup,I need to daily resotre to my local database,I use below sql to get file info:
exec master.dbo.xp_restore_filelistonly
@filename ='D:\RVTV4backup\RVTV420080730.sls'
result:
LogicalName PhysicalName Type FileGroupName Size MaxSize
RVTV4_data D:\RVTV4\RVTV4SQLDB.mdf D PRIMARY 175052029952 35184372080640
RVTV4_log D:\RVTV4\RVTV4_Log.ldf L NULL 249941196800 35184372080640
RVTV4_log2 E:\RVTV4_log\RVTV4_log2.ldf L NULL 49970544640 35184372080640

so we can see that RVTV4_log is very large,I use below sql to resotore:
exec master.dbo.xp_restore_database
@database = 'RVTv4'
,@fileName = 'D:\RVTV4backup\RVTV420080730.sls'
,@with = 'Move "RVTv4_data" To "D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\RVTv4.mdf"'
, @with = 'Move "RVTv4_log" To "D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\RVTv4_log.ldf"'
, @with = 'Move "RVTv4_log2" To "D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\RVTv4_log2.ldf"'

and now I will get a error:
There is insufficient free space on disk volume 'D:\' to create the database. The database requires 209065082880 additional free bytes, while only 49580699648 bytes are available.

so I want to resotre data only, not resotre log, but how to do it?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-31 : 23:22:10
No you can't. What's db recovery model? Do they ever backup log? Why need 2 log files? Why put log on same drive with data file? By the way, you can get all db files and size with 'restore filelistonly'.
Go to Top of Page
   

- Advertisement -