Red Gate forums :: View topic - Deployment script ordering of objects
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Schema Compare for Oracle
Schema Compare for Oracle forum

Deployment script ordering of objects

Search in Schema Compare for Oracle forum
Post new topic   Reply to topic
Jump to:  
Author Message
brendan_t



Joined: 29 Jan 2014
Posts: 3
Location: Sydney

PostPosted: Wed Jan 29, 2014 4:45 am    Post subject: Deployment script ordering of objects Reply with quote

Hi

When generating a deployment script after doing a schema comparison, the ordering of the objects that are being created/modified isn't always consistent. That makes it difficult when using a text comparison tool to identify incremental differences between deployment scripts.

It would be nice if given the same set of differences, we could expect to get the exact result in a deployment script. This doesn't seem to be the case at the moment. Is there a setting I am missing, or any way to ensure objects appear in the same order in separate comparisons?

Thanks
Brendan
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 757
Location: Red Gate Software Ltd.

PostPosted: Thu Jan 30, 2014 4:30 pm    Post subject: Reply with quote

Thanks for your post.

Is the script that's being generated in a different order still functionally correct, or does are the scripts invalid every so often?
_________________
Chris
Back to top
View user's profile Send private message Send e-mail
brendan_t



Joined: 29 Jan 2014
Posts: 3
Location: Sydney

PostPosted: Thu Jan 30, 2014 11:24 pm    Post subject: Reply with quote

Hi Chris, thanks for your reply

The script is still functionally correct and can be executed successfully. Its more of a source control traceability issue. Unfortunately we do not have personal databases dedicated to a certain project or piece of work, so when we produce schema comparisons, we often only want to include a subset of the changes in the deployment script. Being able to then compare the deployment script with a previous deployment to ensure we have only captured the changes we want is important. It makes it difficult when objects appear in different parts of the script and are identified as differences by text comparison tools.

I assume there is a degree of ordering implemented to ensure dependencies are applied in the correct order etc. Apart from that, the ordering seems arbitrary as sometimes it is the same as previously, but not always. I thought it might be simple enough to add additional ordering criteria to ensure a specific order is retained each time.

cheers
Brendan
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 924
Location: Red Gate Software

PostPosted: Wed Feb 19, 2014 2:46 pm    Post subject: Reply with quote

Hi Brendan

I have further explanation from a colleague in the Development Team.

The order that objects in the deployment script appear can be dependent on the order that the database gave them to us in the first place. So when Schema Compare for Oracle queries the system tables, the objects are listed in whatever order the database decides to pass us the information to Schema Compare. That order can change as the database manages its system tables.

When creating the Deployment Script, the dependency order is the most important criteria. The fact that Table_B gets created before Table_A but on the next occasion you create a deployment script, Table_A is created before Table_B is immaterial, it is the dependency order that is important and that the deployment script or when run is successful.

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
brendan_t



Joined: 29 Jan 2014
Posts: 3
Location: Sydney

PostPosted: Wed Feb 19, 2014 11:51 pm    Post subject: Reply with quote

Hi Eddie

Yes I understand, and I suspected that is what was occurring. Perhaps you could consider adding extra ordering criteria to the system table queries for future releases? That would improve the usefulness of this tool a great deal in my case, and hopefully for others too.

Thanks for the response
Brendan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group