Sqlcmd:错误:SQL Server的Microsoft ODBC驱动程序13

时间:2019-04-26 18:39:12

标签: sql cmd sqlcmd

我使用此文件运行.bat文件以在sql中运行脚本,从而在resultado文件中生成清单,但返回以下消息:

  

Sqlcmd:错误:SQL Server的Microsoft ODBC驱动程序13:登录用户'sa'失败。

@echo off
SET sql_username=sa
SET sql_password=123456
SET instancia=SQLEXPRESS

copy C:\checklist_sql\lib\cabecalho_css.txt  C:\checklist_sql\resultado\resultado.html

SQLCMD -S LOCALHOST\%instancia%  -U %sql_username% -P (%sql_password%)  -i C:\checklist_totvs_sql\lib\checklist.sql -o C:\checklist_sql\resultado\temp.txt

type C:\checklist_sql\resultado\temp.txt>>C:\checklist_sql\resultado\resultado.html

type  C:\checklist_sql\lib\rodape.txt>>C:\checklist_sql\resultado\resultado.html

0 个答案:

没有答案