Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 13th, 2003, 04:45 AM
Authorized User
 
Join Date: Jun 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Restore & Delete Scripts

I was wondering if anyone out there can help me out I need a script to restore db and after the restore delete the backup file. Can anyone out there help me please?

CarlWalden
__________________
CarlWalden
 
Old June 16th, 2003, 06:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
Default

USE master
GO
RESTORE DATABASE MyNwind
    FROM DISK = 'C:\MSSQL\Backup\MyBackup.bak'
dbo.xpcmdShell 'del C:\MSSQL\Backup\MyBackup.bak'
GO

regards
David Cameron





Similar Threads
Thread Thread Starter Forum Replies Last Post
PakageMaker & External scripts murraywj Xcode 1 May 12th, 2006 05:00 PM
Newbie: XSLT & Scripts kwilliams XSLT 13 August 5th, 2005 11:39 AM
Append & Delete Query Teqlump Access 2 October 7th, 2004 03:40 AM
how to save & restore default printer settings? Tiffany Pro VB 6 1 April 7th, 2004 06:59 PM
Delete & Trunate table hrishimusale SQL Server 2000 1 September 2nd, 2003 03:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.