Red Gate forums :: View topic - Results of execution logged?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager 6
SQL Packager 6 forum

Results of execution logged?

Search in SQL Packager 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
tspeich



Joined: 04 May 2010
Posts: 10

PostPosted: Wed Oct 27, 2010 8:50 pm    Post subject: Results of execution logged? Reply with quote

Hello,
I have packaged exe's that upgrade customer databases. The exe will run automatically if a customer chooses to update their system. customers are free to run them as they see fit. My question: Are the results of running the .exe logged anywhere on the machine where the exe is run?
Or are these results something I will need to capture myself?
Back to top
View user's profile Send private message
Chris Auckland



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

PostPosted: Mon Nov 01, 2010 3:23 pm    Post subject: Reply with quote

If you're running the .exe from the command line, you can redirect what would be the console output to a file. i.e.

SQLPackager.exe >> E:\output.txt
_________________
Chris
Back to top
View user's profile Send private message Send e-mail
tspeich



Joined: 04 May 2010
Posts: 10

PostPosted: Mon Nov 01, 2010 3:34 pm    Post subject: Reply with quote

So the answer is no. I already know how to capture the results myself, but wanted to avoid the extra development time. An error log could be very usefull considering that a package that fails while altering database objects, leaves your database stuck in the middle. Or if the package could run the remaining batches. Its a huge mess to unfold in the event that a package like the ones I create fails.
Back to top
View user's profile Send private message
Chris Auckland



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

PostPosted: Thu Nov 04, 2010 12:07 pm    Post subject: Reply with quote

Thanks for your reply.

If a package fails, it will roll back to the start of the transaction, so it shouldn't leave your database in an inconsistent state. However, if the schema update succeeds but the data update fails, then it will only roll back to the start of the date update.

If you want the package to continue to execute when an error is encountered, then there are options you can set.

for the schema, set the schema option:
Do Not use transactions in synchronization script

for the data, use the data option:
DontUseTransactions

However, this could lead to your database being left in an inconsistent state.
_________________
Chris
Back to top
View user's profile Send private message Send e-mail
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