Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

Tuesday, March 27, 2012

Derived Column Task failing with error 0xC0049067

I have a package that fails as soon as it hits the first Data Flow that contains a Derived Column task. The task takes three date columns and looks for a date of 6/6/2079. If it is there, it is replaced with a NULL. This task worked fine until I installed the Non-CTP version of SQL 2005 SP1, earlier today. (I went from RTM 9.0.1399 to SP1 9.0.2047)Does anyone have any ideas?

Here is the error I am trapping:

An error occurred while evaluating the function.

The "component "Update Max Date Value to NULL" (346)" failed because error code 0xC0049067 occurred, and the error row disposition on "input column "WeekEndingDate" (455)" specifies failure on error. An error occurred on the specified object of the specified component.

The ProcessInput method on component "Update Max Date Value to NULL" (346) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

Thread "WorkThread0" has exited with error code 0xC0209029.

I tried to configure the error output to ignore the failure. The task succeeded. It did not insert anything, however, for the three columns in question. It then failed on the next Data Flow that contained a Derived Column task. I tried to pre-populate the columns with a default date, but no go. Any help would be appreciated.

Nothing wrong with the concept and I can do a similar thing in SP1. What is your expression and column types?|||

The date columns come out of an Access database. I convert them to a string in a Data Conversion task and then validate that they are valid dates in a Script Component task. If they are invalid, I assign them a date of 6/6/2079. When they exit the Script task they are converted back to a date. The Derived Column task is next and it looks for the year 2079 to convert it to a NULL. Here is an example of one of the expressions:

YEAR([Check for Valid Dates].LastWorkedDate) == 2079 ? NULL(DT_DBTIMESTAMP) : [Check for Valid Dates].LastWorkedDate

This is where it fails. One thing I failed to mention before is that if I execute the task by itself it works properly. However, if I run the entire package (100+ tasks) it fails as soon as it hits the first task that contains a Derived Column task.

|||Turns out it is not the first Data Flow with a Derived Column task that is failing. I have one about 8 steps prior that runs just fine. I am wondering if it has something to do with the expression language. I saw a post where someone got the same error if they tried to use an expression language date function with a date value outside of SQL range (1/1/1753 to 12/31/9999). This post however was pre-SP1. I wonder whether that issue was addressed and if so how. Any suggestions from anyone would be greatly appreciated. I have been stuck on this for a couple of days and I really need to move on. I am dreading the thought of uninstalling\reinstalling SQL2000 and 2005 on my machine but will if I have to. Please help!!!!|||I uninstalled and reinstalled SQL 2005 and then attempted to run my package and it worked. There must be something that changed about the way it evaluates expressions in Derived Column tasks or maybe it is the expression language itself. Either way I am going to have to move on without SP1 until residual issues like these are dealt with. I am going to submit a bug to Microsoft about it. If anyone comes up with anything, please post a response.|||

I have been unable to reproduce this either on SQL Server 2005 RTM or SP1.

Could you perhaps hook up the error output of the derived column and redirect error rows, and then see what value(s) of LastWorkedDate it's failing on?

Thanks,
mark

|||I apologize for taking so long to get back to you. Unfortunately, I have already reinstalled SQL to RTM -SP1. I lost two days trying to troubleshoot the problem and had to give up for now. As soon as I have a chance I will reinstall SP1 and try again. For now however I have to live without it. Thank you very much for trying to reproduce the error. I will post more about this once I have the time.|||

DatabaseOgre wrote:

I saw a post where someone got the same error if they tried to use an expression language date function with a date value outside of SQL range (1/1/1753 to 12/31/9999). This post however was pre-SP1. I wonder whether that issue was addressed and if so how.

I suspect that what you suggested is indeed the problem. YEAR will fail if the date is outside of the SQL range.

If you have a chance to try redirecting rows to see if the values are indeed outside of that range, that would help us be sure that we have figured this one out. In the meantime, I will update the bug with this information.

|||

Sorry. I went back to the post and reade it a little slower this time. The post refers specifically to the DATEPART function with the YEAR argument. Here is a quote:

Can someone confirm this for me? The expression language in SSIS has the same limitations on date ranges as Sql Server? That limitation is that valid date ranges are from Jan 1, 1753 to Dec 31, 9999.

