WiX在远程数据库上执行SqlScript的问题 [英] WiX issue with executing SqlScript at the remote DB

查看:78
本文介绍了WiX在远程数据库上执行SqlScript的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

在远程数据库上执行SqlScript会导致错误:

无法连接到SQL数据库. (-2147467259 myDB1)

SqlScript如下:

Hi there,

Executing SqlScript at the remote DB causes an error:

Failed to connect to SQL database. (-2147467259 myDB1)

The SqlScript is the following:

<sql:SqlString 
Id=''UpdateSomething1'' 
SqlDb=''myDB1'' 
ExecuteOnInstall=''yes'' 
User=''SQLUser''
ContinueOnError=''no'' 
ExecuteOnReinstall=''no'' 
ExecuteOnUninstall=''no'' 
Sequence=''26''
SQL=''[SqlString]''/>



Db在哪里:



where the Db is:

<sql:SqlDatabase 
Id=''myDB1'' 
Database=''myDB1'' 
Server=''[DATABASE_SERVER]'' 
CreateOnInstall=''yes'' 
DropOnInstall=''no'' 
DropOnUninstall=''no'' 
ContinueOnError=''no''/>



而用户是:



and the user is:

<util:User 
Id="SQLUser" 
Name="myUserName1" 
Password="password1"/>


本地数据库不会发生此问题.我们从IP流量(远程MSSQL服务器抛出的实际错误)中提取了更具体的错误消息:

无法打开登录请求的数据库"myDb1".登录失败. <远程机器名称>用户<用户名>
登录失败
感谢您的帮助和信息.

Max


The problem does not occur with the local DB. We extracted more specific error message from the IP traffic (the actual error that the remote MSSQL server throws):

Can not open database "myDb1" requested by the login. The login failed. <remote machine name> Login failed for user <user name>

Thank you for any help and information.

Max

推荐答案

这周自己打.

msiexec.exe(Windows安装程序进程)作为本地系统帐户(SYSTEM)运行.通常,SYSTEM没有网络访问权限(您的远程数据库).

您必须对自定义操作和计划进行一些安排,才能使sql脚本在具有网络访问权限的Windows帐户(通常是启动安装程序的用户帐户)下运行.
Hit this myself this week.

msiexec.exe (the windows installer process) runs as the localsystem account (SYSTEM). Typically SYSTEM does not have network access (your remote db).

You''ll have to do some work with custom actions and scheduling to get your sql scripts to run under a windows account that has network access (typically the user account that launched the installer)


这篇关于WiX在远程数据库上执行SqlScript的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