how to evoke linked AS400 server procedure

  • I created a linked AS400 server and I am able to successfully perform a select statement as follows: 

    select * from LinkServerName.AS400Name.LibraryName.FileName

    How do you evoke (call) a program on the Link AS400 Server.  I am assumming that you can not just call a program on the AS400 but can execute an External Procedure on the AS400.

    I tried the following statement:

    EXEC ('CORP400.CORP400.RCRANSTO.CPY_DIVTAB') and

    received error Server 'CORP400' is not configured for RPC.

    Thanks for anybodys help!!!!

  • Below is from a Microsoft Professional.

    Hi,

    Generally we do not support executing remote stored procedures if linked

    server is non-SQL Server. I assume that you are using DB2. You may check if

    the following can work on DB2.

    1. Create a trigger on a table in DB2 database, which calls stored

    procedures. The triggering action may be insertion, update, deletion.

    2. Execute openquery to the DB2 linked server from SQL Server (e.g. insert

    into table, etc.)

    Thus the trigger can fire the stored procedure. I understand that it may be

    inconvenient for you. However, we do not have better method.

    If you use ADO or ADO.NET in code, you can execute the stored procedure on

    DB2.

    Calling Stored Procedure From ADO.NET Results in SQLCODE: -188 (330096)

    http://support.microsoft.com/?id=330096

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

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