NServiceBus安装程序无法创建表

时间:2016-03-08 14:09:49

标签: nservicebus

我使用以下类似的命令安装了5个服务:

/install /serviceName:"ADS-CI-DQC.UKHO.SIP.OrderFulfilment.ServiceBus.Enp.Holdings" /displayName:"ADS-CI-DQC.UKHO.SIP.OrderFulfilment.ServiceBus.Enp.Holdings" /description:"Orderfulfilment Holdings service" /endpointConfigurationType:"UKHO.SIP.OrderFulfilment.ServiceBus.Enp.Holdings.Program, UKHO.SIP.OrderFulfilment.ServiceBus.Enp.Holdings" /username:"username" /password:"password"

四项服务和一项传奇。这些服务都不会启动,但是传奇服务已启动并运行。 Saga不需要endpointconfigurationtype参数,但如果没有它,则不会安装任何其他服务。在每个上面都有一条错误消息:

Failed to execute installers: System.Data.SqlClient.SqlException (0x80131904): A
n object or column name is missing or empty. For SELECT INTO statements, verify
each column has a name. For other statements, look for empty alias names. Aliase
s defined as "" or [] are not allowed. Change the alias to a valid name.
An object or column name is missing or empty. For SELECT INTO statements, verify
 each column has a name. For other statements, look for empty alias names. Alias
es defined as "" or [] are not allowed. Change the alias to a valid name.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
 cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName,
Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSou
rce`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean
asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at NServiceBus.Transports.SQLServer.SqlServerQueueCreator.CreateQueueIfNecess
ary(Address address, String account) in c:\BuildAgent\work\888dd942b44bad5a\src\
NServiceBus.SqlServer\SqlServerQueueCreator.cs:line 39
   at NServiceBus.Satellites.SatellitesQueuesCreator.Install(String identity, Co
nfigure config) in c:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Sate
llites\SatellitesQueuesCreator.cs:line 30
   at NServiceBus.Features.InstallationSupport.Starter.Run(Configure config) in
c:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Installation\Installati
onSupport.cs:line 75
   at NServiceBus.Configure.Initialize() in c:\BuildAgent\work\3206e2123f54fce4\
src\NServiceBus.Core\Configure.cs:line 125
   at NServiceBus.GenericHost.PerformConfiguration(Action`1 moreConfiguration)
   at NServiceBus.GenericHost.Install(String username)
   at NServiceBus.Hosting.Windows.Installers.WindowsInstaller.RunInstall()
ClientConnectionId:0d592dd2-ce34-4b31-9b94-e53f776e1264
Error Number:1038,State:4,Class:15

我发现我的用户名可能有错,因为它中有.co.uk但是同一个用户用于Saga并创建了表格。我使用的是outbox = true,我已经关闭了MSDTC服务。我使用的是NServiceBus Host.exe的6.0版本,我认为它包含了对发件箱表的修复。这与安装后丢失消息有关,所以我认为不相关。

我可以通过复制现有结构手动创建表,但我想解决这个问题。

1 个答案:

答案 0 :(得分:0)

我发现了这个问题,最后很简单。我在五个配置文件中的四个中从DefaultTransportSchema="dbo" DefaultPersistenceSchema="dbo"标记中遗漏了<NServiceBusConfig>。添加它们可以使安装正常工作