Logo
programming4us
programming4us
programming4us
programming4us
Windows XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
 
Windows Azure

Consuming SQL Azure Data : Integrating SQL Azure with BCS by Using SharePoint Designer 2010

8/11/2011 4:05:29 PM
When integrating SQL Azure with BCS, you first need to create a new table in SQL Azure that you can expose in SharePoint by using the BCS. To do this, you’ll need to have your Windows Azure account up and running . If you do not have your Windows Azure account and developer key, make sure you acquire those first.

1. Create a SQL Azure Database

1.1. Create a SQL Azure Database
  1. Navigate to either http://windows.azure.com or http://msdn.microsoft.com/en-us/windowsazure/default.aspx, and log on to Windows Azure using your Windows Live ID. You should see something similar to the following image.



  2. Click Hosted Services, Storage Accounts, & CDN, and then select New Storage Account. Map to a subscription, provide a namespace for your storage account, select a region, and click Create.

  3. Click the Firewall Rules accordion control to manage your firewall rules. Note that you’ll need to ensure that you have the firewall of your machine registered here so you can access the SQL Azure database. For demo purposes, create a firewall rule that is open for your machine name—for example, MyServer with the rule 0.0.0.0-255.255.255.255.


    Note:

    You may also need to open outbound TCP 1433 on your machine. For more information on this, see http://msdn.microsoft.com/en-us/library/ee621782.aspx.


  4. Click the Database tab in your portal, and then select the subscription where you want to create a new database.

  5. Create a new database by clicking Create. Provide a name, and then select the edition (which will auto-populate the amount of storage available for you). Note that you’ll use the Web edition, which is a smaller, low-cost database.

  6. Be sure to make note of the server name and admin user name. You can manage and reset the admin password by clicking Reset Admin Password.

    You may want to take some time at this point to explore the Windows Azure developer portal a little more.

  7. After you create your SQL Azure database, navigate away from the portal and open SQL Server 2008 R2 Management Studio.

  8. When prompted, provide the name of your server, and enter the logon information. Also, click the Options button to expose the Connection Properties tab, and select Customers (or whatever you named your SQL Azure database). Then click Connect.



  9. When SQL Server connects to your SQL Azure database, click the New Query button as illustrated in the following image.



  10. You now have a query window with an active connection to your account. Note that you can also create a new database here via SQL scripts if you wanted. You created a database through the Windows Azure developer portal, but you can also create a database through script. For example, the following script creates a new database called Customer. You type this script in the query window and then click the Execute Query button:

    Create Database Customers

  11. Now that you have the Customer database, you need to create a table called CustomerData. To do this, type the following SQL script and click the Execute Query button:

    CREATE TABLE [CustomerData](
    [CustomerID] [int] IDENTITY(1,1)NOT NULL PRIMARY KEY CLUSTERED,
    [Title] [nvarchar](8)NULL,
    [FirstName] [nvarchar](50)NOT NULL,
    [LastName] [nvarchar](50)NOT NULL,
    [EmailAddress] [nvarchar](50)NULL,
    [Phone] [nvarchar](30)NULL,
    [Timestamp] [timestamp] NOT NULL
    )

  12. You’ll now want to create a set of records for your new database table. To do this, type the following SQL script, (adding different data in new records as many times as you’d like):

    INSERT INTO [CustomerData]
    ([Title],[FirstName],[LastName],[EmailAddress],[Phone])
    VALUES
    ('Dr', 'Ties', 'Arts', 'ties@fabrikam.com','425-555-0101'),
    ('Mr', 'Rob', 'Barker', 'robb@fabrikam.com','205-555-0128')

  13. Eventually, you will have a number of records. To view all of the records you entered, type the following script and click the Execute Query button (where in this script Customers is the database name and CustomerData is the table name):

    Select * from Customers.dbo.CustomerData

    The following image illustrates a sampling of the results you would see upon entering this SQL script in the query window.



  14. Close the SQL Server 2008 R2 Management Studio, because you are now done adding records.


Note:

More Info For more in-depth information on SQL Azure, visit the Azure Channel 9 Learning Center at http://channel9.msdn.com/learn/courses/Azure/. From here, you can download a training kit in which you’ll find deeper technical information and tutorials on SQL Azure.


Now that you’ve created a new SQL Azure database called Customer, and a CustomerData table with some records in it, you can move on to the SharePoint part of this exercise. This is where you’ll configure SharePoint to connect to SQL Azure and expose the data as an external list, from which you’ll be able to create, read, update, and delete (CRUD) records. To enable the connection between SharePoint and SQL Azure, you’ll first need to secure the connection to SQL Azure by using the Secure Store Service and an application ID.

Other -----------------
- Collaborating on Databases : Exploring Web-Based Databases
- Consuming SQL Azure Data : Introduction to Business Connectivity Services
- Integrating Silverlight, Windows Azure DataMarket, and SharePoint
- Local Application for Updates : JupiterMotorsERP local application
- Collaborating on Spreadsheets : Exploring Web-Based Spreadsheets (part 3)
- Collaborating on Spreadsheets : Exploring Web-Based Spreadsheets (part 2)
- Collaborating on Spreadsheets : Exploring Web-Based Spreadsheets (part 1) - Google Spreadsheets
- Integrating DataMarket Data with a Visual Web Part : Create a WCF Service to Retrieve DATA.gov Crime Data (part 2)
- Integrating DataMarket Data with a Visual Web Part : Create a WCF Service to Retrieve DATA.gov Crime Data (part 1)
- Integrating DataMarket Data with Excel and SharePoint - Consume Windows Azure Data in Excel 2010
 
 
Video tutorials
- How To Install Windows 8

- How To Install Windows Server 2012

- How To Install Windows Server 2012 On VirtualBox

- How To Disable Windows 8 Metro UI

- How To Install Windows Store Apps From Windows 8 Classic Desktop

- How To Disable Windows Update in Windows 8

- How To Disable Windows 8 Metro UI

- How To Add Widgets To Windows 8 Lock Screen

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
programming4us programming4us
 
programming4us
Women
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone