Mike C288452

Hi, I'm still a relative newbie, so I could be doing something wrong. I do a schema compare between my DB project (source) and a production database(target). I skip all changes except updates I made to 2 procedures. I do an "Export to editor"

I expect to see only drop and recreate staments for the 2 procs I changed. Only I'm seeing a bunch of DROP CONSTRIANT statements as well (foreign keys and primary key) Like I said, I selected 'skip' for "update action", that includes all the tables. Also, the constraints being dropped still exist in my project and there we have no intention of removing them. I'm sure I can pull out just the stored proc changes, but the DROP CONSTRAINS statments being generated are a little unsettling, and I'm sure will be a source of confusion to our developers when we role DB PRO out next week. Please let me know if I'm doing something wrong.



Re: Visual Studio Team System - Database Professionals Mysterious drop constratints in my schema compare

StevenPo - MSFT

Mike -

On the surface, it sounds like you are doing the right thing. And hey, DBpro is pretty new, so we are all newbies at this point Smile. Has the production database been changed since you created the database project It is odd that you're seeing drop statements for objects that you skipped. Let me ping one of the schema compare experts and see if they have any thoughts.






Re: Visual Studio Team System - Database Professionals Mysterious drop constratints in my schema compare

Chuck Weininger - MSFT

There are circumstances that cause schema compare to drop and then re-add the constraints. Hopefully if you are seeing drop statements, there are also add statements at the end of the script.

But from what you are saying, it doesn't appear that the constraints should need to be dropped and re-added. Would it be possible for you to send me the update script that gets created when you ask schema compare to generate a script for updated the two procs You can send it to this address: cweining at microsoft dot com. Hopefully the script will provide some clues as to what schema compare is doing.






Re: Visual Studio Team System - Database Professionals Mysterious drop constratints in my schema compare

Chuck Weininger - MSFT

Are you still having this issue I hope I didn't miss your email if you tried to send something to me.




Re: Visual Studio Team System - Database Professionals Mysterious drop constratints in my schema compare

Mike C

I should have gotten back ssoner but I'm not able to recreate since the database schemas have changed since I reported this.

Thanks for your help,