msdeploy using provider dbsqlFull to sync sql server database
I am trying to use msdeploy to sync two database from different machines.
The command I am using: msdeploy.exe -verb:sync -source:dbFullSql="Data
Source=AMachine;Initial Catalog=RegGate;User ID=sa;Password=aaa@123"
-dest:dbFullSql="Data Source=BMachine;Initial Catalog=WebDeployTest;User
ID=sa;Password=bbb@123" -verbose
The first time it runs successfully and the two database gets synced. When
I try to run the same command second time, after making some changes to
first database, I get the following error.
Verbose: Performing synchronization pass #1. Verbose: No backup was
executed. Info: Adding database (MSDeploy.dbFullSql/dbFullSql[@path='data
source=BMachine;initial catalog=WebDeployTest;user id=sa']/sqlScript)
Verbose: Getting stream data for 'sqlScript'
('MSDeploy.dbFullSql/dbFullSql[@path='data source=AMachine;initial
catalog=RegGate;user id=sa']/sqlScript'). Info: Opening SQL Connection
with connection string 'data source=BMachine;initial
catalog=WebDeployTest;user id=sa; pooling=False'. The 'transacted' setting
for this connection is 'True'. Verbose: Executing lines 1 to 3 of the
script: Verbose: Executing lines 3 to 5 of the script: Error Code:
ERROR_SQL_EXECUTION_FAILURE More Information: An error occurred during
execution of the database script. The error occurred between the following
li nes of the script: "3" and "5". The verbose log might have more
information about the error. The command started with th e following:
"CREATE SCHEMA [RegGate] AUTHORIZATION [dbo]" There is already an object
named 'RegGate' in the database. CREATE SCHEMA failed due to previous
errors. http://go.microsoft.com/fwlink/?LinkId=178587 Learn more at:
http://go.mic
rosoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE. Error: There
is already an object named 'RegGate' in the database. CREATE SCHEMA failed
due to previous errors. Error count: 1.
Please help me.
No comments:
Post a Comment