Creadting Data Scripts for Unnessary Tables
dineshasanka
Posts: 208
Hi,
When I want to create data script for one table, it creates script for more than one table. I assure that I selected only one table
When I want to create data script for one table, it creates script for more than one table. I assure that I selected only one table
Comments
SQL Packager and Data Compare have a known issue where they may drop triggers and foreign keys that are on all tables, even the ones you've chosen not to synchronize.
Also, please make sure you are using version 5.1. There was a bug fixed that existed in 5.0 where tables would have their data scripted as part of an upgrade package even when the tables weren't chosen.
I checked from the check Update option in the tool. it says my version is uptodate.
in addition to what Brian said, if your table depends on other objects, these objects will be scripted aswell. Say, if your table has a foreign key to another table, that table will also be scripted to ensure database integrity. To avoid this behaviour you have to untick the 'Include dependencies' option on the Schema options tab.
Let me know if that helps.
Tilman
in that case, do you think you could send us the schema of your database? With the UI you can take a schema snapshot (Tools>Create database snapshot) which shouldn't be too big. If you could send that to support@red-gate.com that would be great. We have had someone with a similar problem but couldn't reproduce it, so far.
Regards,
Tilman
you are right, of course, you can't take snapshots with SQLPackager. I was talking about SQLCompare. Sorry about that, my mistake.
I think David has gotten into contact with you already, so I wont say anymore here.
Regards,
Tilman
1) In the "choose the tables whose schema will be packaged" I deselected a table.
2) The next screen allowed me to choose data to be packaged. However since i didnt want the schema for this table it didnt make it to this list, but when reviewing the scripts it would be in the data part.
3) I had to go back to the schema page, include the table i didnt want, move forward to the data page, uncheck it (since it was now visible), and then go back to the schema page and uncheck it.
Seems to me that if you dont select something in the schema page it should automatically deselect in the data page, not the other way around.
thanks for posting. I'm afraid I couldn't reproduce your problem with version 5.2 of the packager. Could it be that you were using a previous version?
Regards,
Tilman
this issue is fixed in newest version. great