Last post Mar 11, 2019 07:24 AM by Ackerly Xu
Mar 10, 2019 03:24 PM|thepast|LINK
Mar 10, 2019 05:23 PM|mgebhard|LINK
Hi i have sql server express and mangament studio
i want simple batch to backup my database
i want name comes like this
and want my batch stored in D:\ driver
How can i do that
Pretty simple. Use osql or cmdsql to build a command line .bat file. Then schedule the task to run through Windows Task scheduler or the SQL agent.
Simply lookup bat command for naming files and working with dates. There are tons of online resources.
Mar 11, 2019 05:28 AM|Ackerly Xu|LINK
If you want to back up your database using ssms,you could right click the database in your ssms -> choose tasks -> choose generate scripts .
Then in the pop-up wizard, choose Choose Objects, click next , then you could choose where to export the script.
You could also specify the vision of your script (whether sqlserver2008 ,sqlserver2017...)
In the save script wizard, please click Advanced , choose script for server version , and then choose your remove server's version.
Or you could choose to backup when choosing task.
Mar 11, 2019 06:48 AM|thepast|LINK
not through ssms I want it batch file to schedule it automatic
Mar 11, 2019 07:24 AM|Ackerly Xu|LINK
I'm sorry , I misunderstood what you mean.
Just as mgebhard has said , you should use .bat and windows task schedule.
For how to use taskschedule, you could refer to
About how to write the backup t-sql, please refer to
You could also refer to the link below