Script Download/upload Batch Job For Sql 2008 Database

We have an immediate need to script the following processes. After this project is completed we need to have the ability to edit the content of the script to update usernames, passwords and the server names/IPs.

1) Download a password protected .zip file via https.
2) Unzip password protected file using 7-Zip command line (or use a similar decompression utility).
3) Restore newly unzipped .bak database file to local SQL 2008 server.
4) Apply an existing .sql query to newly restored database.
5) Save results in an XML Report and store as a .xml file.
6) PGP encrypt .xml report with a time stamp in the file name.
7) Upload the file to a remote SFTP server, using SSH’s SFTP protocol.

The entire process above needs to run every night Mon-Fri. The server is running Windows Server 2008 32 bit, SQL Studio Manager 2008, PGP Desktop ver. 10 (using existing keys), 7-Zip 4.65. Good knowledge of PGP encryption methods is a requirement for this project. Administrative access to the server will be provided via logmein free.

Please let me know if you have any questions.

Thank you,

James

Leave a Reply

Your email address will not be published. Required fields are marked *