Is it possible to get SQL string generated from clicking through UI commands in SQL Server Management Studio?

0

Ok, so SQL Server Management Studio (SSMS) lets me backup and restore SQL databases, which is pretty awesome an application QA Tester. It allows me to test different starting configurations without having to actually set up those starting configurations.

I am incredibly lazy and would like to write a script to do the backup/restore process instead of clicking through the SSMS UI. The fastest most accurate way I can think to do this is just pull the generated SQL command from SSMS after clicking through it to perform my backup/restore options. Is it possible to generate a SQL command through the UI Actions I perform in SSMS?

Sidney

Posted 2015-09-21T15:13:55.583

Reputation: 1 035

Answers

0

1) To do an automatic backup, you don't use SQL commands, but can use the SQL Command line features. This process has been described very well at this post: https://stackoverflow.com/questions/880487/sql-server-command-line-backup-statement

2) You can also download a free tool from sqlbackupandftp.com that makes backup automation so easy. It even can backup directly into your dropbox account and send emails if the backup fails. I am not affiliated with this company but I highly recommend this product for every SQL server installation.

ideaztech

Posted 2015-09-21T15:13:55.583

Reputation: 81