如何从 Advantage SQL 脚本创建批处理文件?

How do I create a batch file from Advantage SQL script?

我在 Sybase 的 Advantage Data Architect 中使用 SQL 实用程序创建了 sql 脚本。该脚本保存在我的工作站上。现在,我如何创建一个批处理文件来 运行 来自桌面的脚本?

我在网上找到这个命令行,但它似乎不起作用:

@echo on

isql -U "username" -P "password" -S "servername" -D "database" -i "path"

@echo off

我是 Advantage SQL 的新手,正在尝试尽可能多地学习。

谢谢。

您使用adssqlcmd.exe, passing the connection and script name as command-line parameters。在第二页上有一个这样做的例子:

rem Using the connection path option, and process the script files 
rem after making the connection.
rem The program will terminate after processing all files
asqlcmd.exe -S ALS:d:\mydata\main.add -U user1 -P sample -i myscript.sql

还有一个 list of supported commands 概述了您在脚本中可以做什么和不能做什么。

另请注意,adssqlcmd.exe 是 ADS v11 中添加的一项功能,不适用于早期版本的 ADS。