PDF version
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,796
On Slideshare
1,796
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. AS/400 DB2 adapter to SQL adapter error AS/400 DB2 adapter to SQL adapter error Source: http://www.tech−archive.net/Archive/BizTalk/microsoft.public.biztalk.general/2010−03/msg00037.html • From: stevepeng • Date: Wed, 17 Mar 2010 04:04:58 −0700 Hi, I have been attempting to create a solution that will move data between an AS/400 DB2 database and a SQL 2005. But I keep getting the following error: The adapter "SQL" raised an error message. Details "HRESULT="0x80040e14" Description="Could not find stored procedure 'WWTSREG'." WWTSREG is the name of the table/file from the DB2 file (also the table node of schema file) and I don't know why the orchestration simply neglects the schema mapping that I created and still uses the source schema for the SQL send port. Really hoping somebody can help out on this trouble. And my project set up details are listed below if someone needs it for diagnosis. Thanks. <DB2 Schema Generation> SELECT * FROM AAA.BBB.WWTSREG (db info masked) (db info masked) Intial catalog AAA Package collection NULLID Default schema AS/400 DB2 adapter to SQL adapter error 1
  • 2. AS/400 DB2 adapter to SQL adapter error BBB Document Target Namespace: http://DB2abif02 Document Root Element Name: DB2abifReq02 <SQL Schema Generation> Document Target Namespace:http://SQLabif02 Document Root Element Name for Request:SQLabifReq02 Document Root Element Name for Request:SQLabifRep02 <Mapping> just map the fields one by one <Receive Pipeline> (I've tried both including or not cluding the Receive Pipeline) XML Disassembler into the Disassembler box, choose DB2 schema for Document Schema <Orchestration Objects> Message_1 Identifier: Db2_Msg Message Type: Schemas−> DB2 Service Schema Message_2 Identifier: SQL_Msg Message Type: Schemas−>SQL Reuqest Schema AS/400 DB2 adapter to SQL adapter error 2
  • 3. AS/400 DB2 adapter to SQL adapter error PortType_1 Identifier: Db2_Rcv_PortType Message Type: DB2 Service Schema PortType_2 Identifier: SQL_Snd_PortType Message Type: SQL Reuqest Schema <Orchestration Design> Port_1 Name: Db2_Rcv_Port Port Type: Db2_Rcv_PortType Port Direction: Receive Port Binding: Specify later Port_2 Name: SQL_Snd_Port Port Type: SQL_Snd_PortType Port Direction: Send Port Binding: Specify later Receive Message: Db2_Msg Operation: Db2_Rcv_Port.Operation_1.Request AS/400 DB2 adapter to SQL adapter error 3
  • 4. AS/400 DB2 adapter to SQL adapter error Construct Message Message Constructed: SQL_Msg Transform Select the Ellipses from the Input Messages property and from the Transform Configuration dialog box that appears, select Existing map. From Source select Db2_Msg and for Destination, select SQL_Msg. Send Message: SQL_Msg Operation: SQL_Snd_Port.Operation_1.Request <DEPLOY> assign app name assign strong name key deploy <CONFIGURE PORTS − Receive Port> Receive Port :Db2_RP_abif02 Receive Location: Db2_RL_abif02 Type: DB2 Document Target Namespace: http://DB2abif02 Document Root Element Name: DB2abifReq02 SQL Command: SELECT * FROM AAA.BBB.WWTSREG (db info masked) Pipline: PassThruReceive (if not receive piline in the project file) AS/400 DB2 adapter to SQL adapter error 4
  • 5. AS/400 DB2 adapter to SQL adapter error <CONFIGURE PORTS − Send Port> Receive Port :SQL_SP_abif02 Type: SQL Pipline: PassThruTransmit Document Target Namespace: http://SQLabif02 Document Root Element Name: SQLabifRep02 Filter: BTS.ReceivePortName = Db2_RP_abif02 Jan Eliasen wrote: Re: Using stored procedure properly 05−May−07 On Fri, 4 May 2007 06:49:03 −0700, Kumsi <Kumsi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote: I disagree. In the SQL Adapter wizard you can specify what rootnode you want. The name of the stored procedure comes in as the name of an element further down in the XSD. −− eliasen, representing himself and not the company he works for. Private blog: http://blog.eliasen.dk Private email: jan@xxxxxxxxxx Previous Posts In This Thread: On Wednesday, April 18, 2007 5:56 PM golddo wrote: Using stored procedure properly I've spent most of the day reading different sites/Apress books, I don't understand the problem. I've finally gotten to the point of having my custom xslt transform the AS/400 DB2 adapter to SQL adapter error 5
  • 6. AS/400 DB2 adapter to SQL adapter error incoming message into the outgoing message. I tested this by initially using a file adapter on the send port, so I could easily see the output. Now I'm trying to switch the port to use an SQL Adapter to call a stored procedure which inserts data. So, first I added the SQLService.xsd file via adding a generated item. Not knowing what I should put in for the document element root name, I put in "RequestRoot". (Wait for it...) Next, go over to my port, switch the transport to SQL, configure the connection, namespace, and response root. Seems like everything's going o.k., but when I drop off a file, I get an error in the admin console: −−−−−−−−−−−−− Event Type: Error Event Source: BizTalk Server 2006 Event Category: BizTalk Server 2006 Event ID: 5754 Date: 4/18/2007 Time: 2:56:56 PM User: N/A Computer: ACG−DEV−BIZTALK Description: A message sent to adapter "SQL" on send port "Patient_Record_Request_Result_Port" with URI "SQL://******/" is suspended. Error details: HRESULT="0x80040e14" Description="Could not find stored procedure 'RequestRoot'." −−−−−−−−−− I find no evidence anywhere that the request root name is tied to the stored procedure to be called, but there we are. Finally, I don't understand the relationship between the SQLService.xsd and the actual run of the orchestration. By that I mean, there's nowhere I selected SQLService.xsd as the "xsd to use with this message/port/adapter". If I add another one, I get another orchestration. So, a couple of things: 1) Does anyone have experience with this sort of problem, and can give me some guidance? 2) Re: the SQLService/orchestration/port/adapter relationship, I *REALLY* don't feel like reconstructing an orchestration if/when I need to change the procedure or xsd. Can anyone point me in the direction of how all those things are tied together, so I can change if necessary? Thanks. AS/400 DB2 adapter to SQL adapter error 6
  • 7. AS/400 DB2 adapter to SQL adapter error On Friday, April 20, 2007 6:18 AM AlanSmit wrote: Hi,1 − It's not documented, but the SQL adapter uses the name of the record in Hi, 1 − It's not documented, but the SQL adapter uses the name of the record in the schema to determine the stored procedure to call. It's great to know this, as it gives you more control when using the adapter. 2 − I usually delete the orchestration created by the adpater wizard, and rename the schema created. The orchestration just contains a port type, and a multi part message type, so I usually recreate them myself in the orchestration I'm working on. Quite often you may be calling two stored procs from the same orch, so it makes sense to work this way. As for handking changes, i often manually edit the schema to match the stored proc changes rather than recreating the schema, it's a lot quicker, and requires less refactoring. Regards, Alan −− The Bloggers Guide to BizTalk http://geekswithblogs.com/asmith "golddog" wrote: On Friday, April 20, 2007 2:18 PM Saravana Kumar wrote: Hello there,1. Hello there, 1. You shouldn't put the stored procedure name for Request Root Element. When you are generating the schema using the wizard, the first screen asks for NameSpace and Request Root element name. You can define whatever you want here(Example:Root Element = MySqlSchemaRoot, Target Namespace = http://www.mycompany.com/SQL/Schema), its not related to any of your database object (like stored procedure). As you mentioned, in the next screen you'll choose the stored procedure. After generating the schema compiling and deploying it, when you are configuring the receive location. In the dialogue box you will provide AS/400 DB2 adapter to SQL adapter error 7
  • 8. AS/400 DB2 adapter to SQL adapter error Document Root Element Name: MySqlSchemaRoot <<Name you provided while generating the schema>> Document Target Namespace: http://www.mycompany.com/SQL/Schema <<Namespace you provided while generating the schema>> SQL Command: exec [GetLoadTestBrowsers] <<Your stored procedure name>>. 2. The document root element name you define (from previous step) will eventually become the MessageType, Alan was trying to explain to you, you normally don't regenerate the schema (XSD) second time using the wizard, instead you'll handcraft it. Say for example inside your stored procedure if you have added additional column for your "SELECT" statement, you will then open the SQLService.xsd( or whatever name you had given) and manually add the column as ELEMENT/Attribute with appropriate datatype. Hope it cleared your doubts now. visit this link for a walk through http://msdn2.microsoft.com/en−us/library/aa560708.aspx NOTE the importance of "xmldata" parameter in the SQL query, you must remove it later (applies only if you are using SQL 2005). Regards, Saravana Kumar http://www.biztalk247.com/v1/ http://www.digitaldeposit.net/blog "golddog" <golddog@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:7510A8FE−92F9−46BB−B531−3F817FC6B55F@xxxxxxxxxxxxxxxx On Sunday, April 22, 2007 9:16 AM Jan Eliasen wrote: Re: Using stored procedure properly On Fri, 20 Apr 2007 19:18:47 +0100, "Saravana Kumar" <saravanamv@xxxxxxxxxxx> wrote: No, it also applies if you are using SQL 2000. When using SQL 2005, however, you may want to use the for xml auto, xmlschema instead of xmldata − this will generate xsd's instead of xdr's that must be converted, which in some cases can give you problems. To golddog: Try looking here: http://blog.eliasen.dk/PermaLink,guid,31e28fa8−d2dc−4eb2−98e5−423bc8d7188c.aspx and if you run into a specific problem, then also read here: http://blog.eliasen.dk/PermaLink,guid,005ab036−cef6−47de−aaa0−fa534dbfb960.aspx −− eliasen, representing himself and not the company he works for. Private blog: http://blog.eliasen.dk AS/400 DB2 adapter to SQL adapter error 8
  • 9. AS/400 DB2 adapter to SQL adapter error Private email: jan@xxxxxxxxxx On Monday, April 23, 2007 11:35 AM Leonid Ganeline wrote: I'd recomend to study the "SQL Adapter Samples" articles in the BizTAlk 2006 I'd recomend to study the "SQL Adapter Samples" articles in the BizTAlk 2006 Help. There are good explanations and examples. −− Regards, Leonid Ganeline Microsoft Certified Technology Specialist: BizTalk Server 2006 http://geekswithblogs.net/leonidganeline/ "golddog" <golddog@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:B33D4A86−5FC4−4B6D−8BE8−9659F5ECFA89@xxxxxxxxxxxxxxxx On Friday, May 04, 2007 9:49 AM Kums wrote: Hi, The root element name is abvously tied with the sql adaptor sp call. Hi, The root element name is abvously tied with the sql adaptor sp call. When u generate a schema using the autogenerate wizard it will automatically create the schema root name as stored procedure name. when your biztalk is started it will look take the root node as the sp name and passes the xmlnodes as parameters. This is also having problem in it, if ur sp's are generated in dbo. schema then it is not a problem, if the sp is created in some other schema then it will not be proper. Regards, Kumsi "golddog" wrote: On Saturday, May 05, 2007 8:17 AM Jan Eliasen wrote: Re: Using stored procedure properly On Fri, 4 May 2007 06:49:03 −0700, Kumsi AS/400 DB2 adapter to SQL adapter error 9
  • 10. AS/400 DB2 adapter to SQL adapter error <Kumsi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote: I disagree. In the SQL Adapter wizard you can specify what rootnode you want. The name of the stored procedure comes in as the name of an element further down in the XSD. −− eliasen, representing himself and not the company he works for. Private blog: http://blog.eliasen.dk Private email: jan@xxxxxxxxxx Submitted via EggHeadCafe − Software Developer Portal of Choice Measuring SharePoint Page Rendering http://www.eggheadcafe.com/tutorials/aspnet/c0a9ac9e−53cd−442f−8981−9d5f236c2be5/measuring−sharepoint−page. . AS/400 DB2 adapter to SQL adapter error 10