Welcome in the 4th episode of Cloudbusters series. Today it’s Friday and as everyone knows on Friday the Moore’s law is even more possible to be proofed. During the last week I was deploying new environment in Windows Azure. Everything was smooth and easy till the last part – backup. Everyone loves backup, everyone knows how to do it, but not so many of us can really restore something from it if it is done poorly. Indeed, backup is important and due to that we decided to not relay only on the backup done by Microsoft (for sure you guys do the amazing job but Moore’s law is applying also here :)) . That is why we also implemented some easy way to do that with Powershell scripts. We use for that scheduled tasks and run the script created for specific environment. I wrote the same standard script and did the configuration for my fresh new Azure deployment. The scheduled task showed that it finished successfully. Great!!! Happy to close the task and switch to something else I’ve decided to double check the log created during the backup job. And could you imagine my surprise when I opened the log file and saw the following entry:
Bacpac could not be exported. Exception calling “ExportBacpac” with “2” argument(s): “Could not export schema and data from database.”
!@#!$@!#@!#!@#!!!!! What the hell? What happened? And why the scheduled task was successful? I checked the backup directory and saw that the backup file was created by was unusable. It was not possible to restore the database from it. I thought: “easy-peasy – that is for sure known problem ” and started to google for a solution that already someone posted. And here I was surprised one more time – 1 hour of “googling” and nothing. I’ve decided to check that by myself. Checked the list of installed Powershell modules I’ve noticed that I was missing the following component from SQL Server 2012 suite:
Microsoft Windows PowerShell Extensions for SQL Server 2012 R2 which can be downloaded here: http://www.microsoft.com/en-us/download/details.aspx?id=35580
I’ve run the backup job one more time and checked the log file. And…it failed one more time. OK, I got a bit angry. What else are you missing, you stupid server?! I’ve checked one more time the previous backup routines I’ve created on another server as well as the list of installed tools and features from SQL Server 2012 suite. And finally I found the difference. It occurred that :
Microsoft® SQL Server® 2012 Data-Tier Application Framework (http://www.microsoft.com/en-us/download/details.aspx?id=39700)
was not installed on the server on which I was running the backup job. Five minutes later the package was downloaded and installed. “Final attempt” – I thought. Scheduled task finished – Success. OK, let’s check then the log file. With trembling hand I opened the file and saw the information written by the script: “The database was backed up successfully!”. Checked the backup directory and tried to restore the database. Everything went well. Smiling and satisfied from myself I closed the task.
Hope that this short post will help someone with the same problem.
See you in the next episode of Cloudbusters series. Happy Friday guys!!!