แฟ้มประวัติPaul Galvin's SharePoint...บล็อกรายการSkyDrive เครื่องมือ วิธีใช้
12 พฤศจิกายน

Functional Example: BDC ADF that connects to SQL database with embedded user id and password

I needed to wire up MOSS to a SQL database via BDC.  For testing/POC purposes, I wanted to embed the SQL account user id and password in the ADF.  Starting with this template (http://msdn2.microsoft.com/en-us/library/ms564221.aspx), I created an ADF that connects to a particular SQL server instance and logs in with a specific user id and password and shown in this snippet:

  <LobSystemInstances>
    <LobSystemInstance Name="ClaimsInstance">
      <Properties>
        <Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>
        <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>
        <Property Name="RdbConnection Data Source" Type="System.String">actual server\actual instance</Property>
        <Property Name="RdbConnection Initial Catalog" Type="System.String">actual initial catalog</Property>
        <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property>
        <Property Name="RdbConnection Pooling" Type="System.String">false</Property>
        
        <!-- These are the key values: -->
        <Property Name="RdbConnection User ID" Type="System.String">actual User ID</Property>
        <Property Name="RdbConnection Password" Type="System.String">actual Password</Property>
        <Property Name="RdbConnection Trusted_Connection" Type="System.String">false</Property>

      </Properties>
    </LobSystemInstance>
  </LobSystemInstances>

It is not a best practice, but it's useful for a quick and simple configuration for testing.  This was surprisingly difficult to figure out.  I never found a functional example with search keywords:

  • adf embedded userid and password
  • embed user id and password in adf
  • embed user id and password in adf bdc
  • sharepoint bdc primer
  • sharepoint embed user id and password in adf

</end>

 Subscribe to my blog.

ข้อคิดเห็น (4)

โปรดรอสักครู่...
ขออภัย ข้อคิดเห็นที่คุณป้อนยาวเกินไป โปรดย่อให้สั้นลง
คุณไม่ได้ป้อนข้อมูลใดๆ โปรดลองอีกครั้ง
ขออภัย เราไม่สามารถเพิ่มข้อคิดเห็นของคุณได้ในขณะนี้ โปรดลองอีกครั้งในภายหลัง
ในการเพิ่มข้อคิดเห็น คุณต้องได้รับการอนุญาตจากผู้ปกครองของคุณ ร้องขอการอนุญาต
ผู้ปกครองของคุณได้ปิดการแสดงข้อคิดเห็น
ขออภัย เราไม่สามารถลบข้อคิดเห็นของคุณได้ในขณะนี้ โปรดลองอีกครั้งในภายหลัง
คุณแสดงข้อคิดเห็นเกินขีดจำกัดสูงสุดที่สามารถทำได้ในหนึ่งวันแล้ว โปรดลองอีกครั้งในอีก 24 ชั่วโมง
บัญชีของคุณถูกปิดใช้งานการแสดงข้อคิดเห็น เนื่องจากระบบของเราพบว่าคุณอาจกำลังสแปมผู้ใช้รายอื่น หากคุณมั่นใจว่าบัญชีของคุณถูกปิดใช้งานอย่างไม่ถูกต้อง โปรดติดต่อ ฝ่ายสนับสนุน Windows Live
ดำเนินการตรวจสอบความปลอดภัยทางด้านล่างเพื่อให้การแสดงข้อคิดเห็นของคุณเสร็จสมบูรณ์
อักขระที่คุณป้อนในการตรวจสอบความปลอดภัยต้องตรงกับอักขระในรูปภาพหรือเสียง
Paul Galvin ปิดข้อคิดเห็นในเพจนี้
ไม่มีชื่อเขียน:
I get this when trying to access wiht user id and Password

A Metadata Exception was constructed in App Domain '/LM/W3SVC/1032898172/Root-2-128851566339311184'. The full exception text is: The LobSystemInstance Property 'AuthenticationMode' has a value that requires 'Integrated Security' in the connection string
25 เม.ย.
Jan D'Hondtเขียน:
Havie struggled with LobsystemInstance connection setup too. Used your comments to check if everything worked.
My setting differs in that i have set 'Integrated security' to false instead of SSPI
and 'rdbconnection Pooling' to true.

My observation about Connection Pooling: since the connection string for any user of this BDC will be exactly the same, the same connection will be used over and over again and therefore can be efficiently pooled by the system. Thus saving overhead on the sql server side. Or is there something I overlooked?
26 พ.ย.
รูปภาพของ ไม่ระบุชื่อ
Leo เขียน:
What is the acutal instance and actual initial catalog? My guess is actual initial catalog should be the database. What is actual instance then? And if my MS SQL is using windows authentication ? what would be the user id and password in this case? domain\user then my windows log on password?
7 ธ.ค.
Prabu Jamesเขียน:
What is the difference between PassThrough and RevertToSelf in the Authentication mode.
15 พ.ย.

การติดตามข้อมูล (1)

URL การติดตามข้อมูลสำหรับข้อมูลนี้คือ:
http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!320.trak
เว็บล็อกที่อ้างอิงข้อมูลนี้