This script is designed to backup the database, and copy it over the network to our backup server. The requirement for this particular database is 7 days of data kept on the LAN. The share on the backup server is mapped to the Y:\ drive. The datename function is used over the datepart function for returning a string for ease of administration, particularly if non DBAs have to interpret the script. The live version of this actually runs in a job, with the backup portion being separated from the copy, allowing us to back out based on results, of the backup.
Harnessing SQL Server Metadata- Disabling and Rebuilding Indexes
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.
2018-05-18 (first published: 2015-10-19)
4,845 reads