When ever I try to do a date function (DATEPART, for example) in a Derived Column Transformation on a date less than 1/1/1753, I get an error. I initially discovered this when bringing data over from Oracle to Sql Server. Just as a test, I created a text file filled with various dates and tried to import it. Whenever a date is less than 1/1/1753, it blows up.

For example, this expression code - DATEPART("YEAR",Date) will yield this error - [Derived Column [24]] Error: The "component "Derived Column" (24)" failed because error code 0xC0049067 occurred, and the error row disposition on "output column "YEAR" (80)" specifies failure on error. An error occurred on the specified object of the specified component.

As a workaround, I've been using a Script Component to do date checking, but this is obviously not ideal.

Jamie Thomson verified it for him and it was submitted as a bug for not being able to handle dates outside of the T-SQL date range. I checked my data to look for any dates that were outside of the range (pre-package) and did not find any. I also tried handling any such dates inside of a Script Task (as a just in case) which ran prior to the Derived Column Task and still received the error. When I get some time I will take a look at my source data again and see if there is anything there. I doubt it however because I am using the same package and same data source with SQL2005 RTM and I am not getting any errors. I probably wouldn't change much about the bug I submitted just yet.

|||

The value being out of range was my best guess for the cause of the error. If you know the values are all in range, then something else is wrong.

The best thing now, I think, would be for you to try redirecting the error rows and see what values are causing the problem. Once we know that, I will be able to try to reproduce the problem.

Thanks!
Mark

Sunday, March 25, 2012

Derived Column / Change date format

Hi,

Is there a way using a derived column transformation to change the format of the date eg:

The input flat file's date is in yyyy/mm/dd and i need to convert / change this to yyyy/dd/mm

Is this possible?

Thanks in advance,

Slash.

Substring and concatenation, perhaps?|||.. would work because it is not really a date is it? It is just a string. Worth bearing in mind since display of dates is really a client issue not a SSIS/Server issue, unless you are taking a string and converting to a date type. Then SSIS will use the "client" as in user account settings that the process runs under when interpreting the string.|||

The weird thing is that the original flat file date is all yyyy/mm/dd but when it comes to import into the database as datetime. It inconsistently changes the format of the date some dates appear correct and some appear as yyyy/dd/mm. Is there anyway to over come this / have you heard of anything like this before?

Thanks for the replies,

Slash.

|||

slash85 wrote:

The weird thing is that the original flat file date is all yyyy/mm/dd but when it comes to import into the database as datetime. It inconsistently changes the format of the date some dates appear correct and some appear as yyyy/dd/mm. Is there anyway to over come this / have you heard of anything like this before?

Thanks for the replies,

Slash.

The database isn't returning multiple formats once inserted... That is, when doing a select from a database table, you aren't seeing multiple formats in a datetime field. It's impossible. If the destination field is a character field, and you're converting to datetime before inserting, then perhaps you have some invalid dates that cannot convert.

To my knowledge, without converting to a string, and using the substring function, you will not be able to get the format you desire.

Derived Column - Date Conversions?!?

It was my understanding earlier that -- it is mandatory to have a Derived Column for a DATE String in a Flat File
to be loaded properly into a table with "datetime" column type

However, i tried running my package with the Input Column as "DT_STR" and the Destination on the table is DATETIME.

Looks like the process went on fine.. Am i missing something here?

My Date Format from the source looks like -- "DD-MON-YY"

Regards
As long as it is in a format the DB understands, going from DT_STR to DateTime is an implicit conversion. So it's converting as it is inserted.

Saturday, February 25, 2012

Deployement of integration services project

I am getting the following error when I test a Job in SQL Server 2005 :
Date,Source,Severity,Step ID,Server,Job Name,Step
Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator
Emailed,Operator Net sent,Operator Paged,Retries Attempted
05/07/2007 15:06:38,interdata,Error,0,KHEIREDDINE,interdata,( Job
outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
The last step to run was step 1 (inter).,00:00:02,0,0,,,,0
05/07/2007 15:06:38,interdata,Error,1,KHEIREDDINE,interdata,i nter,,Executed
as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
Microsoft Corp 1984-2005. All rights reserved. Started: 15:06:38 Error:
2007-05-07 15:06:39.90 Code: 0xC0047062 Source: Autres Tbles Excel
_secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
[Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
nom de pilote non spécifié X
System.Data.Odbc.OdbcConnection.HandleError(OdbcHa ndle hrHandle<c/> RetCode
retcode) X System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection
connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
environmentHandle) X
System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions
options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
DbConnection owningObject) X
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
owningConnection<c/> DbConnectionPoolGroup poolGroup) X System... The
package execution fa... The step failed.,00:00:02,0,0,,,,0
05/07/2007 15:04:58,interdata,Error,0,KHEIREDDINE,interdata,( Job
outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
The last step to run was step 1 (inter).,00:00:05,0,0,,,,0
05/07/2007 15:04:58,interdata,Error,1,KHEIREDDINE,interdata,i nter,,Executed
as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
Microsoft Corp 1984-2005. All rights reserved. Started: 15:05:00 Error:
2007-05-07 15:05:03.32 Code: 0xC0047062 Source: Autres Tbles Excel
_secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
[Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
nom de pilote non spécifié X
System.Data.Odbc.OdbcConnection.HandleError(OdbcHa ndle hrHandle<c/> RetCode
retcode) X System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection
connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
environmentHandle) X
System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions
options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
DbConnection owningObject) X
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
owningConnection<c/> DbConnectionPoolGroup poolGroup) X System... The
package execution fa... The step failed.,00:00:05,0,0,,,,0
Why am I getting this, and how do I resolve it?
Thanks
Hi
"malek_che" wrote:

> I am getting the following error when I test a Job in SQL Server 2005 :
> Date,Source,Severity,Step ID,Server,Job Name,Step
> Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator
> Emailed,Operator Net sent,Operator Paged,Retries Attempted
> 05/07/2007 15:06:38,interdata,Error,0,KHEIREDDINE,interdata,( Job
> outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
> The last step to run was step 1 (inter).,00:00:02,0,0,,,,0
> 05/07/2007 15:06:38,interdata,Error,1,KHEIREDDINE,interdata,i nter,,Executed
> as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
> Microsoft Corp 1984-2005. All rights reserved. Started: 15:06:38 Error:
> 2007-05-07 15:06:39.90 Code: 0xC0047062 Source: Autres Tbles Excel
> _secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
> [Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
> nom de pilote non spécifié X
> System.Data.Odbc.OdbcConnection.HandleError(OdbcHa ndle hrHandle<c/> RetCode
> retcode) X System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection
> connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
> environmentHandle) X
> System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions
> options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
> DbConnection owningObject) X
> System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
> owningConnection<c/> DbConnectionPoolGroup poolGroup) X System... The
> package execution fa... The step failed.,00:00:02,0,0,,,,0
> 05/07/2007 15:04:58,interdata,Error,0,KHEIREDDINE,interdata,( Job
> outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
> The last step to run was step 1 (inter).,00:00:05,0,0,,,,0
> 05/07/2007 15:04:58,interdata,Error,1,KHEIREDDINE,interdata,i nter,,Executed
> as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
> Microsoft Corp 1984-2005. All rights reserved. Started: 15:05:00 Error:
> 2007-05-07 15:05:03.32 Code: 0xC0047062 Source: Autres Tbles Excel
> _secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
> [Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
> nom de pilote non spécifié X
> System.Data.Odbc.OdbcConnection.HandleError(OdbcHa ndle hrHandle<c/> RetCode
> retcode) X System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection
> connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
> environmentHandle) X
> System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions
> options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
> DbConnection owningObject) X
> System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
> owningConnection<c/> DbConnectionPoolGroup poolGroup) X System... The
> package execution fa... The step failed.,00:00:05,0,0,,,,0
> Why am I getting this, and how do I resolve it?
>
> Thanks
It seems that the datasources have not been set up correctly, you could open
the installed package in BI studio and check the connections.
John

Deployement of integration services project

I am getting the following error when I test a Job in SQL Server 2005 :
Date,Source,Severity,Step ID,Server,Job Name,Step
Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator
Emailed,Operator Net sent,Operator Paged,Retries Attempted
05/07/2007 15:06:38,interdata,Error,0,KHEIREDDINE,i
nterdata,(Job
outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
The last step to run was step 1 (inter).,00:00:02,0,0,,,,0
05/07/2007 15:06:38,interdata,Error,1,KHEIREDDINE,i
nterdata,inter,,Executed
as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
Microsoft Corp 1984-2005. All rights reserved. Started: 15:06:38 Error:
2007-05-07 15:06:39.90 Code: 0xC0047062 Source: Autres Tbles Excel
_secteur [752] Description: System.Data.Odbc.OdbcException: ERROR &#
91;IM002]
[Microsoft][Gestionnaire de pilotes ODBC] Source de données introuv
able et
nom de pilote non spécifié _
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCode
retcode) _ System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
environmentHandle) _
System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions
options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
DbConnection owningObject) _
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCon
nection
owningConnection<c/> DbConnectionPoolGroup poolGroup) _ System... The
package execution fa... The step failed.,00:00:02,0,0,,,,0
05/07/2007 15:04:58,interdata,Error,0,KHEIREDDINE,i
nterdata,(Job
outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
The last step to run was step 1 (inter).,00:00:05,0,0,,,,0
05/07/2007 15:04:58,interdata,Error,1,KHEIREDDINE,i
nterdata,inter,,Executed
as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
Microsoft Corp 1984-2005. All rights reserved. Started: 15:05:00 Error:
2007-05-07 15:05:03.32 Code: 0xC0047062 Source: Autres Tbles Excel
_secteur [752] Description: System.Data.Odbc.OdbcException: ERROR &#
91;IM002]
[Microsoft][Gestionnaire de pilotes ODBC] Source de données introuv
able et
nom de pilote non spécifié _
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCode
retcode) _ System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
environmentHandle) _
System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions
options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
DbConnection owningObject) _
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCon
nection
owningConnection<c/> DbConnectionPoolGroup poolGroup) _ System... The
package execution fa... The step failed.,00:00:05,0,0,,,,0
Why am I getting this, and how do I resolve it?
ThanksHi
"malek_che" wrote:

> I am getting the following error when I test a Job in SQL Server 2005 :
> Date,Source,Severity,Step ID,Server,Job Name,Step
> Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator
> Emailed,Operator Net sent,Operator Paged,Retries Attempted
> 05/07/2007 15:06:38,interdata,Error,0,KHEIREDDINE,i
nterdata,(Job
> outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
> The last step to run was step 1 (inter).,00:00:02,0,0,,,,0
> 05/07/2007 15:06:38,interdata,Error,1,KHEIREDDINE,i
nterdata,inter,,Execute
d
> as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
> Microsoft Corp 1984-2005. All rights reserved. Started: 15:06:38 Erro
r:
> 2007-05-07 15:06:39.90 Code: 0xC0047062 Source: Autres Tbles Excel
> _secteur [752] Description: System.Data.Odbc.OdbcException: ERROR
[IM002]
> [Microsoft][Gestionnaire de pilotes ODBC] Source de données intro
uvable et
> nom de pilote non spécifié _
> System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCod
e
> retcode) _ System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
> connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
> environmentHandle) _
> System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOption
s
> options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
> DbConnection owningObject) _
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC
onnection
> owningConnection<c/> DbConnectionPoolGroup poolGroup) _ System... T
he
> package execution fa... The step failed.,00:00:02,0,0,,,,0
> 05/07/2007 15:04:58,interdata,Error,0,KHEIREDDINE,i
nterdata,(Job
> outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
> The last step to run was step 1 (inter).,00:00:05,0,0,,,,0
> 05/07/2007 15:04:58,interdata,Error,1,KHEIREDDINE,i
nterdata,inter,,Execute
d
> as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
> Microsoft Corp 1984-2005. All rights reserved. Started: 15:05:00 Erro
r:
> 2007-05-07 15:05:03.32 Code: 0xC0047062 Source: Autres Tbles Excel
> _secteur [752] Description: System.Data.Odbc.OdbcException: ERROR
[IM002]
> [Microsoft][Gestionnaire de pilotes ODBC] Source de données intro
uvable et
> nom de pilote non spécifié _
> System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCod
e
> retcode) _ System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
> connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
> environmentHandle) _
> System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOption
s
> options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
> DbConnection owningObject) _
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC
onnection
> owningConnection<c/> DbConnectionPoolGroup poolGroup) _ System... T
he
> package execution fa... The step failed.,00:00:05,0,0,,,,0
> Why am I getting this, and how do I resolve it?
>
> Thanks
It seems that the datasources have not been set up correctly, you could open
the installed package in BI studio and check the connections.
John

