Showing posts with label task. Show all posts
Showing posts with label task. Show all posts

Wednesday, March 21, 2012

MaximumErrorCount

HI All,

I've created a main package the performs certain task and executes Execute package task. The package succeded on the Dev't studio when I test it, but failed on the SQL Agent.

I checked the logging of the Package that was called by the main package and I found no error/warning.

I didn't find any error on the logging of the main package but a warning was provided. Below is the warning message:

EventClass: Description: Warning The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

Any insight will be greatly appreciated.
Thanks,
LarryThere is a control flow item level setting (in the Properties window) called MaximumErrorCount that defaults to 1. You could probably increase this property value to 4 or 5 (as the number of errors in your case is 3). This change in setting would help you view the actual errors encountered in your package execution.

Monday, February 20, 2012

Max value of column in DB

Hey everyone!
Ok, I'm not exactly sure this is an easy task so I hope im posting this in the right area.
What I have is a column in my SQL Server database that is just an ID number.
I had previously used Access and being SQL Server noob, I had no idea if it had a property type like Access' "AutoNumber". I just made it an integer
What I want to do though now, is assign ID's automatically to each new record by making it 1 above the most recently added one. There are two ways I've thought I can be helped:
1) Is there code to find the maximum value of a column in a database, return the value, and then add 1 to it?
or
2.) Can someone give me information about how I could use a feature like Access' AutoNumber in SQL Server?
THANKS GUYS FOR ALL YOUR HELP!In SQL server, you can make the column data type as integer and set identity = yes, identity Seed = 1 and identity Increment = 1 in Columns tab.|||IDENTITY in SQL Server is a property like Access Autonumber. Run a search for IDENTITY and IDENTITY Scope, IDENT_SEED, IDENT_INCR and SET IDENTITY_INSERT option and System varaible IDENTITYCOL in the BOL(books online) to get started. Hope this helps.|||

Worked out perfect, exactly what I was looking for!

Thanks a ton guys!