Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Wednesday, March 7, 2012

HELP? Multiple processes

I have a foreach loop which contains a call to an Execute process task. I want the Execute process task to run once for each element in my foreach, but I need to run as many Execute process tasks as my server can handle. What is the best way to do this? Any help would be greatly appreciated.

What do you mean by "I need to run as many Execute process tasks as my server can handle?" Can you be more precise in what this means, and perhaps provide a little more context on what exactly you're trying to accomplish?|||

Unfortunately, the ForEach container does not currently support parallel execution of the loops. And since the Execute Process task waits for a return value from the executable it calls, you are stuck in a sequential mode.

You can work around this by using multiple ForEach loops, and dividing your workload between them. However, this may take a bit more manual tuning. Or you migh be able to launch the process asynchronously from a script task.

|||

This is a vendor api that generates the data I need for my warehouse. I have a exe that takes one parameter and populates the appropriate stage0 tables. Sometimes this api runs really fast and returns little, other times it take 20 minutes. I'd like to run as many occurences of this api as possible so as not to slow my loads.

|||This may not be an appropriate task for SSIS then. Can you call the EXE from a C# app that has a thread pool and then when all instances of the EXE have finished running, yuo can launch whatever SSIS packes need to run next?|||

I've condsidered running it this way by passing an array of parms and then threading. I appreciate the response. I was just hoping there was a simplier and easier to maintain solution.

Friday, February 24, 2012

HELP: Linked SQL servers issue - cannot call ServerName.Database.dbo.TableName

We recently upgraded our production SQL Server to SQL Server 64-bit
Yukon on Windows 2K3 however our development SQL server is still SQL
Server v7.
We have linked servers.
The problem is all the stored procedures fail as well as T-SQL
commands in SQL Query Analyzer because we may no longer call the
server with the 4-part naming convention (server.database.dbo.table)
while OPENQUERY still works such as:
FAILURE:
SELECT ISNULL(SUM(CAST(Reproduction_Cost1 AS money)), 0)
FROM SERVER2.DATABASE2.dbo.TABLE2
WHERE LRSN=34534534
OPENQUERY WORKS:
SELECT ISNULL(SUM(CAST(Reproduction_Cost1 AS money)), 0)
FROM
OPENQUERY(SERVER2, 'SELECT * FROM DATABASE2.dbo.TABLE2 WHERE
LRSN=34534534')
The failure message is:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' reported an error. The provider did not
give any information about the error.
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
IUnknown::QueryInterface returned 0x80004005: The provider did not
give any information about the error.].
Any help is appreciated!On your new server make sure the remote account is the
same and the password is he same. Also check your remote
query time out length
>--Original Message--
>
>We recently upgraded our production SQL Server to SQL
Server 64-bit
>Yukon on Windows 2K3 however our development SQL server
is still SQL
>Server v7.
>We have linked servers.
>The problem is all the stored procedures fail as well as
T-SQL
>commands in SQL Query Analyzer because we may no longer
call the
>server with the 4-part naming convention
(server.database.dbo.table)
>while OPENQUERY still works such as:
>
>FAILURE:
>SELECT ISNULL(SUM(CAST(Reproduction_Cost1 AS money)), 0)
>FROM SERVER2.DATABASE2.dbo.TABLE2
>WHERE LRSN=34534534
>
>OPENQUERY WORKS:
>SELECT ISNULL(SUM(CAST(Reproduction_Cost1 AS money)), 0)
>FROM
>OPENQUERY(SERVER2, 'SELECT * FROM DATABASE2.dbo.TABLE2
WHERE
>LRSN=34534534')
>
>The failure message is:
>Server: Msg 7399, Level 16, State 1, Line 1
>OLE DB provider 'SQLOLEDB' reported an error. The
provider did not
>give any information about the error.
>OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
>IUnknown::QueryInterface returned 0x80004005: The
provider did not
>give any information about the error.].
>
>Any help is appreciated!
>.
>