我试图通过脚本安装一个示例DB。我试过酒吧、北风和现在的冒险作品。我犯了很多错误。我在这里发帖是因为我相信我做错了什么。假设冒险性工程的安装脚本已经正确地编写好了脚本,但是我仍然收到了很多错误消息,比如
> Msg 102, Level 15, State 1, Line 39
Incorrect syntax near ':'.
Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64)
Aug 22 2017 17:04:49
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Windows 10 Home 10.0 (Build 17134: )
Started - 2018-07-07 15:15:49.647
*** Dropping Database
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '.
*** Creating Database
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '.发布于 2018-07-07 13:30:36
它看起来像是从SSMS窗口运行脚本,其中包含SQLCMD变量。从查询菜单( Query -> SQLCMD模式)启用SQLCMD模式。在运行脚本之前,确保按需要设置SQLCMD变量值。
https://dba.stackexchange.com/questions/211607
复制相似问题