Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Create a Job that execute a SP

Author  Topic 

adieren
Starting Member

14 Posts

Posted - 2006-05-31 : 10:50:33
I have a job that have a Microsoft OLEDB provider for SQL Server and a Execute SQL Task, this objects are not link by an arrow because the program not allow me to put it.

If I run the packages it works fine but I have an schedule and it sent me the next error.

Executed as user: POSWINSOC\SYSTEM. ...cuting... DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun OnError: DTSStep_DTSExecuteSQLTask_1, Error = -2147217873 (80040E2F) Error string: The statement has been terminated. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 Error Detail Records: Error: -2147217873 (80040E2F); Provider Error: 3621 (E25) Error string: The statement has been terminated. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 Error: -2147217873 (80040E2F); Provider Error: 515 (203) Error string: Cannot insert the value NULL into column 'nomEmple', table 'bdValeE.dbo.tbSaldos'; column does not allow nulls. INSERT fails. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun: Package execution complete. Process Exit Code 1. The step failed.

What I am doing wrong or exist a better way to do a Job that runs a sp.
Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2006-05-31 : 11:46:03
>> Cannot insert the value NULL into column 'nomEmple', table 'bdValeE.dbo.tbSaldos'; column does not allow nulls. INSERT fails.

Have a look at that.

If all you want to do is schedule an sp why are you involving dts?


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-05-31 : 21:16:14
"What I am doing wrong or exist a better way to do a Job that runs a sp."
A better way:
- Run Enterprise Manager
- go to Management - SQL Server Agent - Jobs
- New Job
- create step as TSQL
- input in command exec your_sp_name


KH

Go to Top of Page
   

- Advertisement -