While working actively on development of complex systems in small development team, my team often had a need for a simple instance backup, especially where there were more than one database in that instance. Even with one database this will save you a lot of time while backing up databases. I love this piece of code and i would like to share this with you.
First part is sql script.
Set The @filepath to shoot on your desired location, and make sure that you have that folder. You need as well to have folder with your instance name in this folder.
Hence: Instance name = SQLEXPRESS
Make sure that you have D:MyDBBackups\SQLEXPRESS folder
Second part is bat file which will invoke desired instance backup.
Change SERVERNAME and INSTANCENAME to match your own.
Filename of the database backup will have this format: databasenameYYYYMMDD.bak
As You guessed, regarding to title of this post, You can add more instances to this bat file, same way this one is added.
Big thanks to Dragan Zdravkovic for shoving me how.
Here is the thought that can be shared to all you git newbies like myself. You have branch X and branch Y. You committed something on the branch X and now you want this commit on the branch Y. This is basically like you want to copy files, from one branch to another, but you don’t want actually to create new commits. You just want to take existing one from branch X.
Decision we make, define us in the future. Start of the year is usually the best time for clearing thoughts and defining new goals in the year that already started. Here are some things that I will try to accomplish in 2012:
I really want to be helicopter pilot and buy one Yacht.
Just kidding, I would like to find some time to dive into Ruby and Phyton.
No SQL is something that I found really interesting, but still didn’t get chance to try. I will try Coach DB or something similar as soon as I get chance for that.
Improve my coding skills and contribute to software development community.
Organize office activities in order to be more productive. Less work – More Job done.
Improve my serve.
Loose more weight.
Get Married finally
That is not all, god forbid.
Wish you all the best in 2012.