Unable to create deploy the db package to other db
ganesh.mulimani
Posts: 28
I am able to create and deploy application package. I can able to create the Database package but i am failing to deploy the package from one Database to another Database. My DB servers are on different machine.
i am getting the below error.
2014-04-29 07:35:27 -04:00 ERROR Error while executing job: Dynamic deployment failed
2014-04-29 07:35:27 -04:00 ERROR User does not have permission to perform this action.
2014-04-29 07:35:27 -04:00 ERROR RedGate.Deploy.SqlServerDbPackage.Shared.Exceptions.InvalidSqlException: Dynamic deployment failed
2014-04-29 07:35:27 -04:00 ERROR User does not have permission to perform this action. ---> System.Data.SqlClient.SqlException: User does not have permission to perform this action.
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Shared.SQL.ExecutionBlock.BlockExecutor.ExecuteBlock(ExecutionBlock block, IDbConnection connection)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Shared.SQL.ExecutionBlock.BlockExecutor.ExecuteBlock(ExecutionBlock block, String server, String database, Boolean integratedSecurity, String userName, String password)
2014-04-29 07:35:27 -04:00 ERROR at #3B7c.#dp4c.#u3.<Execute>b__0()
2014-04-29 07:35:27 -04:00 ERROR at #0z7c.#bdE.#u3.#wp4c()
2014-04-29 07:35:27 -04:00 ERROR at #0z7c.#bdE.#up4c[#NrPb](Func`1 #kMk)
2014-04-29 07:35:27 -04:00 ERROR --- End of inner exception stack trace ---
2014-04-29 07:35:27 -04:00 ERROR at ##.#mj5c(IDeployLog , String , String , Action )
2014-04-29 07:35:27 -04:00 ERROR at ##.#1Gfd(#R21c )
2014-04-29 07:35:27 -04:00 ERROR at ##.#iz3c(#Ty3c , String , String , #FG3c , #8gL , IDeployLog )
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.SqlServerDbPackage.AgentPlugin.DbPackageConvention.Apply(IConventionContext context)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.Conventions.ConventionRunner.<>c__DisplayClassf.<ApplyConventions>b__e(IConvention convention)
2014-04-29 07:35:27 -04:00 ERROR at System.Collections.Generic.List`1.ForEach(Action`1 action)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.Conventions.ConventionRunner.ApplyConventions(IConventionContext context)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.DeploymentController.Execute(PackageMetadata package, IVariableDictionary variables, IFolderTracker folderTracker)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.DeployPackageJobExecutor.Execute(DeployPackageJob job)
2014-04-29 07:35:27 -04:00 ERROR at CallSite.Target(Closure , CallSite , Object , Object )
2014-04-29 07:35:27 -04:00 ERROR at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Services.Jobs.JobRunner.ExecuteJob(IJob job, String& errorMessage, ILogScope additionalLogTarget)
2014-04-29 07:35:27 -04:00 ERROR Command RedGate.Deploy.Agent.Commands.SingleShotDeploymentCommand failed
2014-04-29 07:35:27 -04:00 ERROR RedGate.Deploy.Shared.Startup.CommandException: Dynamic deployment failed
2014-04-29 07:35:27 -04:00 ERROR User does not have permission to perform this action.
2014-04-29 07:35:27 -04:00 ERROR
2014-04-29 07:35:27 -04:00 ERROR Server stack trace:
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Commands.SingleShotDeploymentCommand.ExecuteInner()
2014-04-29 07:35:27 -04:00 ERROR at System.Threading.Tasks.Task.InnerInvoke()
2014-04-29 07:35:27 -04:00 ERROR at System.Threading.Tasks.Task.Execute()
2014-04-29 07:35:27 -04:00 ERROR
2014-04-29 07:35:27 -04:00 ERROR Exception rethrown at [0]:
2014-04-29 07:35:27 -04:00 ERROR at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2014-04-29 07:35:27 -04:00 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Shared.Startup.CommandProcessor.<ProcessAsync>d__4.MoveNext()
i am getting the below error.
2014-04-29 07:35:27 -04:00 ERROR Error while executing job: Dynamic deployment failed
2014-04-29 07:35:27 -04:00 ERROR User does not have permission to perform this action.
2014-04-29 07:35:27 -04:00 ERROR RedGate.Deploy.SqlServerDbPackage.Shared.Exceptions.InvalidSqlException: Dynamic deployment failed
2014-04-29 07:35:27 -04:00 ERROR User does not have permission to perform this action. ---> System.Data.SqlClient.SqlException: User does not have permission to perform this action.
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
2014-04-29 07:35:27 -04:00 ERROR at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Shared.SQL.ExecutionBlock.BlockExecutor.ExecuteBlock(ExecutionBlock block, IDbConnection connection)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Shared.SQL.ExecutionBlock.BlockExecutor.ExecuteBlock(ExecutionBlock block, String server, String database, Boolean integratedSecurity, String userName, String password)
2014-04-29 07:35:27 -04:00 ERROR at #3B7c.#dp4c.#u3.<Execute>b__0()
2014-04-29 07:35:27 -04:00 ERROR at #0z7c.#bdE.#u3.#wp4c()
2014-04-29 07:35:27 -04:00 ERROR at #0z7c.#bdE.#up4c[#NrPb](Func`1 #kMk)
2014-04-29 07:35:27 -04:00 ERROR --- End of inner exception stack trace ---
2014-04-29 07:35:27 -04:00 ERROR at ##.#mj5c(IDeployLog , String , String , Action )
2014-04-29 07:35:27 -04:00 ERROR at ##.#1Gfd(#R21c )
2014-04-29 07:35:27 -04:00 ERROR at ##.#iz3c(#Ty3c , String , String , #FG3c , #8gL , IDeployLog )
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.SqlServerDbPackage.AgentPlugin.DbPackageConvention.Apply(IConventionContext context)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.Conventions.ConventionRunner.<>c__DisplayClassf.<ApplyConventions>b__e(IConvention convention)
2014-04-29 07:35:27 -04:00 ERROR at System.Collections.Generic.List`1.ForEach(Action`1 action)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.Conventions.ConventionRunner.ApplyConventions(IConventionContext context)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.DeploymentController.Execute(PackageMetadata package, IVariableDictionary variables, IFolderTracker folderTracker)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Deployment.DeployPackageJobExecutor.Execute(DeployPackageJob job)
2014-04-29 07:35:27 -04:00 ERROR at CallSite.Target(Closure , CallSite , Object , Object )
2014-04-29 07:35:27 -04:00 ERROR at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Services.Jobs.JobRunner.ExecuteJob(IJob job, String& errorMessage, ILogScope additionalLogTarget)
2014-04-29 07:35:27 -04:00 ERROR Command RedGate.Deploy.Agent.Commands.SingleShotDeploymentCommand failed
2014-04-29 07:35:27 -04:00 ERROR RedGate.Deploy.Shared.Startup.CommandException: Dynamic deployment failed
2014-04-29 07:35:27 -04:00 ERROR User does not have permission to perform this action.
2014-04-29 07:35:27 -04:00 ERROR
2014-04-29 07:35:27 -04:00 ERROR Server stack trace:
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Agent.Commands.SingleShotDeploymentCommand.ExecuteInner()
2014-04-29 07:35:27 -04:00 ERROR at System.Threading.Tasks.Task.InnerInvoke()
2014-04-29 07:35:27 -04:00 ERROR at System.Threading.Tasks.Task.Execute()
2014-04-29 07:35:27 -04:00 ERROR
2014-04-29 07:35:27 -04:00 ERROR Exception rethrown at [0]:
2014-04-29 07:35:27 -04:00 ERROR at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2014-04-29 07:35:27 -04:00 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
2014-04-29 07:35:27 -04:00 ERROR at RedGate.Deploy.Shared.Startup.CommandProcessor.<ProcessAsync>d__4.MoveNext()
Comments
This means that the user performing the deployment doesn't have the necessary permissions to modify the target database. In most deployment cases 'sa' permissions are required.
You configured the user credentials when you added the SQL Server target to Deployment Manager; if you chose 'SQL Server Authentication' then it will be the username/password combination you entered there, but if you chose 'Windows Authentication' then it will be the Deployment Manager server's machine account on the domain (i.e. MachineName$).
Please make sure that the relevant user account has the necessary permissions on the target SQL Server.
Redgate Software
I am waiting for the Database permissions.
Thanks,
Ganesh Mulimani