Deployement of integration services project

I am getting the following error when I test a Job in SQL Server 2005 :
Date,Source,Severity,Step ID,Server,Job Name,Step
Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator
Emailed,Operator Net sent,Operator Paged,Retries Attempted
05/07/2007 15:06:38,interdata,Error,0,KHEIREDDINE,interdata,(Job
outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
The last step to run was step 1 (inter).,00:00:02,0,0,,,,0
05/07/2007 15:06:38,interdata,Error,1,KHEIREDDINE,interdata,inter,,Executed
as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
Microsoft Corp 1984-2005. All rights reserved. Started: 15:06:38 Error:
2007-05-07 15:06:39.90 Code: 0xC0047062 Source: Autres Tbles Excel
_secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
[Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
nom de pilote non spécifié Ã
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCode
retcode) Ã System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
environmentHandle) Ã
System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions
options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
DbConnection owningObject) Ã
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection<c/> DbConnectionPoolGroup poolGroup) Ã System... The
package execution fa... The step failed.,00:00:02,0,0,,,,0
05/07/2007 15:04:58,interdata,Error,0,KHEIREDDINE,interdata,(Job
outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
The last step to run was step 1 (inter).,00:00:05,0,0,,,,0
05/07/2007 15:04:58,interdata,Error,1,KHEIREDDINE,interdata,inter,,Executed
as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
Microsoft Corp 1984-2005. All rights reserved. Started: 15:05:00 Error:
2007-05-07 15:05:03.32 Code: 0xC0047062 Source: Autres Tbles Excel
_secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
[Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
nom de pilote non spécifié Ã
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCode
retcode) Ã System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
environmentHandle) Ã
System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions
options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
DbConnection owningObject) Ã
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection<c/> DbConnectionPoolGroup poolGroup) Ã System... The
package execution fa... The step failed.,00:00:05,0,0,,,,0
Why am I getting this, and how do I resolve it?
ThanksHi
"malek_che" wrote:
> I am getting the following error when I test a Job in SQL Server 2005 :
> Date,Source,Severity,Step ID,Server,Job Name,Step
> Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator
> Emailed,Operator Net sent,Operator Paged,Retries Attempted
> 05/07/2007 15:06:38,interdata,Error,0,KHEIREDDINE,interdata,(Job
> outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
> The last step to run was step 1 (inter).,00:00:02,0,0,,,,0
> 05/07/2007 15:06:38,interdata,Error,1,KHEIREDDINE,interdata,inter,,Executed
> as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
> Microsoft Corp 1984-2005. All rights reserved. Started: 15:06:38 Error:
> 2007-05-07 15:06:39.90 Code: 0xC0047062 Source: Autres Tbles Excel
> _secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
> [Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
> nom de pilote non spécifié Ã
> System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCode
> retcode) Ã System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
> connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
> environmentHandle) Ã
> System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions
> options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
> DbConnection owningObject) Ã
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
> owningConnection<c/> DbConnectionPoolGroup poolGroup) Ã System... The
> package execution fa... The step failed.,00:00:02,0,0,,,,0
> 05/07/2007 15:04:58,interdata,Error,0,KHEIREDDINE,interdata,(Job
> outcome),,The job failed. The Job was invoked by User KHEIREDDINE\Kheiro.
> The last step to run was step 1 (inter).,00:00:05,0,0,,,,0
> 05/07/2007 15:04:58,interdata,Error,1,KHEIREDDINE,interdata,inter,,Executed
> as user: KHEIREDDINE\SYSTEM. ...9.00.3042.00 for 32-bit Copyright (C)
> Microsoft Corp 1984-2005. All rights reserved. Started: 15:05:00 Error:
> 2007-05-07 15:05:03.32 Code: 0xC0047062 Source: Autres Tbles Excel
> _secteur [752] Description: System.Data.Odbc.OdbcException: ERROR [IM002]
> [Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et
> nom de pilote non spécifié Ã
> System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle<c/> RetCode
> retcode) Ã System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection
> connection<c/> OdbcConnectionString constr<c/> OdbcEnvironmentHandle
> environmentHandle) Ã
> System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions
> options<c/> Object poolGroupProviderInfo<c/> DbConnectionPool pool<c/>
> DbConnection owningObject) Ã
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
> owningConnection<c/> DbConnectionPoolGroup poolGroup) Ã System... The
> package execution fa... The step failed.,00:00:05,0,0,,,,0
> Why am I getting this, and how do I resolve it?
>
> Thanks
It seems that the datasources have not been set up correctly, you could open
the installed package in BI studio and check the connections.
John

