How to configure a job in SQL Server 2005 (Developer)

  • Hi,

    I am importing to SQL a table from Excel, but I need to import this table frequently and I would like to do that by a SQL job, but I do not know how to configure the job. Can anyone help me configure it??

  • Read about BCP, bulk insert and SSIS and choose the one that suits you best. You can also use linked servers and OPENROWSET.

    John

  • What method you have used to import data from excel?

    If you've used DTS/SSIS package, right click on the package and go to schedule package then set a desired schedule for the import package.

    If you've written a t-sql procedure, then go to Server > SQL Server Agent > Jobs, right click on the jobs to create a new job. Next is to set up steps, use T-SQL script as text type and finally you need to a setup a schedule for it.

    --Ramesh


  • Thanks everyone,

    Ramesh,

    I already followed these steps Server > SQL Server Agent > Jobs, but when I start the job it shows the following message: "Executed as user: TOSHIBA-USER\SYSTEM. The package execution failed. The step failed."

    How can I fix it??

    Thank you again

  • Check which step is failing in job history..

    --Ramesh


  • According to the Log File Viewer, it says "The job failed. The job was invoked by Schedule 35 (Acumulacao_Horario). The last step to run was step 1 (Acumulacao_Intraday).

    Does not say anything else. If I am right, the schedule that I specified is correct and running, but the step is not.

  • Right click on the job and select view history. A viewer will open, from which select the most recent execution and collapse it to view the step executions. Now from that, check which step is failin and at the bottom of the window you'll find the reason for it.

    --Ramesh


Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply