如何在 dbinit 中指定版本

How to specify the version in dbinit

在我的系统中,我在 16 和 17 的任何地方都安装了 sql,我需要在 17 的任何地方使用 sql 创建一个数据库,但是在 powershell 中使用 dbinit 命令时,它的默认值是 sql 仅限 16.0.0 的任何地方

我的命令是

$DBLocation = "E:After_Change123"

dbinit  $DBLocation       ---------> This Command is Working Fine But it creating DB in Sql AnyWhere 16

& 'C:\Program Files\SQL Anywhere 17\bin64\dbinit.exe' -dba xxx,yyyyyy $DBLocation

我的输出是

S C:\Windows\System32> $DBLocation = "E:After_Change"  
& 'C:\Program Files\SQL Anywhere 17\bin64\dbinit.exe' -dba dba,sql123 $DBLocation

SQL Anywhere Initialization Utility Version 17.0.0.1358
Usage: dbinit [options] -dba <uid>,<pwd> database
@<data> expands <data> from environment variable <data> or file <data>

Options (use specified case, as shown):
   -a             accent sensitivity on all UCA string comparisons
   -af            accent sensitivity (French rules) on all
                  UCA string comparisons
   -b             blank padding of strings for comparisons
   -c             case sensitivity on all string comparisons

我想在 Sql 任何地方创建数据库 17.0.0 版本如何做到这一点帮助我

提前致谢

您可以指定整个路径。例如使用:

"%SQLANY16%\Bin64\dbinit" -dba xxx,yyyyyy $DBLocation

创建版本 16 数据库。

有关其他选项,请参阅 this 手册页。