Configure the connection URI for the SQL adapter

 

A connection URI is a connection string that contains parameters required to connect to SQL Server. While using the Consume Adapter Service Add-in or the Add Adapter Metadata Wizard in Visual Studio, you must specify the URI to connect to SQL Server to generate the metadata. While configuring a send or receive port using the BizTalk Server Administration console, you must specify the URI to connect to SQL Server to perform operations.

From Visual Studio, you can specify the connection URI using the Consume Adapter Service Add-in or the Add Adapter Metadata Wizard.

Use the Consume Adapter Service Add-in

  1. Right-click your BizTalk project, point to Add, and then click Add Generated Items.

  2. In the Add Generated Items dialog box, do the following:

    Use thisTo do this
    CategoriesClick Consume Adapter Service.
    TemplatesClick Consume Adapter Service.
  3. To start the Consume Adapter Service dialog box, click Add.

  4. In the Consume Adapter Service dialog box, from the Select a binding list, select sqlBinding, and then click Configure.

  5. In the Configure Adapter dialog box, click the Security tab. From the Client credential type list, do one of the following:

    System_CAPS_ICON_note.jpg Note

    If you are connecting to SQL Server using Windows Authentication, the Windows user with which you are logged in must be added to SQL Server as described in Connect to SQL Server Using Windows Authentication with the SQL adapter.

    Click thisTo do this
    NoneConnect to SQL Server by using Windows authentication.
    WindowsConnect to SQL Server by using Windows authentication.
    UsernameSpecify the user name and password to connect to SQL Server by specifying credentials for a user defined in SQL Server database. Note that the user name and password are case-sensitive. Note: If you leave the User name and Password fields as blank, the adapter connects to SQL Server using Windows authentication.
  6. Click the URI Properties tab, and specify values for different parameters. For more information about the connection URI for the SQL adapter, see Create the SQL Server Connection URI.

  7. Click the Binding Properties tab, and specify values for the binding properties, if any, which are required before generating the schema. For more information about binding properties, see Read about the BizTalk Adapter for SQL Server adapter Binding Properties.

  8. Click OK.

Use the Add Adapter Metadata wizard

  1. Right-click the BizTalk project, point to Add, and then click Add Generated Items.

  2. In the Add Generated Items dialog box, do the following:

    Use thisTo do this
    CategoriesClick Add Adapter.
    TemplatesClick Add Adapter Metadata.
  3. Click Add. The Add Adapter Metadata Wizard opens.

  4. In the Add Adapter Wizard, select WCF-SQL. Select the computer on which BizTalk Server is installed and the name of the BizTalk database.

    System_CAPS_ICON_important.jpg Important

    If you already have a WCF-SQL port configured in BizTalk, select the port from the Port list.

  5. Click Next.

  6. In the Consume Adapter Service dialog box, from the Select a binding drop-down list, select sqlBinding, and then click Configure.

  7. In the Configure Adapter dialog box, click the Security tab, and from the Client credential type drop-down list box, do one of the following:

    System_CAPS_ICON_note.jpg Note

    If you are connecting to SQL Server using Windows Authentication, the Windows user with which you are logged in must be added to SQL Server as described in Connect to SQL Server Using Windows Authentication with the SQL adapter.

    Click thisTo do this
    NoneConnect to SQL Server by using Windows authentication.
    WindowsConnect to SQL Server by using Windows authentication.
    UsernameSpecify the user name and password to connect to SQL Server by specifying credentials for a user defined in SQL Server database. Note that the user name and password are case-sensitive. Note: If you leave the User name and Password fields as blank, the adapter connects to SQL Server using Windows authentication.
  8. Click the URI Properties tab, and then specify values for the connection parameters. For more information about the connection URI for the SQL adapter, see Create the SQL Server Connection URI.

  9. Click the Binding Properties tab, and then specify values for the binding properties, if any, required by the operations you want to target. For more information about binding properties, see Read about the BizTalk Adapter for SQL Server adapter Binding Properties.

    System_CAPS_ICON_note.jpg Note

    If you selected an existing WCF-SQL send port, you need not specify the binding properties. The binding properties are picked from the send port configuration. However, you may choose to specify the binding properties that are required at design-time, if any. In such case, the new values for binding properties will be used at design-time while generating the metadata. However, at run-time the values specified for binding properties in the send port configuration will be applicable.

  10. Click OK.

From the BizTalk Server Administration console, you can specify the connection URI as part of the WCF-Custom or a WCF-SQL port configuration.

Enter the connection URI for the WCF-Custom port

  1. Start the BizTalk Server Administration console.

  2. In the console tree, expand BizTalk Group, then expand Applications, and then expand the application under which you want to create a port, and click Send Ports or Receive Ports. In the right pane, you can choose to create a port or select an existing port.

  3. In the port properties dialog box, from the Type drop-down list, select WCF-Custom, and then click Configure.

    System_CAPS_ICON_note.jpg Note

    To see the location properties dialog box for a receive port, click the Receive Location tab on the left pane of the port properties dialog box, and then click New.

  4. In the WCF-Custom Transport Properties dialog box, click the General tab.

  5. In the Address (URI) text box, specify the connection URI to connect to SQL Server. For more information about the connection URI for the SQL adapter, see Create the SQL Server Connection URI.

  6. In the WCF-Custom Transport Properties dialog box, click the Binding tab. From the Binding Type drop-down list, select sqlBinding.

  7. If you are creating a send port, in the WCF-Custom Transport Properties dialog box, click the Credentials tab, and do one of the following:

    • Select the Do not use Single Sign-On option, and specify the user name and password to connect to SQL Server. Note that the user name and password are case-sensitive.

      System_CAPS_ICON_note.jpg Note

      If you want to connect to SQL Server using Windows authentication, specify a blank user name and password. Before you do this, the Windows user with which you are logged in must be added to SQL Server as described in Connect to SQL Server Using Windows Authentication with the SQL adapter.

    • Select the Use Single Sign-On option, and specify an affiliate Enterprise Single Sign-on (SSO) application.

  8. If you are creating a receive port, in the WCF-Custom Transport Properties dialog box, click the Other tab, and do one of the following:

    • Select User account option, and specify the user name and password to connect to SQL Server. Note that the user name and password are case-sensitive.

      System_CAPS_ICON_note.jpg Note

      If you want to connect to SQL Server using Windows authentication, specify a blank user name and password. Before you do this, the Windows user with which you are logged in must be added to SQL Server as described in Connect to SQL Server Using Windows Authentication with the SQL adapter.

    • Select Get credentials from affiliate application option, and specify an affiliate SSO application.

  9. Click OK.

Enter the connection URI for the WCF-SQL port

  1. Start the BizTalk Server Administration console.

  2. Add the WCF-SQL adapter to the BizTalk Server Administration console. For instructions, see Adding the SQL Adapter to BizTalk Server Administration Console.

  3. In the console tree, expand BizTalk Group, then expand Applications, and then expand the application under which you want to create a port, and click Send Ports or Receive Ports. In the right pane, you can choose to create a port or select an existing port.

  4. In the port properties dialog box, from the Type drop-down list, select the WCF-SQL adapter you added earlier, and then click Configure.

    System_CAPS_ICON_note.jpg Note

    To see the location properties dialog box for a receive port, click the Receive Location tab on the left pane of the port properties dialog box, and then click New.

  5. In the transport properties dialog box, click the General tab.

  6. Click the Configure button and provide values for the connection parameters. For more information about the connection URI for the SQL adapter, see Create the SQL Server Connection URI.

  7. In the transport properties dialog box, click the Binding tab and specify values for binding properties.

    System_CAPS_ICON_note.jpg Note

    The binding properties are displayed based on whether you are configuring a send port or a receive port. For example, binding properties related to notifications are not available while configuring a send port because notifications are inbound operations and require a receive port configuration.

  8. If you are creating a send port, in the transport properties dialog box, click the Credentials tab, and do one of the following:

    • Select the Do not use Single Sign-On option, and specify the user name and password to connect to SQL Server. Note that the user name and password are case-sensitive.

      System_CAPS_ICON_note.jpg Note

      If you want to connect to SQL Server using Windows authentication, specify a blank user name and password. Before you do this, the Windows user with which you are logged in must be added to SQL Server as described in Connect to SQL Server Using Windows Authentication with the SQL adapter.

    • Select the Use Single Sign-On option, and specify an affiliate Enterprise Single Sign-on (SSO) application.

  9. If you are creating a receive port, in the transport properties dialog box, click the Other tab, and do one of the following:

    • Select User account option, and specify the user name and password to connect to SQL Server. Note that the user name and password are case-sensitive.

      System_CAPS_ICON_note.jpg Note

      If you want to connect to SQL Server using Windows authentication, specify a blank user name and password. Before you do this, the Windows user with which you are logged in must be added to SQL Server as described in Connect to SQL Server Using Windows Authentication with the SQL adapter.

    • Select Get credentials from affiliate application option, and specify an affiliate SSO application.

  10. Click OK.

Building blocks to develop BizTalk applications with the SQL adapter

Show: