Microsoft has added its new online restore option to SQL Server 2005, which allows you to restore a backup while the database is still online.
In the past you needed exclusive access to the database in order to restore, but that's not the case with SQL Server 2005.
Note that:
(1) This option only exists in the Enterprise and Developer Editions of SQL Server 2005 and
(2) You can only restore at the filegroup level.
Is it therefore possible to achieve this using Litespeed console?
The answer is No.
CR61605 has been created in Star team to address the issue.
Workaround:
You can use stored procedures as shown in the example below;
ALTER DATABASE database_name MODIFY FILE (name='damagedfile', OFFLINE) -- To take the file offline while the database remains online
select * from sys.database_files -- To check the state of the file and make sure it's offline
EXEC master.dbo.xp_restore_database
@database = 'offlinefiletest',
@filename = 'd:\backups\offlinefiletest.bak',
@file = 'damagedfile',
@WITH = 'NORECOVERY' -- To restore the file
Select * from sys.database_files -- To check the state of the file and make sure it's in a restoring state
EXEC master.dbo.xp_restore_log
@database='offlinefiletest'
, @filename = 'd:\backups\offlinefiletest_log.bak'
, @with = 'RECOVERY' -- Use t-logs to bring the file back online
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center