11 ธันวาคม 2552 15:44
I’m trying to use the SQL Azure Data Sync Tool for SQL Server.
When using the application it will come up with a message saying that an item already exists (a stored procedure). If I rename the item on the local server instance it will then say another item (yet again another stored procedure) already exists. It carry’s on doing this relentless of how many times I rename various stored procedures. Any ideas please?
Example message "SYNC PROVISIONING ERROR - There is already an object named 'Client_insert' in the database."
- ย้ายโดย Max Wang_Chinasoft 18 เมษายน 2554 22:13 Forum consolidation (From:SyncFx - Feedback [ReadOnly])
11 ธันวาคม 2552 18:24ผู้ดูแล
Apologies for the inconvenience. Essentially what you are running up against is a limitation of the Data Sync tool. Specifically, while the API that the tool is calling exposes the ability to skip database objects related to sync that already exist when provisioning, we did not take advantage of this feature in the Data Sync tool yet. Note that your feedback is highly appreciated and we will feed this into our planning process as an important way to improve the overall end to end experience. The ability to re-provision an existing database that has previously been enabled for sync in a graceful manner is critical. I can assist you with manually working around this issue but I need you to answer some questions first:
· Do you have the option to drop the SQL Azure database and start over?
· Has your existing on-premise database been provisioned? There would be a series pro procs and side tables created for each user table as well as a handful of additional tables (scope_info and scope_config).
Senior Program Manager
11 ธันวาคม 2552 18:27ผู้ดูแลHi John,
The error message is implying that the database is already provisioned for sync. What is your scenario?
* Provision the database for another scope
* Redo the the provisioning for the same scope.
If its the former then you would have to set options on the provisioning API's to tell it to skip recreating the tables/triggers/stored proces. For this you would need to call the API's directly from your code. Please refer to post http://blogs.msdn.com/mahjayar/archive/2009/11/18/sql-azure-data-sync-moving-schema-from-compact-database-to-sql-azure.aspx on how to use the API's directly from your code. To set options to skip creation ob objects your would need to call SetCreateXXXDefault(DbSyncCreationOption.Skip) where XXX is Procedures, Table, TrackingTable and Triggers. You would also need to call SetCreateProceduresForAdditionalScopeDefault(DbSyncCreationOption.Create) so that new enum procs are created for new scopes.
If its the latter then unfortunately there is no automated way of "unprovisioning" the server. Best solution is to drop the database and recreate it.
I know the solution of dropping the database is little extreme but we are working on making the experience a lot cleaner and intutive in the next release of the power pack.
Maheshwar Jayaraman - WCF -- http://blogs.msdn.com/dotnetremoting
- ทำเครื่องหมายเป็นคำตอบโดย Mahesh DudgikarMicrosoft, Owner 21 มกราคม 2553 20:33
11 ธันวาคม 2552 18:52ผู้ดูแล
Seems that Mahesh and I responded to your post at the same time:). I just spoke to mahesh and if you are not comfortable using the API, an easy way to work around this would be to drop the sync related triggers, procs and side tables. If your database is fairly complex, an alternative to this approach would be to use the DB Import/Export wizard to transfer all of the user data to another database and run the Data Sync utility against that database instead.
Hope this helps,
Senior Program Manager
14 ธันวาคม 2552 10:31Thanks for your replies - the database doesn't exist on azure and when it's come up with the message I've dropped the database it has created before each attempt to try again.
22 ธันวาคม 2552 7:05เจ้าของJohn,
So you are creating fresh databases on premise and on SQL Azure and still hitting these errors? Maybe if you explain your database, tables to sync, scopes etc, we maybe able to further help narrow down the issue.
This posting is provided AS IS with no warranties, and confers no rights