0

私は走っています

C:\Dev\Migrate> MSBuild.exe .\build.proj /t:Migrate

fluentmigrateプロジェクト の powershell から

そして、次のエラーが発生します:

!!! An error occured executing the following sql:
CREATE TABLE [dbo].[VersionInfo] ([Version] BIGINT NOT NULL)
The error was CREATE TABLE permission denied in database 'H2H'.

これがbuild.projです

<?xml version="1.0"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
         DefaultTargets="Migrate" ToolsVersion="4.0">

  <PropertyGroup>
    <MigratorTasksDirectory>$(MSBuildProjectDirectory)\..\EqulibriumMarkets\packages\FluentMigrator.Tools.1.1.2.1\tools\AnyCPU\40\</MigratorTasksDirectory>
    <MainProjectDirectory>$(MSBuildProjectDirectory)</MainProjectDirectory>
      <ConnectionString>******************************</ConnectionString>
  </PropertyGroup>

  <UsingTask
      TaskName="FluentMigrator.MSBuild.Migrate"  AssemblyFile="$(MigratorTasksDirectory)FluentMigrator.MSBuild.dll" />

  <Target Name="Migrate">
    <Message Text="Starting FluentMigrator migration" />

    <!-- Important: Target must be your Migrations assembly name, not your dll file name -->
    <Migrate Database="SqlServer2012"
             Connection="$(ConnectionString)"
             Target="$(MSBuildProjectDirectory)/bin/debug/EQ.DbMigration.dll" />
  </Target>
</Project>

接続文字列のユーザーの詳細からアクセス許可を取得する必要はありませんか? データベースの所有者として接続していますか?

4

1 に答える 1

0

接続文字列のユーザーの詳細からアクセス許可を取得する必要はありませんか? データベースの所有者として接続していますか?

確認するには、アプリケーション イベント ログで、これが発生した前後のエントリを確認してください。イベント エントリには、許可を拒否されているユーザー名も含まれている必要があります。

于 2014-02-14T15:49:20.857 に答える