Showing posts with label similar. Show all posts
Showing posts with label similar. Show all posts

Monday, March 26, 2012

Running a Job from ASP

I have a post similar to this is the Getting Started thread but haven't had any responses so I'm going to ask an updated version of my question. What I need to do is run a job after a user clicks a button in my ASP page. I know I can use oDBConnection.pStoredProc to run a stored procedure, but is there a similar command I can use to run the job? Any help will be appreciated. Thanks
Tim Conlan
InternTry this:
http://www.sqlteam.com/item.asp?ItemID=19595
|||Darrell, that's pretty much exactly what I was looking for. Thanks for the heads.
Tim Conlan|||

Actually, if you have the time I have a second question about puting together the DTS package. I get the fact that I can write the Stored Proc to dynamically create the job that will run the DTS package on the remote server, at least I think that's what I understand, but I want to make sure that I understand. So, the St Proc accepts a @.variable from my ASP page. The St Proc then appends the @.variable to the DTSrun command line script. So, how do I reference the @.variable when I put together the DTS package? I'm building it in Enterprise Manager and I see the field that says "Parameters:", do I just put @.variable in that field or do I need to put something else in there to get the package to pass the @.variable to the .BAT file that I will run with the DTS package?
If I've confused you or didn't provide enough information I'd be happy to clarify. Thanks
Tim Conlan
Intern (but getting better at this all the time)

|||I think you just put @.variable in there.

Wednesday, March 21, 2012

Run SSIS Package problem when using SQL Agent

Maybe someone else has asked similar question. But I still can't solve my problem after looking some threads in this forum.

The package runs fine through VS 2005. After imported into MSDB, it still does well when I start it in Integration service directly. But the packgae never achieved under SQL Agent.

Acturaly,agent can run the package,but always fail in one task. It's an 'Execute Process Task ', I use 'winrar.exe' to extract file from a mapped drive to the local disk. The Agent service account is a domain user who has the read permission on the mapped drive,also has been grant sysadmin on the SQL istance. So I think the right of the Agent account is enough.

Thanks for your help

What's the error?

|||

I am having a similar problem.

I have created an Integration Package in BI and deployed it to the SQL Server. I can run the package fine from Integration Services but when I run it as a job I am getting the following message. I have looked up the error but there is no additional information.

TITLE: Microsoft.SqlServer.SmoEnum

Failed to retrieve data for this request.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (Microsoft SQL Server, Error: 10054)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10054&LinkId=20476

BUTTONS:

OK

|||

In the package log file,there are no information about the failed task in detail. On error message just show that return value is 1 but 0 is expected.

Now,I know the key is authority. I copy the compressed files from the mapped drive to a local disk drive and change the drive name in the expression of the task,then everything is ok under SQL Agent.

So what about the Agent service account, I am still confused. The account I use can do anything on the local system, I even ask the NetworK Admin grant me the write permission on the mapped drive,but the job still failed when execute the "winrar" process task. As I have said, the pre-executed tasks run fine under Agent. In debug mode or in integration services instance of object explorer, there are no error at all.