Calling .SQL Scripts
aarons44
Posts: 32
Can I call .SQL scripts from the command line? I don't see the syntax anywhere. I'm replacing a batch file that makes heavy use of SQLCMD to restore databases and run .sql scripts against them.
Comments
Sorry I am a little confused with your question.
Red Gate SQL Backup provides a comand line utility so you can perform back and restore operations in any SQL Script or batch files that you create.
The SQL Backup command line executable is call SQLBackupC. It is located in the folder in which you installed the SQL Backup Server Components, by default this is C:\Program Files\Red Gate\SQL Backup\<instance name>.
The SQL Backup command line interface uses a subset of the T-SQL Backup and Restore statements.
Further advice on using the SQL Backup Command Line Interface can be found in the SQL Backup Help file.
If I have understood your post correctly, the answer is no you cannot use the SQL Backup Command Line Interface to call other .SQL Scripts.
However you can include SQL Backup Command Line Interface into any .SQL Scripts that you create.
Eddie Davis
Red Gate Software Ltd
Technical Support Engineer
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com