Interview Question in Backup and Recovery


 

Interview Question :: How to automatically run a command in Windows at a certain time


I have to set up an automatic backup of my server's hard drive onto an external HD. There are some files that I am unable to copy because they are being used by the SQL Server.

I need to run NET STOP MSSQLSERVER at the end of the working day, make the full backup of my hard drive and then run NET START MSSQLSERVER the next morning.

How can I do it???
Answers to "How to automatically run a command in Windows at a certain time"
RE: How to automatically run a command in Windows at a certain time?

When you use a serious backup program like IBM's Rescue and Recovery, these files are copied along with the other files. But it is possible to run a .CMD script that uses SC commands to stop the SQL Server service (or NET STOP) and launch the backup program. Simply create a .TXT file with the needed commands and rename it .CMD. Next, use Start | All Programs | Accessories | System Tools | Scheduled Tasks to add a new scheduled task that launches your .CMD.



hth
 
Vote for this answer ::  
Update Alert Setting