Error while Generating Scripts folder-item key already added
austin183
Posts: 2
I have tried to Generate a Scripts folder from a database directly, and I get the error "An item with the same key has already been added".
So I tried to create a snapshot from the database instead, and that worked. Then I tried to generate a Scripts folder from the snapshot, and I received the same error.
Then I tried creating a Snapshot using the "Treat items as case sensitive" option. That worked, so I tried to generate the scripts from that snapshot. Same Error.
Then I tried to compare my snapshot to the database. It returned 145 identical objects, and it showed me the Creation scripts in comparison format. However, I would have to manually copy all the creation scripts by hand into my folder at this point.
So two things:
1. Why would I receive the error when generating scripts but not when doing a comparison?
2. Why can I not mass export scripts from the Comparison screen to a folder?
Aside from this issue, I really like this tool. Thank you for writing awesome software products like SQL Compare!
PS: I am on version 9.0.0.79, and my database resides on a SQL Server 2008 v 10.0.1600 instance.
So I tried to create a snapshot from the database instead, and that worked. Then I tried to generate a Scripts folder from the snapshot, and I received the same error.
Then I tried creating a Snapshot using the "Treat items as case sensitive" option. That worked, so I tried to generate the scripts from that snapshot. Same Error.
Then I tried to compare my snapshot to the database. It returned 145 identical objects, and it showed me the Creation scripts in comparison format. However, I would have to manually copy all the creation scripts by hand into my folder at this point.
So two things:
1. Why would I receive the error when generating scripts but not when doing a comparison?
2. Why can I not mass export scripts from the Comparison screen to a folder?
Aside from this issue, I really like this tool. Thank you for writing awesome software products like SQL Compare!
PS: I am on version 9.0.0.79, and my database resides on a SQL Server 2008 v 10.0.1600 instance.
Comments
It is also possible to synchronize to an empty scripts folder but if you just want to script only the differences between databases you can do the comparison, and open the synchronization in SQL Server Management Studio, or use the option to save a copy of the script.
e.g Ix_index.SQL and Ix_Index_1.sql both creates same index IX_Index