Author |
Topic  |
|
sean
 16 Posts |
Posted - 02/11/2009 : 10:22:22
|
We have a set of scripts which perform various validation tasks on a built database. If the script is within the "Static Data" build area, results are written to the Report file, if they are in any other directory, including the "Custom Script" directories the Report file appears not to capture any details.
Is there an option somewhere which dictates whether results are written to the Report file?
We are using version 5.0.939 of change manager.
Below are a couple of lines from the Report file, and the contents of the file being run -
11/02/2009 16:13:34...Executing file 10 of 10 files - E:\DatabaseBuildArea\.....\003run-tests.sql 11/02/2009 16:13:34...table checks completed without error 11/02/2009 16:13:37...Executing file 1 of 1 files - E:\DatabaseBuildArea\.....\003run-tests.sql
DB Ghost Database Builder - process complete
file 003run-tests.sql, consists of -
declare @retcode tinyint exec @retcode = dbo.TestStandardColumns if @retcode = 1 print 'table checks completed without error' else print 'ERROR : !!! Table Checks failed.'
Thanks for you advice, Sean
|
|
Google AdSense
USA
Mountain View |
|
Mark Baekdal

88 Posts |
Posted - 02/11/2009 : 10:43:40
|
ah, the print statements are captured in the static data section and written to the UI and log as they are related to the scripter. When the scripter scripts out data it adds print statements to show progress - which is especially important for larger files. No other section gathers these statements.
If you want to raise an error - why not use the RAISERROR statement?
By the way the change manager has had many enhancements since 939 - it's currently at build 969.
regards, Mark Baekdal You must be logged in to see this link. You must be logged in to see this link. Take control of your SQL Server code.
|
 |
|
sean

16 Posts |
Posted - 02/12/2009 : 01:12:24
|
Mark,
What are the changes in Change Manager?
The members area has a "Version History" link, but this was last updated in September....am I looking in the wrong area for release notes?
thanks, Sean |
 |
|
Mark Baekdal

88 Posts |
|
sean

16 Posts |
Posted - 02/12/2009 : 02:01:06
|
Thanks Mark,
When using RAISERROR, the value assigned to SEVERITY appears to dictate what is captured by the build Report, for instance - A value of 15, reports a plain text message plus Error Number, State, Level etc A value of 18, reports just a plain text message. In both cases Change Manager reports these as Errors. This behaviour appears to mirror SQL's, in that Severity 11-16 are for normal use, >16 are system errors, and those less than 11 are warnings. If I try a Severity of 5, no message is captured by Change Manager, I was sort of hoping this might be treated as a Warning, is there a work around I can use to get warnings added to the Report file?
I'm currently running this build agaisnt a SQL2000 db. |
 |
|
Mark Baekdal

88 Posts |
Posted - 02/12/2009 : 02:42:02
|
I can't think of a work-around. However depending on what you are trying to achieve you may have an option. If you want the process to continue and the errors are stopping your process there is an option "Continue even if errors are found when building the database" - that way you could raise the error and it'll go into the log and continue...
regards, Mark Baekdal You must be logged in to see this link. You must be logged in to see this link. Take control of your SQL Server code.
|
 |
|
|
Topic  |
|
|
|