question

Annamu avatar image
Annamu asked

SQL server Stored Procedure back Script

Hi Folks I am supposed to write a script for the following tasks 1. Perform Full Back-up on server 1 and store it over there 2. Perform Copy Full Back-up to server 2 3. Make sure that the COPY of the back-up to server 2 is successful 4. Delete Backup on server 1 prior to running the backup on the next day. Currently i am using OLA halogen database backup script to do the backup,by this script the backup is directly done to the destination server.But due to network issue i am unable to backup a huge database,let it be TestDB.Now i have to modify the script by taking the backup of testdb in local server and move it to destination server and once the backup is successfully moved to destination server, it should be deleted in source server to save space.I have to modify the script accordingly.Please help ! Kind Ragards Anna
stored-proceduressql serverbackup-restorebackup failed
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DenisT avatar image DenisT commented ·
PowerShell is your friend! It would be unwise to implement something like this using T-SQL. It's just not meant to deal with the file system. You have the right logic in mind, you just need to translate it in to PowerShell.
0 Likes 0 ·

1 Answer

·
Lukasz8519 avatar image
Lukasz8519 answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.