Connection string in database lookup functoid…

Home Page Forums BizTalk 2004 – BizTalk 2010 Connection string in database lookup functoid…

Viewing 2 reply threads
  • Author
    Posts
    • #17172

      My question is, is there any way to test the connection to a remote SQL server 2005 database from biztalk? 

       I am pretty new to the world of SQL server and Biztalk, so I am trying to figure out what the proper connection string is to connect to a remote database to simply return the ADO object with my record to output.

       this is what my connection string looks like now…  can anyone offer suggestions on what other considerations I might need to look at or if this is just plain wrong.  when I ran the process, my data just did not populate for the field that was being extracted from the lookup.  And there were no errors in the admin logs either…  quite confused as to what could be going wrong and/or how to figure out the cause of it not working… I would have thought I would have seen something in the logs like trying to connect to the db and then failing…  or maybe I am not looking in the right place…

       Data Source=HPSQL05T;Initial Catalog=TESTDB;User Id=myId;Password=myPw;

       thank you in advance for any insight you might offer! 

    • #17184
      • Go to any file folder but preferably the one containing your mapping project/files.
      • Create a text file and name it "DBConnection.udl".  (The important part is the extension .udl)
      • Double click the file.
      • On the Provider Tab, select SQL Native Client (this assumes it is installed), then Next
      • For Data Source, enter yours: HPSQL05T
      • Initial Catalog, TESTDB
      • Either use integrated security or click allow saving password
      • Test Connection…OK
      • In your map, either drop a String Concatenate functoid or add the following to the Database Lookup functoid as the second paramter.
      • File Name=<replace this with the path to the .udl file you created>
      • example: File Name=C:\Project\Database\DBConnection.udl
    • Configure the rest of the Database functoid(s) input(s), but at least a Value Extractor, and connect it to output so you can see the results.
    • Test your map.
    • Does this make sense…and did it work?

       

  • #17193

    Yes, makes perfect sense, especially now that I have a much better idea about the udl files than what I have read.

    Unfortunately though, no, still not working.

    I did figure out how to hook up an error return functoid and now can see the error, however slightly ambiguous to me…

    Format of the initialization string does not conform to specification starting at index 0

    after doing some googling on this, it looks like it relates to the connection string. it also looked like it could be a Microsoft bug based on some of the forums I read but not convinced.

    In any case, I created the .udl file like you said. and upon testing connection it succeeded. I am slightly lost when you said to use the SQL native client if I had it installed… This is something automatically installed on the SQL 2005 server, so is this also something that maybe needs to be installed onto the same server as Biztalk because currently these are both residing on seperate servers.

    does any of this sound familiar or do you have any tips on how I can continue to narrow this issue down?

    Thanks again…

    • #17196

      I have to assume that the SQL Client was installed on the BizTalk server since it requires access to SQL Server.  Are you using SQL Native client?

      My Database Lookup functoid looks like this:

      • xpath statement created when I dragged a line from the input field.
      • String Left Trim (or String Concatenate) that holds the "File Name=C:\…\…uld" statement
      • USER_TYPE (Table name)
      • USER_TYPE_ID (Column name)

      The Value Extractor then looks like this:

      • Database Lookup
      • USER_TYPE_ID

      Of course this just confirms that the ID value I have is in the table, a very simple example.  One thing I wanted to be clear on is the fact that all these funcoid links are in the correct order.  If you verify this, then it might me a good idea to grab any standard SQL patches from Microsoft Update.  I'd make sure any SQL and SQLXML updates are present.

      • #17199

        Boy, I hate to sound dumb here but this is what I have done…  I setup separate servers for SQL 2005 and Biztalk.  I was told that it was not a good idea to install both on the same server.  (Since then, I have seen where this would not be a problem) Anyway, All I have on my Biztalk server that is SQL related is the configuration manager.  I also just installed the distributable client found in the setup disks just to make sure I had that covered.

         You should also know that I have been interfacing with the SQL database because I have working projects so all that should be straight…  its just for some reason, I am getting this one error during the lookup…  I guess what I need to know is how do I check if this native client is active?  I have the udl file setup to use this…  as for the functoid configuration, I believe I have it setup correctly.  obviously, I am not so saavy on SQL, I just installed it on a development server just to fill the biztalk installation requirement.  nothing fancy

        This is exactly what I have in my DB lookup functoid

         01 (hardcoded key value just to get the test working)

        c:\DBConnection.udl (literal location of file)

        dbo.TESTDBF (database table name)

        ShipToNumber (table key column for lookup)

         The extractor functoid has the lookup input and just the output column

        This is the exact contents of my .uld file…

        [oledb]
        ; Everything after this line is an OLE DB initstring
        Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;User ID=kb17324dx;Initial Catalog=TESTDB;Data Source=HPSQL05T

         Does this give you any better idea what I have and what I dont have?

         

        • #17221

          I am assuming that I stumped you…  I still havent been able to locate a solution for this. all of my patches are up to date and I am still getting this error…  any more ideas?

          • #17222

            To be honest, I haven't found the time to test this since my last post, but I wanted to suggest that if you are not already doing this, test the map by setting up the properties and right clicking on Validate Map, and then Test Map if there are no errors.  Are you getting errors in this phase, or are your problems strictly when you run the app?

            I like this feature because you get to make incremental changes and test several times a minute if necessary.  Obviously there is a lot to setup when it comes to testing a DB connection, beyond the UDL, but in this situation we should be avoiding problems such as the wrong version of BizTalk for the OS, and bad configuration.  We're merely checking the connection to SQL and that the Transform works, as simple as it may be.

            I'm not really sure what additional questions to ask beyond, what else works or doesn't work so we know where to go.  This should obviously be a simple problem to solve but I think we're missing a few key pieces of information.  If you're new to BizTalk, then maybe it is something as simple as installation and configuration, but it’s hard to tell without knowing your system was installed using prescriptive guidance from Microsoft.

  • #23794

    Hi,

      Did this issue got resolved. I am also facing same issue. Can you please let me know how you resolved, if you have already done.

    Can reach me at: pavana.meghana@gmail.com

     

    Thanks,

    Pavana

    • #26560

      Connection string:    Provider=SQLOLEDB;Persist Security Info=False;Integrated Security=SSPI;Data Source=RENSYS019;Initial Catalog=BizTalkLookUpDB

  • Viewing 2 reply threads
    • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.