Friday, February 17, 2012

Depending on the due date, start date and end date calculate the number of entries

Hi!
I am using SQl server 8.0 and I have a web form on which I have below controls or I can say below column in the TABLE A

DueDate
Start date
End Date
Interval -- Monthly or Quarterly
Amount

Depending on the Interval(Monthly or Quarterly) I want to make an entry in the Table B which will be fall between start date and end date and on due date

EXample

DueDate = 11/15/2005
Start date =11/01/2005
End Date =11/30/2006
Interval = Monthly
Amount = 2500

In the table I should have an 12 entry as
PaymentDate Amount
=======================
11/15/2005 2500
12/15/2005 2500
01/15/2006 2500
02/15/2006 2500
03/15/2006 2500
04/15/2006 2500 ....

Please advice

Thanks
AshikaIf you keep a table of numbers then you can do this easily. Ex:

-- assume that you have table called Numbers with numbers from say 0...8000.
insert into tbl (PaymentDate, Amount)
select dateadd(month, N, @.DueDate), @.Amount
from Numbers
where N between 0 and datediff(month, @.DueDate, @.EndDate);

Alternatively, you should have a calendar table in the system that is prepoulated with all the dates. You can then use it to generate the data easily. The calendar table also solves other problems related to maintaining different calendar types in the database, accounting for holidays etc. This is a common approach in data warehousing.

Dependencies.

I am trying to ascertain dependencies of a certain stored proc, but it
seems that the dependencies are out of date. How do I force the
dependencies to refresh? (SQL 2000)
Regards
Short of dropping and recreating all the objects you don't. Never trust the
dependencies to be up to date.
Andrew J. Kelly SQL MVP
"Frank Rizzo" <none@.none.com> wrote in message
news:ePB8NVUIGHA.3936@.TK2MSFTNGP12.phx.gbl...
>I am trying to ascertain dependencies of a certain stored proc, but it
>seems that the dependencies are out of date. How do I force the
>dependencies to refresh? (SQL 2000)
> Regards

Dependencies.

I am trying to ascertain dependencies of a certain stored proc, but it
seems that the dependencies are out of date. How do I force the
dependencies to refresh? (SQL 2000)
RegardsShort of dropping and recreating all the objects you don't. Never trust the
dependencies to be up to date.
Andrew J. Kelly SQL MVP
"Frank Rizzo" <none@.none.com> wrote in message
news:ePB8NVUIGHA.3936@.TK2MSFTNGP12.phx.gbl...
>I am trying to ascertain dependencies of a certain stored proc, but it
>seems that the dependencies are out of date. How do I force the
>dependencies to refresh? (SQL 2000)
> Regards

Dependencies.

I am trying to ascertain dependencies of a certain stored proc, but it
seems that the dependencies are out of date. How do I force the
dependencies to refresh? (SQL 2000)
RegardsShort of dropping and recreating all the objects you don't. Never trust the
dependencies to be up to date.
--
Andrew J. Kelly SQL MVP
"Frank Rizzo" <none@.none.com> wrote in message
news:ePB8NVUIGHA.3936@.TK2MSFTNGP12.phx.gbl...
>I am trying to ascertain dependencies of a certain stored proc, but it
>seems that the dependencies are out of date. How do I force the
>dependencies to refresh? (SQL 2000)
> Regards