Presentation is loading. Please wait.

Presentation is loading. Please wait.

Application Internet Azure Cloud Internet Azure Cloud LB TDS (tcp) Applications use standard SQL client libraries: ODBC, ADO.Net, PHP, … Load balancer.

Similar presentations


Presentation on theme: "Application Internet Azure Cloud Internet Azure Cloud LB TDS (tcp) Applications use standard SQL client libraries: ODBC, ADO.Net, PHP, … Load balancer."— Presentation transcript:

1

2

3

4 Application Internet Azure Cloud Internet Azure Cloud LB TDS (tcp) Applications use standard SQL client libraries: ODBC, ADO.Net, PHP, … Load balancer forwards ‘sticky’ sessions to TDS protocol tier Security Boundary SQL Gateway Scalability and Availability: Fabric, Failover, Replication, and Load balancing Gateway: TDS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to backend SQL

5

6

7 IDNameStart IPEnd IPCreateModify 1Office12.1.2.012.1.2.2552009-09-18 … 2Home12.2.2.5 2009-09-20 …2009-09-21 …

8

9 TimeDatabaseDirectionClassPeriodQuantity 2009-09-17 19:00TPCHEgressInternalPeak55598 2009-09-17 19:00TPCHIngressInternalPeak76026 ……………… TimeSKUQuantity 2009-09-17 19:00Web1 2009-09-17 19:00Business10 ………

10

11

12 Recommendations

13

14 Increases efficiency by removing re-login

15

16 while (true) { using (SqlConnection connection = new SqlConnection(connStr)) { try { connection.Open(); using (SqlCommand cmd = connection.CreateCommand()) { cmd.CommandText = @"SetBCPJobStartTime"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter(@"@BCPJobId", BCPJobId)); cmd.ExecuteNonQuery(); } catch (Exception exc) { // deal with error } // more stuff // ….. }

17

18

19

20 // Length inferred: leads to cache bloat  cmd.CommandText = "SELECT c1 FROM dbo.tbl WHERE c2 = @1"; cmd.Parameters.Add("@1", SqlDbType.NVarChar).Value = "1"; … cmd.Parameters.Add("@1", SqlDbType.NVarChar).Value = "22"; // Length supplied: no cache bloat cmd.CommandText = "SELECT c1 FROM dbo.tbl WHERE c2 = @1"; cmd.Parameters.Add("@1", SqlDbType.NVarChar, 128).Value = "1"; (@1 nvarchar(1)) SELECT c1 FROM dbo.tbl WHERE c2 = @1 (@1 nvarchar(2)) SELECT c1 FROM dbo.tbl WHERE c2 = @1 (@1 nvarchar( 128 )) SELECT c1 FROM dbo.tbl WHERE c2 = @1

21

22 SQL Azure Cluster Node 55 DB3 DB1 DB2 DB3 DB4 DB5 DB6

23 SQL Azure Cluster DBC1 DBC2 DBC3 DBC4 DBC5 DBC6

24

25 Skip This Ad  Go See Mark Scurrell’s Session: Using the Microsoft Sync Framework to Connect Apps to the Cloud (SVC23)

26

27 // Bulk data import using (SqlBulkCopy bulk = new SqlBulkCopy(new SqlConnection(conn)) { DestinationTableName = "dbo.data", BatchSize = 2000, // Transaction size (length) BulkCopyTimeout = 10000, // Transaction timeout NotifyAfter = 1000, // Progress callback }) { bulk.SqlRowsCopied += new SqlRowsCopiedEventHandler( myProgressCallback); bulk.WriteToServer(sourceDataReader); }

28 demo

29 // BCP example SET SRV=somesrv.database.windows.net SET LOGIN=mylohin@somesrv SET PW=something SET S_DR=C:\flats bcp TPCH2.dbo.supplier in %S_DR%\supplier.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.nation in %S_DR%\nation.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.region in %S_DR%\region.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.customer in %S_DR%\customer.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.part in %S_DR%\part.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|“ bcp TPCH2.dbo.supplier out %S_DR%\supplier.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.nation out %S_DR%\nation.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.region out %S_DR%\region.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.customer out %S_DR%\customer.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|" bcp TPCH2.dbo.part out %S_DR%\part.tbl -c -U %LOGIN% -P %PW% -S %SRV% -t "|"

30 Browser WorkerRole Blobs Target DB Jobs BCP PutBlob() NewJob() GetJob() GetBlob() WebRole

31

32

33 Built by Developers for Developers….

34 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

35


Download ppt "Application Internet Azure Cloud Internet Azure Cloud LB TDS (tcp) Applications use standard SQL client libraries: ODBC, ADO.Net, PHP, … Load balancer."

Similar presentations


Ads by Google