How to restore a LiteSpeed file using filename with wildcard characters.
Example: The backup file was created with a script similar to --
exec master.dbo.xp_backup_database @database = N'Pubs',
@filename = N'C:\Backup\2005\%Y%m%d.bak',
@init = 1
GO
N/A
WORKAROUND:
The wildcards are creating a value from the server time, (%Y%m%d = today's Year, month, date) - so there could only one file in the folder with today's date and this script will only restore a file created today.
This works:
exec master.dbo.xp_restore_database @database = N'Pubs' ,
@filename = N'C:\Backup\2005\%Y%m%d.bak',
@filenumber = 1,
@with = N'REPLACE',
@with = N'STATS = 10',
@affinity = 0,
@logging = 0
***IMPROTANT NOTE***
This is not supported, so the code that allows it to work in version 7.x may be changed at any time.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center