SQL Server - Delete Media File after Restore

SQL Server - Delete Media File after Restore

 

  

Dear All, we are copying databases by the process of backing up to file the
original database and then restoring the backup file to the copy database.
This however leaves a physical backup file on the server.
Is there any way in SQL to delete this file after the restore (we could use
DOS but would like to have all the tasks written in SQL so we can set it up
as a job within SQLServer).

Your help would be very welcome indeed.

Brian


ICT ........ helping you work smarter

Brian Taylor
Project Manager - Newham ICT Development Services

Internal: 46557
Direct Line: 020 8430 3724
Mobile: 07932 004129
Fax: 020 8430 1513

London Borough of Newham
ICT
Direct House
Bridge Road Depot
Abbey Road
Stratford E15 3LX




Newham is one of the host boroughs for the London 2012 Olympic and Paralympic Games.
For further details see http://www.olympics.newham.gov.uk

NOTE: This communication is sent for and on behalf of the London Borough of Newham.
However the views expressed within it are not necessarily the views or policies of the Council. The unauthorised use, disclosure, copying or alteration of this communication and any attachments is forbidden. This communication and any attachments are intended for the addressee only and may be confidential. If this has come to you in error you should immediately permanently destroy it.
You should take no action based on it or copy or show it to anyone and telephone the Council immediately with any issues on 0208 430 4444 or any other number provided in the communication. Please note that electronic communication is not considered a secure medium for sending information and therefore maybe at risk.
We advise that you understand and accept this lack of security when using this form of communication with us. Although we have taken steps to ensure that this email and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free and should run current anti-virus software. Please note that email may be monitored and checked to safeguard the council network from viruses, hoax messages or abuse of the Council's systems. Action may be taken against any malicious and deliberate attempts to infect the council network.
The information contained in this email maybe subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure the confidentiality of this email and your reply cannot be guaranteed.


MS Sql Server LazyDBA home page