You are here

Feed aggregator

Taking advantage of the fact that the handle returned when you create a kernel synchronization object has full access regardless of the actual ACL

MSDN Blogs - Thu, 08/28/2014 - 07:00

A customer wanted some help deciding what security attributes to place on an event object intended to be used by multiple security contexts.

We have two processes, call them A and B, running in different security contexts. I have an event that process A creates and shares with process B. The only thing process A does with the event is signal it, and the only thing process B does with the event is wait on it. Our question is what ACLs you recommend for the event. For now, we're using O:BAD:(A;;GR;;;WD)(A;;GA;;;LS)(A;;GA;;;BA). (In case it matters, process A is usually running as a service with Local System privileges, though for testing purposes it may be running as local administrator. Process B runs as a service with Local Service privileges.)

For those who don't speak SDDL, that weird line noise is shorthand for

  • Owner: Builtin Administrators
  • DACL:
    • Allow Generic Read to Everyone (aka World).
    • Allow Generic All to Local Service.
    • Allow Generic All to Builtin Administrators.

Given the requirements, there is no need to grant Everyone any access at all, so we can delete the (A;;GR;;;WD) ACE.

Since process B needs only to wait on the object, granting it Generic All access is far too broad. That would allow process B to signal the event or even change its ACL! To wait on an object, all you need is Synchronize, so the second ACE can be tightened to (A;;0x00100000;;;LS). (There is no shorthand for Synchronize, so we use its hex value.)

The intention of the third ACE is to allow process A to signal the event, but for that all it needs is EVENT_MODIFY_STATE, not Generic All. But we can do better: We can delete the ACE entirely.

"But Mister Wizard, if you delete the third ACE, then process A won't be able to signal the event!"

Ah yes it can, thanks to a special feature of the Create­Event function:

The handle returned by Create­Event has the EVENT_ALL_ACCESS access right.

If you created the event, you get full access to the event regardless of what the ACLs on the event would normally say.

Therefore, the event can be ACL'd with simply O:BAD:(A;;0x00100000;;;LS). When process A creates the event, it needs to hold on tight to that event handle, since that is the process's only way of setting the event! (If it loses the handle, it won't be able to get it back because the attempt to reacquire the handle will be blocked by the ACL.)

Here's a quick program that demonstrates the behavior.

#include <windows.h> #include <sddl.h> #include <tchar.h> // This is a demonstration, so there is no error checking // and we leak memory. int __cdecl _tmain(int, TCHAR **) { ULONG cb; SECURITY_ATTRIBUTES sa = { sizeof(sa), NULL, FALSE }; // Create a security descriptor that grants access to no one. ConvertStringSecurityDescriptorToSecurityDescriptor(TEXT("D:"), SDDL_REVISION_1, &sa.lpSecurityDescriptor, &cb); // Create a handle with that security descriptor HANDLE h = CreateEvent(&sa, TRUE, TRUE, TEXT("NobodyCanAccessMeButMe")); // Even though nobody has access to the object, we can still // signal it using the handle returned by CreateEvent. SetEvent(h); // succeeds // But nobody else can obtain the handle via the object name. HANDLE h2 = OpenEvent(EVENT_MODIFY_STATE, FALSE, TEXT("NobodyCanAccessMeButMe")); // fails return 0; }

The customer wrote back, "This worked perfectly. Thanks!"

For bonus points, you can be even more specific and grant Synchronize access only to process B's service SID (NT SERVICE\Service­Name) rather than to all local services.

Getting Trusted Domain Computer Names

MSDN Blogs - Thu, 08/28/2014 - 07:00
The -replace '\..*', $domain snippet is in case here's some AD funkiness that returns the FQDN from the external DNS record instead of internal. Some of my labs expose machines to other labs. Dammit, Jim, I'm a lab admin, not the DNS guru. function Get-ComputerNameFromTrustedDomain { if ( ! ( Get-Command -Name Get-ADObject )) { Import-Module ServerManager ; Add-WindowsFeature RSAT; } # if (!(Get-Command -Name Get-ADObject)) Import-Module ActiveDirectory ; [ string []] $domains...(read more)

Azure BizTalk Services Hybrid Connections (技術預覽)

MSDN Blogs - Thu, 08/28/2014 - 05:56


感謝北科大劉建昌同學翻譯 微軟公司 Microsoft BizTalk 團隊主管  Harish Kumar Agarwal 於 2014 年 5 月 13 日所發表的文章

混合連接服務 (Hybrid Connection)

2014 年 5 月 Microsoft Azure 推出了一項新的技術預覽功能 : Azure BizTalk Services Hybrid Connections,使用 Hybrid Connections 服務可以輕易的在 Azure 上部屬一個混合式的應用程式。

Hybrid Connections 服務是 Azure BizTalk Services 上的一項功能,用戶只需要在 Azure入口管理網站上操作,即可讓您的 Azure Website 或是行動服務可以穿透防火牆連接自己本地資料中心內的資料與服務。除此之外,為了讓您可以輕鬆的體驗這項新服務,Microsoft Azure 目前提供免費體驗 Azure BizTalk Services Hybrid Connections 的方案。

Hybrid Connections 服務支援所有 Azure Websites 所支援的程式語言與框架( .NET, PHP, Java, Python, node.js )以及 Azure 行動服務所支援之後台程式語言 ( node.js, .NET ),也支援各種微軟公司或非非微軟公司之企業軟體應用系統 (LOB application),包含許多使用特定通訊協定 ( protocols ) 之應用程式。使用 Hybrid Connections 服務時,不需要去改變網路周邊的設定 ( 不需要配置 VPN 或是新增特定之防火牆連接埠)。它提供了企業系統管理人員能夠管理與控制混合式應用程式所使用之內部資源。

透過 Hybrid Connections 服務,Azure Websites 和行動服務上的程式碼能夠如同在企業內部網路般存取本地端的資源。也因為如此,應用程式系統管理員可以簡單且靈活地,將面對外部用戶前端服務層輕易地移往 Microsoft Azure,延伸既有企業應用程式成為混合式的應用模式。

使用 Hybrid Connections 服務來連接您的 Azure Websites 和本地端資源 :

1. 從 Azure預覽入口網站 選取您的網站,並且在操作介面中選取 Azure BizTalk Services Hybrid Connections 並且點擊新增

2. 選擇一個現有的 Hybrid Connections 服務,或是創建一個新的 Hybrid Connections 服務

a. 輸入 Hybrid Connections 服務以及主機名稱,並且設定連接本地端資源的連接埠

b. 使用現有或是創建一個新的 Azure BizTalk Services Hybrid Connections 服務實例

3. 點擊 OK

一旦連接創建好之後,其狀態將顯示為 "未連接" ( Not Connected )。若要完成連接建立,則須從任何本地端的 Windows Server 主機點擊連接

4. 選擇 Hybrid connection

5. 點擊 Listener Setup

6. 在 Hybrid Connections 連接的屬性頁面,選擇 "Install and configure",這個動作要求您做 Hybrid Connections 服務的權限設置

7. 設定完權限之後即完成 Hybrid Connections 服務的設定。

當 Hybrid Connections 服務的狀態顯示為 "已連接" ( Connected ),這就表示您的網站已經連接到本地端伺服器了。

行動服務則可以透過 Azure入口網站 進行配置 Hybrid Connections 服務。

1. 建立一個新的 BizTalk 服務,並且在 BizTalk 設定頁面上選取新增一個混合式連接 (Hybrid Connections)

2. 新增一個混合式連接

3. 選取您的行動服務,並且選擇混合式連線

4. 點擊新增混合連線,並且選擇與您的行動裝置建立連線的BizTalk服務以及混合連線

透過使用混合式連接,您現在可以在 Azure Website 或行動服務上使用相同的應用程式連接字串和 API。

舉例來說,若您要連接到一個本地端的 SQL server (

您在 Azure Website 或行動服務上可以使用相同的 SQL 連接字串 (“Data;Initial Catalog=payrollDB;User ID=<user>;Password=<password>”)

若想要了解更多關於混合式連接的資訊,請參照以下英文技術資源 :

· Overview: Hybrid Connections

· How-To: Connect an Azure Website with an On-Premises Resource

· Tutorial: Connect an Azure Website to an On-Premises SQL Server using Hybrid Connections

· Tutorial: Connect an Azure Mobile Services .NET Backend to an On-Premises Resource using Hybrid Connections

Azure BizTalk Services Hybrid Connections (技術預覽)

MSDN Blogs - Thu, 08/28/2014 - 05:56


感謝北科大劉建昌同學翻譯 微軟公司 Microsoft BizTalk 團隊主管  Harish Kumar Agarwal 於 2014 年 5 月 13 日所發表的文章

混合連接服務 (Hybrid Connection)

2014 年 5 月 Microsoft Azure 推出了一項新的技術預覽功能 : Azure BizTalk Services Hybrid Connections,使用 Hybrid Connections 服務可以輕易的在 Azure 上部屬一個混合式的應用程式。

Hybrid Connections 服務是 Azure BizTalk Services 上的一項功能,用戶只需要在 Azure入口管理網站上操作,即可讓您的 Azure Website 或是行動服務可以穿透防火牆連接自己本地資料中心內的資料與服務。除此之外,為了讓您可以輕鬆的體驗這項新服務,Microsoft Azure 目前提供免費體驗 Azure BizTalk Services Hybrid Connections 的方案。

Hybrid Connections 服務支援所有 Azure Websites 所支援的程式語言與框架( .NET, PHP, Java, Python, node.js )以及 Azure 行動服務所支援之後台程式語言 ( node.js, .NET ),也支援各種微軟公司或非非微軟公司之企業軟體應用系統 (LOB application),包含許多使用特定通訊協定 ( protocols ) 之應用程式。使用 Hybrid Connections 服務時,不需要去改變網路周邊的設定 ( 不需要配置 VPN 或是新增特定之防火牆連接埠)。它提供了企業系統管理人員能夠管理與控制混合式應用程式所使用之內部資源。

透過 Hybrid Connections 服務��Azure Websites 和行動服務上的程式碼能夠如同在企業內部網路般存取本地端的資源。也因為如此,應用程式系統管理員可以簡單且靈活地,將面對外部用戶前端服務層輕易地移往 Microsoft Azure,延伸既有企業應用程式成為混合式的應用模式。

使用 Hybrid Connections 服務來連接您的 Azure Websites 和本地端資源 :

1. 從 Azure預覽入口網站 選取您的網站,並且在操作介面中選取 Azure BizTalk Services Hybrid Connections 並且點擊新增

2. 選擇一個現有的 Hybrid Connections 服務,或是創建一個新的 Hybrid Connections 服務

a. 輸入 Hybrid Connections 服務以及主機名稱,並且設定連接本地端資源的連接埠

b. 使用現有或是創建一個新的 Azure BizTalk Services Hybrid Connections 服務實例

3. 點擊 OK

一旦連接創建好之後,其狀態將顯示為 "未連接" ( Not Connected )。若要完成連接建立,則須從任何本地端的 Windows Server 主機點擊連接

4. 選擇 Hybrid connection

5. 點擊 Listener Setup

6. 在 Hybrid Connections 連接的屬性頁面,選擇 "Install and configure",這個動作要求您做 Hybrid Connections 服務的權限設置

7. 設定完權限之後即完成 Hybrid Connections 服務的設定。

當 Hybrid Connections 服務的狀態顯示為 "已連接" ( Connected ),這就表示您的網站已經連接到本地端伺服器了。

行動服務則可以透過 Azure入口網站 進行配置 Hybrid Connections 服務。

1. 建立一個新的 BizTalk 服務,並且在 BizTalk 設定頁面上選取新增一個混合式連接 (Hybrid Connections)

2. 新增一個混合式連接

3. 選取您的行動服務,並且選擇混合式連線

4. 點擊新增混合連線,並且選擇與您的行動裝置建立連線的BizTalk服務以及混合連線

透過使用混合式連接,您現在可以在 Azure Website 或行動服務上使用相同的應用程式連接字串和 API。

舉例來說,若您要連接到一個本地端的 SQL server (

您在 Azure Website 或行動服務上可以使用相同的 SQL 連接字串 (“Data;Initial Catalog=payrollDB;User ID=<user>;Password=<password>”)

若想要了解更多關於混合式連接的資訊,請參照以下英文技術資源 :

· Overview: Hybrid Connections

· How-To: Connect an Azure Website with an On-Premises Resource

· Tutorial: Connect an Azure Website to an On-Premises SQL Server using Hybrid Connections

· Tutorial: Connect an Azure Mobile Services .NET Backend to an On-Premises Resource using Hybrid Connections

這篇文章原始發佈於「Microsoft Azure 中文部落格」

How to subscribe to Azure Notifications

MSDN Blogs - Thu, 08/28/2014 - 05:53

You can get notifications about Azure Status by subscribing to the RSS feed at Azure Status dashboard

It is possible to then subscribe to this feed via Outlook or any other RSS Reader.

SQL Server 2014 Setup Error: 'BIDS' is not a valid value for setting 'FEATURES'

MSDN Blogs - Thu, 08/28/2014 - 05:37
SQL Server Data Tools (a.k.a. SSDT) used to part of product installation media in SQL Server 2012. We can install it by selecting "SQL Server Data Tools" from shared features section. Alternately we can install it using SQL Server 2012 setup.exe using command prompt setup.exe /QUIET /IACCEPTSQLSERVERLICENSETERMS /ACTION=Install /FEATURES="BIDS" /INDICATEPROGRESS=True. But in SQL Server 2014, BIDS option is not available to install as a feature, even installation guide documentation...(read more)

VBA - Access 2013 - Programmatically assigning a Form's (DAO RecordSet) Record Source to the result of Stored Procedure (ADO RecordSet) executed on a remote SQL Server triggers “Run time error 31 – Data provider could not be initialized” error message.

MSDN Blogs - Thu, 08/28/2014 - 04:35

Suppose we have this scenario where a local Access database uses Forms bound to SQL server

data sources:

-  a company has developed a front-end application based on MS Access 2007 and VBA, which has been
   distributed to end-users as an ADP file;

-  its back-end data source runs on SQL Server;

-  on the client side, the front-end Access application contains Forms and they are programmatically bound to
   ADO RecordSets;

-  in turn, those RecordSet objects get populated with data when Access is invoking a Stored Procedure on the
   SQL Server;

-  end-users can sort the client-side Access Forms without any problems in Access 2007 and 2010;  

-  however, when migrating to Office 2013 it was found that attempting to sort the bound Forms triggers this
   runtime error:

 "Data provider could not be initialized"  

-  on the other side, if those Forms are bound to a  ADO RecordSets which retrieve their values directly from a
   SQL Table, then sorting also works as expected in Access 2013;

Steps to reproduce the issue:

  1.  create a new SQL database;
  2.  insert a new Table and save it with some name (example: 'dbo.tblSourceData');
  3.  populate the Table with values:

4.  create a new Stored Procedure named 'dbo.TestSP_SQLServer'; Paste this code:

     SELECT * FROM dbo.tblSourceData;

test your Stored Procedure to verify that it returns the expected results:

make sure your SQL server is accessible from the outside: enable SQL Server Browser service, create Firewall
     rules to allow SQL to be visible on the network, grant remote access to your account;

  [these steps are for preparing the client-side Form]

7.  switch to a client machine running Office 2010; Create a new Access Database;
8.  create a blank Form, then save it as: 'frmSQL_StoredProc_SourceData';

  we want to display our Form in a tabular layout, so we'll have to enter Design mode, then select the top-level
     window border, go to its 'Property Sheet', and from the 'Format' tab click on the 'Default View' drop-down
     and select 'Datasheet'; 

      Alternatively, you can create a Table with the 'DataSheet' view selected by default by going to the 'Create'
      tab, then to 'More Forms' drop-down and selecting 'Datasheet';

at this point we'll need to add a few TextBox controls into our blank Form; Our SQL table has 7 columns
       therefore we'll add 7 items;
11.  these controls are currently not bound to any data source, so we have to bring up the Property Sheet for
       each of them, then go to the 'Data' tab where we have to write a string value corresponding to the name
       of the SQL Table column a particular TextBox control is bound to;  

12.  from the VBA code editor window, go to 'Tools', 'References' and insert a reference to 'Microsoft ActiveX 
       Data Objects 6.1 Library', then paste this code inside a new Module:  

Note: I am using SQL Native Client 2012 to connect to a SQL 2012 back-end server.

Sub Test()

Dim o_rs          As New ADODB.Recordset
Dim connectionStr As String
Dim connection    As ADODB.connection
Dim cmd           As ADODB.Command

' (Using Connection
'String Keywords with SQL Server Native Client)

connectionStr = "Provider=SQLNCLI11.1;" & _
                "Server=CRISTISQL2;" & _
                "Initial Catalog=TestStoredProcedure;" & _
                "User ID=sa;" & _

Set connection = New ADODB.connection
connection.ConnectionString = connectionStr

Set cmd = New ADODB.Command
cmd.ActiveConnection = connection
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "TestSP_SQLServer"

Set o_rs = New ADODB.Recordset

'the following line is needed to avoid a runtime error when attempting
'to programmatically bind the Form to the 'o_rs' RecordSet object:
' Run-time error '7965':
' The object you entered is not a valid Recordset property.

o_rs.CursorLocation = adUseClient

o_rs.Open "TestSP_SQLServer", connection, adOpenKeyset, adLockOptimistic

DoCmd.OpenForm "frmSQL_StoredProc_SourceData", acFormDS, , , acFormEdit, acWindowNormal

Set [Form_frmSQL_StoredProc_SourceData].Recordset = o_rs
DoCmd.OpenForm "frmSQL_StoredProc_SourceData", acFormDS

'Display the data we fetched from SQL in the VBA Immediate window:

Dim item_fld As Variant
Dim strCols As String
strCols = ""
For Each item_fld In o_rs.Fields
    strCols = strCols & item_fld.Name & vbTab
Debug.Print strCols

Dim strItems As String
strItems = ""
Do While Not o_rs.EOF
    strItems = o_rs(0).Value & vbTab & o_rs(1).Value & vbTab & o_rs(2).Value
    Debug.Print strItems
    strItems = ""

End Sub

  execute the code .. your Form should display these records:

14.  right-click on any Column, then click on 'Sort A to Z' or 'Sort Z to A';

Everything works in Office 2010 ... however step #14 fails when running Access 2013 our action will result in
this error message:


Why do we get this error?

It seems that this is not supposed to work ...

I have discussed with a senior Escalation resource from the MS Access support team and I've been told that
internally an Access Form's RecordSet object is built on a design inherited from DAO (for more information
see: - Data Access Technologies Road Map).

In our scenario, we are working with ADO Recordsets connected to SQL, therefore these are not native
Access data objects. Our internal database contains lots of entries for the "Data provider could not be
initialized" error when sorting, filtering, refreshing or requerying ADO Recordsets pointing at SQL Tables
and over the course of time customers have requested a fix.

The Access Product Group carefully evaluated this behavior and decided not to provide a fix up to this in point
in time. This is due to the complexity of the changes that would have to be made in the product (very high dev
and test costs) to fully support ADO Recordsets.

ADO Compared with RDO and DAO

ADO isn't automatically code-compatible with your existing data access applications. While ADO encapsulates the functionality of DAO and RDO, you must convert many of the language elements over to ADO syntax. In some cases, this will mean only a simple conversion of some functions of your existing code. In other cases, it might be best to rewrite the application using ADO's new features.

DAO (Data Access Objects) was the first object-oriented interface that exposed the Microsoft Jet database engine (used by Microsoft Access) and allowed Visual Basic developers to directly connect to Access tables - as well as other databases - through ODBC. DAO is suited best for either single-system applications or for small, local deployments.

RDO (Remote Data Objects) is an object-oriented data access interface to ODBC combined with the easy-to-use style of DAO, providing an interface that exposes virtually all of ODBC�s low-level power and flexibility. RDO is limited, though, in that it doesn't access Jet or ISAM databases very well, and that it can access relational databases only through existing ODBC drivers. However, RDO has proven to be the interface of choice for a large number of SQL Server, Oracle, and other large relational database developers. RDO provides the objects, properties, and methods needed to access the more complex aspects of stored procedures and complex resultsets.

ADO is the successor to DAO/RDO. Functionally ADO 2.0 is most similar to RDO, and there's generally a similar mapping between the two models. ADO "flattens" the object model used by DAO and RDO, meaning that it contains fewer objects and more properties, methods (and arguments), and events. For example, ADO has no equivalents to the rdoEngine and rdoEnvironment objects, which exposed the ODBC driver manager and hEnv interfaces. Nor can you currently create ODBC data sources from ADO, despite the fact that your interface might be through the ODBC OLE DB service provider.

Much of the functionality contained in the DAO and RDO models was consolidated into single objects, making for a much simpler object model. Because of this, however, you might initially find it difficult to find the appropriate ADO object, collection, property, method, or event. Unlike DAO and RDO, although ADO objects are hierarchical, they are also creatable outside the scope of the hierarchy.

It should be noted, however, that ADO currently doesn't support all of DAO's functionality. ADO mostly includes RDO-style functionality to interact with OLE DB data sources, plus remoting and DHTML technology.

In general, it's probably too early in the evolution of ADO to migrate most DAO applications (except possibly ones using ODBCDirect) to ADO right now, since ADO doesn't currently support data definition (DDL), users, groups, and so forth. If you use DAO only for client-server applications and don't rely on the Jet database engine or use DDL, however, then you can probably migrate to ADO now. Eventually, Microsoft will provide an ADO DDL component to aid in DAO-to-ADO migration and provide generic DDL support for OLE DB providers.


Finding a workaround...

There are two possible solutions:
  > use DAO instead of ADO to connect to SQL (but this is not a very good long term approach since DAO is
  > use linked Access Tables (on the client-side database application) and bind the Forms to those local data
     sources ( - How to bind Microsoft Access forms to ADO recordsets);

Designing and implementing the fix

We are going to implement the second workaround and for this purpose we will need to introduce these

[Server side]

   - a temporary Table has to be created dynamically in SQL; It will contain the output data obtained by running
     the Stored Procedure

     Note:  I started this article with the assumption that we were using a simple Access Form bound to a simple
     SQL Stored Procedure data source. But as you can imagine, in real life this scenario is more complex. The
     Stored Procedure takes several input Parameters and it executes a complex JOIN on several SQL Tables
 to return some results. Different users will work with different Parameter combinations, so we cannot store
     the Stored Procedure output values in an unique temp. SQL Table ... instead, each Access client will have
     its own unique temporary Table in SQL and will be responsible for cleaning it up when done;

   - since each Access client will have its own corresponding temporary Table in SQL, clients must have a way to
     send a String that uniquely identifies their data source; This means that the Stored Procedure will receive an
     input Parameter: [strSqlOutputTempTableName];

   - an additional input Parameter added to the SQL Stored Procedure will allow Access clients to select the SQL
     Table that is being queried: [strSqlSourceTableName]; As I wrote in the Note above, in real life scenarios 
      lots of other input Parameters may be added, since clients may want to execute JOINS between several
     Tables, use filter criteria ..etc;

   -  the Stored Procedure will be resaved as 'dbo.TestSP_SQLServer2'; 

USE TestStoredProcedure



                 @strSqlOutputTempTableName NVARCHAR(100),
                 @strSqlSourceTableName NVARCHAR(100)
 DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10)
 SET nocount on

 SET @SQLQuery = 'SELECT * INTO ' + 
                 CAST(@strTmpOutputTableName As NVARCHAR) + @NewLineChar +
                 'FROM ' + CAST(@strSourceTableName As NVARCHAR) + ';'
 EXEC (@SQLQuery)
 -- EXEC parameter needs to be enclosed in "( )", else we get this error:
 -- "Could not find stored procedure 'CREATE TABLE ..."



      Before switching to the client side, go ahead and execute the new Stored Procedure in SQL to make sure
      everything is OK ..

exec dbo.TestSP_SQLServer2 @strTmpOutputTableName = 'tmpTbl',
                                                  @strSourceTableName        = 'tblSourceData';

      .. this should be your output:


[Client side]

   - we'll start by generating an unique name to be able to identify the temporary Table from SQL (for
     demonstration purposes my code uses the machine name and a time stamp): 



Dim oShell As Object

Set oShell = CreateObject("WScript.Shell")

strSqlOutputTempTableName = "tmp_" & _ 
Replace(oShell.ExpandEnvironmentStrings("%ComputerName%"), "-", "_") & "_" & _
Format(Now, "yyyymmddhhms")

Set oShell = Nothing

   - the temporary SQL Table gets created when we invoke our SQL Stored Procedure using this VBA function:

Sub Execute_SQL_StoredProc(strSqlStoredProcName As String,
                           strSqlOutputTempTableName As String,  
                           strSqlSourceTableName As String)

Dim m_cnnStr        As String
Dim m_cnn           As New ADODB.Connection
Dim m_cmd           As New ADODB.Command
Dim m_rst           As New ADODB.Recordset
Dim tmpRowsAffected As Long

'SQL Native Client 2012
m_cnnStr = "Provider=SQLNCLI11.1;" & _
           "Data Source=CRISTISQL2;" & _
           "Persist Security Info=False;" & _
           "Initial Catalog=TestStoredProcedure;" & _
           "User ID=sa;" & _

'"Integrated Security=false;"

'When you try to open an ActiveX Data Objects (ADO) connection, you may receive
'the following error message:
' > Run-time error '-2147217887 (80040e21):'
' > Multiple-step OLE DB operation generated errors. Check each OLE DB
'   status value, if available. No work was done.

m_cnn.Open m_cnnStr
m_cmd.ActiveConnection = m_cnn 

m_cmd.CommandText = strSqlStoredProcName
m_cmd.CommandType = adCmdStoredProc

- DataTypeEnum

- CreateParameter Method (ADO) 

m_cmd.Parameters.Append m_cmd.CreateParameter("@strSqlOutputTempTableName",

m_cmd.Parameters.Append m_cmd.CreateParameter("@strSqlSourceTableName", 

m_cmd.Execute tmpRowsAffected     

' - How To Determine Number of Records Affected by an ADO UPDATE

Debug.Print vbNewLine
Debug.Print "[Execute_SQL_StoredProc] SQL stored procedure completed."
Debug.Print " > SQL StoredProc name:        " & strSqlStoredProcName
Debug.Print " > SQL output Temp table name: " & strSqlOutputTempTableName
Debug.Print " > SQL source table name:      " & strSqlSourceTableName
Debug.Print " > Rows affected:              " & tmpRowsAffected

End Sub

   -  for the next step, we are linking the temporary SQL Table to a local one created inside the Access client;
      In turn the local Table gets programmatically set as data source (ADO RecordSet) for a local Access Form
using this VBA function:

Sub CreateLocal_SQL_TempLinkedTable(strSqlOutputTempTableName As String)

If Len(strSqlOutputTempTableName) = 0 Then
    MsgBox "Error![CreateLocal_SQL_TempLinkedTable] function didn't receive" & _ 
           "a valid SQL server table name!"
    Exit Sub
End If

Dim dbCurr As Database, dbLink As Database
Dim tdfLocal As TableDef

' How to create a DSN-less connection to SQL Server for linked tables in Access

Dim td               As TableDef
Dim stConnect        As String

Dim stLocalTableName As String 'Name of the table that you are creating in
                               'the local Access 

Dim stRemoteTableName As String 'Name of the table that you are linking to on
                                'the SQL Server database

stLocalTableName  = strSqlOutputTempTableName & "_ExternalLink"
stRemoteTableName = strSqlOutputTempTableName 

'delete any existing linked SQL tables

For Each td In CurrentDb.TableDefs
    Debug.Print "  > Checking table [" & td.Name & "] .."

    If td.Name = stLocalTableName Then
       Debug.Print "    Table found and deleted!"
       CurrentDb.TableDefs.Delete stLocalTableName
    End If

'//WARNING: This will save the username and the password with the linked table

'SQL Native Client 2012

stConnect = "ODBC;DRIVER=SQL Server Native Client 11.0;" & _
            "SERVER=CRISTISQL2;" & _
            "APP=Microsoft Office 2013;" & _
            "DATABASE=TestStoredProcedure;" & _
            "User ID=sa;" & _

'Microsoft OLEDB Provider for SQL Server
'stConnect = "ODBC;DRIVER=SQL Server;" & _
'            "SERVER=CRISTISQL2;" & _
'            "DATABASE=TestStoredProcedure;" & _
'            "UID=sa;" & _
'            "PWD=123;"

Set td = CurrentDb.CreateTableDef(stLocalTableName, 

CurrentDb.TableDefs.Append td

Set Form_frmSQL_StoredProc_SourceData.Recordset =

Set td = Nothing

End Sub

   - all we need now is a way to trigger our code and to cleanup the temporary Tables when we are done; We will
     use the Form_Load and Form_Close events:  

Option Compare Database

Private strSqlOutputTempTableName As String

Private Sub Form_Close()
  DoCmd.DeleteObject acTable, strSqlOutputTempTableName & "_ExternalLink"
End Sub

Private Sub Form_Load()

Dim oShell As Object
Set oShell = CreateObject("WScript.Shell")

strSqlOutputTempTableName = "tmp_" & _
Replace(oShell.ExpandEnvironmentStrings("%ComputerName%"), "-", "_") & "_" & _
Format(Now, "yyyymmddhhms")

Set oShell = Nothing

Execute_SQL_StoredProc "dbo.TestSP_SQLServer2",

CreateLocal_SQL_TempLinkedTable strSqlOutputTempTableName

End Sub


That's it :-) !

If you have done everything correctly, then once you double-click on your unbound Access Form, it should be
populated with data.

Moreover, if you click on the Navigation Panel and press F5 to refresh it, you will notice that a new linked
Table object has appeared.



Now switch to the SQL server and see that a Table got created there as well.

Note: my sample code will not clean up temporary Tables from SQL .. you will have to implement this




Please note that the code I have offered is just a proof of concept and should not be put into
production without a thorough testing!

Microsoft is not responsible if your users will lose data because of this programming solution.
It’s your responsibility to test it before deployment in your organization.


We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that. You agree:
(i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded;
(ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and
(iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Code.


Thank you for reading my article! If you have liked it, please use the rating button.
Bye :-)


P.S. Things at work are very busy these days, so I can't always manage to reply to your comments as fast
       as I'd like. If you need help with understanding or getting something in my blog to work, just drop me
       an email at cristib-at-microsoft-dot-com. 


Das neue Surface Pro 3 ist da - perfekt für Schule und Studium

MSDN Blogs - Thu, 08/28/2014 - 04:14

Ab heute ist Surface Pro 3 auf dem deutschen Markt erhältlich: Kunden erhalten alle fünf Varianten der neuen Surface Generation und das Surface Pro Type Cover bei ausgewählten Fachhändlern. Die Surface Pro 3 Docking-Station wird Mitte September auf dem deutschen Markt verfügbar und ist bis dahin über den Microsoft Store vorbestellbar.

Surface Pro 3 ist ein Gerät aus dem High-End Segment für den mobilen Einsatz, das die Leistung und Produktivität eines vollwertigen Laptops mit der Mobilität eines Tablets vereint. Die neue Surface Pro Generation ist insgesamt deutlich leichter und dünner als der Vorgänger sowie mit einem neuen, stufenlos verstellbaren Kickstand ausgestattet. Zudem kommt das Gerät mit einem hochauflösenden 12-Zoll Clear Type Full HD Plus Display, zwei 5 Megapixel HD-Kameras (vorne und hinten) und mit einer verbesserten Akkulaufzeit von bis zu neun Stunden. Darüber hinaus bietet das mobile Device moderne Anschlüsse für schnelles und einfaches Datenübertragen.

Mit der neuen Surface Pro Generation gibt es auch eine Reihe neues Zubehör, mit dem Surface Nutzer noch flexibler und produktiver arbeiten. So ermöglicht der neue Surface Pen mit einer verbesserten Drucksensibilität ein noch natürlicheres Schreiberlebnis. Nur ein Druck auf den Pen öffnet OneNote und Notizen können direkt dort ablegt werden. Mit dem Surface Pro Type Cover wird das Tablet durch Andockung an das Gerät mit nur einer Bewegung zu einem vollwertigen Laptop inklusive Tastatur. Die Surface Pro 3 Docking-Station erlaubt es den Nutzern, das Gerät als ein vollwertiges Desktopsystem zu nutzen, indem diese umfassende Schnittstellen bereitstellt.

Bildungseinrichtungen können das Surface Pro 3 bei diesen Handelspartnern bestellen.

(Please visit the site to view this video)

How digital democracy – and the digital divide – could shape the future of UK politics

MSDN Blogs - Thu, 08/28/2014 - 04:09

Technology has the potential to transform parliamentary democracy in the UK. But what will that transformation look like? To find out, Microsoft partnered with Model Westminster and the Parliamentary Outreach Service on an event introducing young people to the policy making process. It was an amazing opportunity to hear first-hand what our digital natives are thinking and feeling about the future of democracy – and an eye-opening look at the challenges ahead.

The attendees – about 70 people between the ages of 15 and 25 – defined ‘digital democracy’ as using technology to make it easy and appealing for individuals to get involved in the democratic process. Accountability, ease of access and transparency were recurring themes throughout the day. Students said they wanted government provide more access to elected officials through channels such as Skype and social media, as well as greater online access to information about where their tax is being spent. "The event was a fine example of what can be achieved when organisations from the public, private and voluntary sector work together to enable our students to have a direct say on issues of democracy in the UK,” said Ayath Ullah, Chief Operating Officer of Model Westminster.  

Of course, the democratic process is not going to change overnight. Government practices are steeped in tradition and often slow to change. Technology, however, does change overnight – and so it offers a unique lever for a generation of digital natives to increase the responsiveness and accountability of our democracy.

But before technology can empower government, we need to make sure access to that technology is truly democratic. Incredibly, some 6.4 million Brits over the age of 15 still don’t use the Internet, with a further 9.5 million only having basic digital skills. And with 90% of jobs requiring digital skills by 2015, it’s not just a question about how we create digital democracy, but it’s also about addressing the digital divide.

Microsoft is taking a holistic approach to the issue. With a dedicated UK public sector team, we work with a number of major government departments to help them use technology to empower their people to be more effective in their work. But we’re also addressing the digital skills gap by partnering Get Online @ Home, which provides free PCs to people signing up for broadband service.

Our responsibility is to ensure technology is available to all, and continues to help people engage in the things that matter to them. And for the group of exceptional young people involved with Model Westminster, many of whom will be future civil servants and politicians, digital democracy matters.

Sale: Save up to 55% on all books and eBooks

MSDN Blogs - Thu, 08/28/2014 - 04:00

Now is the time to load your library with new and top-selling titles from Microsoft Press – the more you buy, the more you save!

Buy 1, Save 35% | Buy 2, Save 45% | Buy 3 or more, Save 55%

At, enter code SAVEONPRESS during checkout to apply discount. Complete details are listed here. Offer ends September 3, 2014.

Office 365 から Lync 2013 をオフライン インストールできない

MSDN Blogs - Thu, 08/28/2014 - 02:11

こんばんは、Lync サポートのワトソンです。

最近お客様からよく、Office 365 を利用しているときに Lync 2013 をストリーミング


1. プロキシ環境であるため、インストールができない。

Office 365 のインストーラの場合は Winhttp を利用するため、

もし、厳しく制限されている環境である場合、WPAD で Proxy 設定を配布していない限り、以下のようなコマンドで手動で設定する必要があります。


例: netsh winhttp set proxy


でも、すべての PC で手動設定をするのも時間がかかりすぎる!!

2. すべての PC でインストールするために、データをダウンロードをしたくない。



1. Office のインストール ソースを保管するためのネットワークシェアを作成します。
例: \\server\Office15
2. 以下のサイトより Office Deployment Tool を取得します。

3. ダウンロードした OfficeDeploymentTool.exe を選択し、ファイルの出力先として 1 で作ったネットワークシェアを選択します。

4. こちらのフォルダー内にある Configuration.xml ファイルを notepad.exe で開きます。

5. ファイルを以下のサンプルのようにカスタマイズします。
この場合、 32 Bit の Lync 2013 クライアントの 日本語版がインストールされます。


  <Add SourcePath="\\Server\Share\" OfficeClientEdition="32" >
    <Product ID="Lync">
      <Language ID="ja-jp" />


▲ 英語版や 64 BIT 番への変更を含むその他の Office 製品とのインストールの詳細なオプションに関しましては以下の URL をご参照下さい。

6. ファイルを保存します。

7. 以下のコマンドを実行し、上記で設定した Office のソースをダウンロードします。
\\server\Office15\setup.exe /download \\server\Office15\Customconfigfile.xml
▲ ダウンロードが終了するまでお時間がかかる場合がございます

8. 端末にインストールを行う最、対象の端末で管理者権限のコマンドプロンプトを開き、以下のコマンドを実行します。
\\server\Office15\setup.exe /configure \\server\Office15\Customconfigfile.xml

▲ インストールが完全に終了するまで必ず PC を再起動しないようお願いいたします。
もし、再起動した場合で再度インストールを行うにあたり、エラーが発生した場合、以下のページより FixIt ツールを取得していただきアンインストールを行う必要がございます。


引き続き、快適な Lync ライフをお楽しみください。

Fire skarpe om Surface Pro 3

MSDN Blogs - Thu, 08/28/2014 - 01:41

I dag lander Surface Pro 3 i butikkerne – hvad skal du især glæde dig til, og hvorfor bør du overveje den som din næste laptop? Vi har stillet fire skarpe til Surface-chefen, Martin Thorning Hansen.



Hvad glæder du dig særligt over ved dagen i dag?
Vi er nu klar til at præsentere den tredje generation af Surface – og jeg synes virkelig, der er sket meget siden den første generation. Jeg synes, vi med Surface Pro 3 kan præsentere den perfekte kombination af en letvægts-laptop og en tablet, som på den ene side er det perfekte arbejdsredskab og på den anden side inviterer til ”leg”. Vi har set er par anmeldelser i den danske presse allerede – og deres dom har været overvældende god. Nu er jeg spændt på at se, om brugerne er enige!


Hvad er ifølge dig de største nyheder i Surface Pro 3?
Skærmen er klart den største nyhed. Surface er vokset til 12” og det gør alverden til forskel, når man bruger Surface Pro 3 som arbejdsredskab. De tidligere generationer af Surface var 10”, og det var ganske enkelt for småt for mange, når man gerne vil bruge Surface som en ”rigtig” laptop. Og selvom Surface Pro 3 er blevet større på dimensionerne, er den samtidig blevet lettere og slankere. Det betyder meget, når man, som jeg, er meget på farten i løbet af dagen.

Den medfølgende pen er også virkelig genial – med den bliver Surface Pro 3 et ret unikt arbejdsredskab for mange. Integrationen til OneNote gør Surface Pro 3 til det perfekte noteredskab, hvis man er typen, som tager håndskrevne noter. Og hvis man arbejder kreativt med grafik og tegnekunst, så har man lige pludselig en tegneplade med virkelig høj præcision integreret direkte i sin computer, og det åbner op for nogle ret spændende og nye brugerscenarier.  

Endelig er Surface Pro 3 blevet meget mere fleksibel og brugervenlig, fordi vi har designet Kickstand’en (integreret støttefod) helt anderledes her i tredje generation. Tidligere var der begrænsede indstillinger, så hældningen på skærmen var begrænset. Nu kan man indstille den fuldstændigt frit – det betyder rigtig meget for brugervenligheden og ”laptop-fornemmelsen”.


Hvem skal købe Surface Pro 3?
Hvis man er typen, som er meget på farten og gerne vil have sin laptop ved hånden, så er Surface Pro 3 en fornøjelse at have med, fordi den vejer så lidt (lige under 800 gram) – og så fylder den jo også en del mindre, end langt de fleste letvægts-laptops på markedet. Og hvis man også er typen, der ofte har både en laptop og en tablet med sig i tasken, så er Surface Pro 3 et særligt fedt produkt – fordi man får begge dele i én enhed.

Og så kan man jo købe Surface Pro 3 i flere konfigurationer. Den billigste model kommer med en Core i3-processer, hvilket er fint til f.eks. en studerende, som har brug for en laptop til skriveopgaver og den slags i skoleregi – og som i fritiden bruger den til Netflix, webbrowsing, sociale medier og anden underholdning. Den dyreste model kommer med en Core i7-processer og 8 GB RAM – som jo nok henvender sig mest til det professionelle segment, hvor der skal køres tunge programmer og særlige line-of-business apps. Og hvis man har en arbejdsdag, der både foregår ved skrivebordet og rundt omkring til møder, kan man kombinere Surface Pro 3 med dockingstationen – så har man, synes jeg, den ultimative arbejdsmaskine.


Beskriv Surface Pro 3 med én sætning?
Surface Pro 3 er en laptop og tablet i én.


Surface Pro 3 kan købes i dag via Microsoft Store og i butikker landet over, herunder hos Bilka, ComputerCity, Elgiganten, Expert og FONA. Erhvervskunder kan købe Surface Pro 3 hos Atea, Dustin, KMD og SoftwareONE. Læs mere om Surface Pro 3 på

Microsoft Danmark PR (

Use ADAL to Connect Your Universal Apps to Azure AD or ADFS

MSDN Blogs - Thu, 08/28/2014 - 00:51
New blog! more)

Neuerungen bei Azure SQL Database im September - neue Servicestufen und einfachere Preise

MSDN Blogs - Thu, 08/28/2014 - 00:39
Schon vor einiger Zeit (im April) wurden die neuen Service Stufen (Basic, Standard und Premium) des Azure SQL Database Service vorgestellt. Diese neuen Dienste werden nun im September allgemein verfügbar sein (General Availability). Neben Datenbankgrößen von bis zu 500 GB bieten die neuen Stufen unter anderem bessere Leistungsdaten und einen erweitertes service-level Agreement von 99,99 % Verfügbarkeit. Neben neuen Funktionen bieten die neuen Service Stufen eine vereinfachte Abrechnung mit monatlichen...(read more)

How to use OneNote in the Classroom (Video)

MSDN Blogs - Thu, 08/28/2014 - 00:30

In this video, Kim West, Microsoft Innovative Educator, explains how to use Windows 8 app OneNote to personalise learning with students.

(Please visit the site to view this video)

Monitoring your existing Applications

MSDN Blogs - Wed, 08/27/2014 - 23:35

Sometimes you want to monitor a web application that’s already installed and running – without updating the code or redeploying it. Maybe it has some kind of performance issues or is throwing exceptions and you need to apply instrumentation ASAP.

Now you can do that with Application Insights Status Monitor. Just by installing it on your server, you get performance telemetry right away, and you can add web tests too. If, later, you want to insert trace code or usage analytics, you can go back to the standard method of adding Application Insights to your app project.

[BTW - this applies to Application Insights in the Microsoft Azure Preview Portal, not the older version in Visual Studio Online – see this earlier blog for background]

To start, log in to Microsoft Azure. Click + to create an Application Insights resource.

Choose Quick start.

Scroll down past the first part of the Quick start blade, which is about the standard method of adding Application Insights to your app project in Visual Studio

Now you come to the new alternative approach, which starts on your IIS server machine (whether it’s a VM or an actual box):


Click the download link to get the Application Insights Status Monitor (the ‘agent’). Run it on the first server where your application is installed.  The first window you’ll see is the Web Platform Installer: 

Click through all the usual stuff:

Steps to enable a local IIS application for Application Insights:

1. Choose the local IIS application from the list on the left

2. Ensure the Application Insights resource that was created from the Azure Portal Preview is selected in the list. 

3. Click Add Application Insights

At this point, make sure that someone is using your app. If you don’t have a mass of raving fans, just log in to it yourself and use it a bit to generate some data.

Click Open in Microsoft Azure Portal. This should get you directly back to your Application Insights blade.


Application Insights blade shows your application’s response time, number of requests, slowest requests and failed number of requests.  Drill into these parts to see individual request metrics.

Next steps:

· Set up web tests to monitor your application’s availability from different locations around the world

· Collect and search trace logs to help diagnose issues

· Add client side JavaScript to enable Usage Analytics


Useful tips

  • Re-open the Status Monitor from the system tray

    You can also see update notifications there.

  • If you are a System Center 2012 R2 customer or using Application Insights from a Visual Studio Online account and have the Microsoft Monitoring Agent monitoring your application the Status Monitor can be used at enable the same application for Application Insights in Preview Portal.  Note: when Status Monitor includes the APM profiler this will no longer be the case and you will need to choose one. 
  • To change or create a new Application Insights resource for an application already sending telemetry data to Application Insights or for a new application choose Configure Settings

  • Look for different Notifications in the Notifications list.  For example if an application was deployed to the server and was already enabled for Application Insights using Visual Studio Update 3 this notifications will be displayed

Issues with Application Insights – 8/28- Investigating

MSDN Blogs - Wed, 08/27/2014 - 23:33

Initial Update: 8/28/2014 06:30 UTC

Application Insights team is investigating issue with data streaming services. Our monitoring reported unhealthy status by 8/28/2014 06:18 AM UTC. Customer will not be able to query data. We are analyzing logs and all data points to root cause the issue. We provide an update in next 2 hours or before when we understand the issue.

We apologize for any inconvenience.

-Application Insights Service Delivery Team

Azure SQL Database のサービス レベルが新しくなって 9 月に一般提供開始、より高度な SLA を低価格で提供

MSDN Blogs - Wed, 08/27/2014 - 22:30

このポストは、8 月 26 日に投稿した New Azure SQL Database service tiers generally available in September with reduced pricing and enhanced SLA の翻訳です。

先日の発表 (英語) に引き続き、今回、Azure のデータ サービスに関する新たな発表が行われました。これは、広範なデータ プラットフォームの一環として、Azure 上で連携の取れた豊富なデータ サ��ビスを提供するマイクロソフトの取り組みを表すものと言えます。9 月より、サービスとしてのデータベース (Database as a Service) を提供する Azure SQL Database のサービス レベルが新しくなります。これにより、クラウド アプリケーションのコスト パフォーマンスとビジネス継続性をさらに向上させることが可能になります。マイクロソフトは、プレビュー期間を通してお客様からのご意見に積極的に耳を傾け、一般提供に向けて改善を重ねました。そして、皆様のご要望にお応えすべく、従来よりも価格を抑えたサービス レベルを実現すると共に、新しいパフォーマンス レベルと時間単位での課金制度を導入します。さらに、99.99% の稼働率を保証する、より高度なサービス レベル アグリーメント (SLA) が採用されることになりました。


Azure SQL Database の新しいサービス レベル

4 月の発表では、Basic、Standard、Premium の各サービス レベルの導入についてお知らせしました。これらのサービス レベルは、一定のリソース群を提供することで、低い負荷はもちろん高い負荷のトランザクション アプリケーションにも対応する予測可能なパフォーマンスを実現し、また、アプリケーションのパフォーマンスが他のお客様のアプリケーションやワークロードの影響を受けることがないようになっています。今回の新しいサービス レベルでも、幅広いビジネス継続性機能と最大 500 GB という大容量のデータベース サイズが提供されます。また 4 月以来、機能の追加アップグレードの簡易化、最大 5 倍のパフォーマンスの向上といった改善を継続的に行ってきましたが、今回はさらに、皆様からのフィードバックを基に新たな変更が行われています。これらの変更について、以下にご説明します。

  • Premium および Standard レベルの料金の値下げ: 最終価格として、以前発表された料金に比べて最大 50% の値下げを行います。この料金改定によって、より多くのお客様がパフォーマンスとビジネス継続性の向上を実現できるようになります。
  • 新しいパフォーマンス レベル「S0」の導入: Standard サービス レベルで、新たに S0 というパフォーマンス レベルが提供されることになりました。低価格でエントリ向けのこの新しいレベルを導入することで、より多くのお客様に Standard サービス レベルの機能を活用していただけるようになります。パフォーマンス レベルとは、スループットの特定のレベルを指すもので、パフォーマンスのニーズに応じて高い値にも低い値にも簡単に調整できます。
  • 時間単位の課金制度: Azure SQL Database の新しいサービス レベルでは、時間単位での課金制が適用されるようになります。これにより、サービス レベルやパフォーマンス レベルを需要パターンに応じて柔軟に変更できるようになり、コスト効率と信頼性の高いパフォーマンスが得られます。


ビジネス運用に欠かせないワークロードが続々とクラウドに移行される中で、マイクロソフトは高可用性の重要性を強く認識しています。こうしたことから、Azure SQL Database の新しいサービス レベルでは、99.99% の稼働率を保証する、より高度な SLA を提供することになりました。


さらに、プレビュー期間中、数多くのデータベースと多様なパフォーマンス ニーズを抱える複数の ISV のお客様から、データベースのリソースを個別に管理するのではなく、データベース間でパフォーマンスのためのリソースを柔軟に共有できるようにしたいとのご意見を頂戴しました。たとえば、顧客ごとに個別の SQL Database を管理している一部の SaaS ISV のお客様は、データベースごとにアクティビティが異なるため、こうした複数の顧客データベース全体で特定の予算に基づいてリソース プールを管理できるようにしたいと考えていらっしゃいます。私たちは、今後のサービス更新の際に新たなサービス レベルによってこうしたシナリオにも対処できるようにしていきたいと考えています。同じような状況に置かれている ISV のお客様は、こちらのページ (英語) で登録を行い、詳しい情報をご確認ください。


次に、サービス レベルの概要と改定後の料金についてご説明します。

  • Basic: ワークロードの低いトランザクション アプリケーション向けに設計されています。
  • Standard: クラウド向けに設計されたビジネス アプリケーションの利用を開始するユーザーを対象とした、Microsoft Azure SQL Database の中心となるサービスです。Premium レベルと Basic レベルの中間のパフォーマンスとビジネス継続性機能を提供します。
  • Premium: ミッション クリティカルなデータベース向けに設計されています。Premium レベルでは、最高レベルのパフォーマンスが提供されるほか、高度なビジネス継続性機能を利用できます。






SLA で保証される稼働率

99.99% にアップ*


2 GB

250 GB

500 GB


7 日間以内の任意のポイント

14 日間以内の任意のポイント

35 日間以内の任意のポイント


代替の Azure リージョンへの地理リストア (Geo-restore)


アクティブ地理レプリケーション。最大 4 つの読み取り可能なセカンダリ


時間単位のトランザクション レート

分単位のトランザクション レート

秒単位のトランザクション レート

データベース スループット ユニット**

Basic: 5

S0: 10

S1: 20

S2: 50

P1: 100

P2: 200

P3: 800

パフォーマンス レベルおよび月額料金

Basic: 4.99 ドル

S0: 15 ドル

S1: 30 ドル

S2: 75 ドル

P1: 465 ドル

P2: 930 ドル

P3: 3,720 ドル

*99.99% の稼働率を保証する SLA は、SQL Database Web Edition または Business Edition には適用されません (これらのエディションには、99.9% が適用されます)



新しいサービス レベルは来月 (2014 年 9 月) より一般提供される予定であり、改定後の料金は 2014 年 11 月 1 日よりすべてのお客様に適用されます。現行のサービス レベルから移行されるお客様のために、現行の Web Edition および Business Edition の終了は 2015 年 9 月まで (新しいサービス レベルの一般提供開始より 1 年後まで) 延長されます。なお、Web Edition および Business Edition の終了に先立って、複数のデータベースにわたって DTU の割り当てをプールできる ISV 向けの新しいサービス レベルが提供される予定です。これをご利用いただくことで、ISV のお客様はスムーズな移行が可能になります。


Microsoft Azure のデータ サービス

Azure のデータ サービスでは、あらゆる種類のデータをシームレスに処理、管理、接続するための優れた方法をお選びいただけます。また、こうした各種サービスの更新を通じて、お客様がパフォーマンスのニーズを達成し、クラウドのコスト面でのメリットを活用できるようお手伝いします。Azure Virtual Machines で SQL Server を使用してデータベースを制御、管理する場合でも、あるいは、管理された「サービスとしてのリレーショナル データベース」を提供する Azure SQL Database をフル活用する場合でも、お客様が必要とする可用性とパフォーマンスを確実にご提供いたします。


ぜひ現行のサービスをお試しいただき、9 月に一般提供される新しいサービス レベルのご参考にしていただくことをお勧めします。今すぐ���料評価版をお試しください。

Serie: Eigene Anwendungen auf Microsoft Azure - Teil 5: Mobile Services

MSDN Blogs - Wed, 08/27/2014 - 22:27

Microsoft Azure bietet zur Ausführung eigener Anwendungen in der Public Cloud vier Optionen: Virtual Machines, Cloud Services, Websites und Mobile Services. Diese Blog-Serie gibt Hinweise zur Entscheidung für die zu einem konkreten Vorhaben beste Alternative, Die Serie ist unterteilt in 7 Teile:

Dieser Teil geht auf Mobile Services ein.

Konzept der Mobile Services

Mobile Services bauen auf der Website Plattform auf. Während Websites auf ganz allgemeine Web-Anwendungen abzielen, gehen Mobile Services eine Abstraktionsebene höher: Mobile Services sind spezielle Websites, die für den Einsatz als Backend für Mobile Anwendungen optimiert sind und damit eine sehr schnelle Umsetzung ermöglichen. Mitunter werden Mobile Services aufgrund dieser Eigenschaft der Servicekategorie BaaS (= Backend-as-a-Service) zugeordnet.

Mobile Anwendungen, d.h. leichtgewichtige Anwendungen, die auf mobilen Endgeräten ausgeführt werden, sind häufig über Backend-Services vernetzt. Über diese Dienste tauschen die einzelnen Clients Daten aus, speichern Daten, führen Authentifizierung durch etc. Microsoft Azure Mobile Services bieten eine Sammlung genau solcher, häufig benötigter Dienste auf Microsoft Azure an. Zu diesen Diensten gehören unter anderem folgende Funktionen:

  • Benutzerauthentifizierung (via Microsoft Account, Facebook, Twitter und Google ID) mit entsprechender Zugriffskontrolle bei Service-Aufrufen
  • Speicherung von Daten in Blob, Table, Queue Service oder SQL Database
  • Kommunikation via Service Bus
  • Push Notifications
  • Zeitgesteuerte Ausführung serverseitiger Skripte

Darüber hinaus ist es möglich, neben den Daten-basierten Schnittstellen (für das Schreiben, Lesen, Ändern, Löschen von Daten) eigene Schnittstellen mit in .NET oder JavaScript implementierter Funktionalität implementieren.

Die vorkonfigurierten Microsoft Azure Mobile Services können ohne größeren Programmieraufwand sehr einfach als Backend-Dienste für verschiedene Client-Umgebungen eingesetzt werden. Folgende Tabelle gibt einen Überblick über die derzeit unterstützten Client-Umgebungen und darüber, mit welcher Backend-Variante (.NET und/oder JavaScript) diese eingesetzt werden können.

Client-Umgebung Mobile Service in
JavaScript Mobile Service in
.NET iOS ● ● Windows Phone ● ● Windows Store C# ● ● Windows Store JavaScript ● ● Xamarin iOS ● ● Xamarin Android ● ● Android ● ● HTML ●   PhoneGap ●   Sencha ●   Appcelerator ●  

Es können Vorlagen für entsprechende neue Apps oder Code Fragmente für bestehende Apps aus dem Portal heruntergeladen werden. Die Entwicklung einfacher mobiler Anwendungen, die Cloud Dienste nutzen sollen, vereinfacht sich dadurch deutlich. In vielen Fällen können per Copy-Paste Datenbankzugriffe in der betreffenden Client-Umgebung implementiert werden.

Entwicklung von Mobile Services

Mobile Services basieren auf Websites. Die Implementierung kann entweder über JavaScript (dann wird als Grundlage eine vorkonfigurierte Node.js-Installation verwendet) oder über .NET (C#) (dann wird eine vorkonfigurierte ASP.NET-Umgebung als Grundlage verwendet) erfolgen. Bei der JavaScript-Variante können die Funktionalitäten direkt über das Portal eingegeben werden. Für einfachere Szenarien ist dies ideal.

Im Falle von .NET kann vom Portal eine Visual-Studio-Solution heruntergeladen werden. Diese basiert letztlich auf einer Website-Anwendung, d.h. sie enthält sämtlichen Code, der dann in Form eines Mobile Service ausgeführt wird. Damit hat ein Entwickler stärkere Eingriffsmöglichkeiten in die internen Abläufe. Die Solution kann (z.B. zu Testzwecken) auch lokal ausgeführt werden und dann via WebDeploy in einen Mobile Service auf Azure deployt werden.


Rein technisch gesehen, können die von Mobile Services abgedeckten Funktionalitäten auch mit Websites umgesetzt werden. Während bei Websites jedoch gewisser Programmieraufwand anfällt, wird dieser bei Mobile Services minimiert. In vielen Fällen können Backend-Zugriffe mit vorgefertigten Code-Fragmenten per Copy-Paste implementiert werden. Daher gilt die Regel:

  • Wenn für Mobile Anwendungen Backend-Dienste bereitgestellt werden sollen, sind Mobile Services erste Wahl, da hier die Entwicklerproduktivität mit Abstand am höchsten ist.

Für Funktionalitäten, die über Mobile Services nicht umgesetzt werden können, lassen sich Mobile Services mit anderen Ausführungsmodellen (Websites, Cloud Services, Virtual Machines) kombinieren.

Weitere Informationen

Informationen zu Mobile Services

Informationen zur allgemeinen Entscheidung für ein Ausführungsmodell

Debugging a linker error: error LNK2019

MSDN Blogs - Wed, 08/27/2014 - 22:06

I am back with one of the classic roadblocks on your way up to development . Linker errors! Well some times these can turn out to be time consuming. Although I am going to discuss one of the scenarios that wI worked on, the below can apply to most of the linker issues at least the approach. My senior colleague Scot Brennecke had been instrumental in helping us get to the depths of it . So let's get started, we were approached by one of developers about a linker error he was getting, this was a pretty old project. The error is LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup. He started getting this error after he started using Unicode in his project. The error means you do not have the main visible to the the linker. But you are editing the file with main or WinMain  in the VS Editor, 

               Although the error seems pretty straight forward . Almost all the red flags were checked and it did not some pretty obvious. This project is using /clr switch. All the project properties were synonymous with Microsoft recommendations. The application was GUI and as many social discussions suggest /subsystem:console did not apply . This project is using Unicode and adding entry point wWinMainCRTStartup(); in the Linker setting did not help. All the projects in solution(couple of dlls and MFC exe) used /subsystem:windows at Linker properties-> System . I also verified that all of the projects are using cdecl calling convention. We did query the developer if he was calling the main explicitly anywhere in the program , since this is an old project he did not have it top of his mind. I decided to capture link repro. For those of you who have not heard of link repro , link repro will help you reproduce the error on a remote machine. You just need link.exe to simulate it. The kb article speaks about link repro. This is specially good when you cannot have the entire project with us to debug , it creates a folder of required binaries to examine and repro the error. Below are the steps to collect link repro.


a) Create a folder c:\linkrepro

b) Go to Project ->Properties->Configuration Properties->Linker->CommandLine  /linkrepro:c:\linkrepro

c) Now build your project and reproduce the linker error in Visual Studio.

d) Go to the VS2010 command prompt and go the folder c:\linkrepro and then enter the command link @link.rsp, notice that you see the linker error there.

e) Copy the buildlog.htm into the linkrepro folder, zip up and upload to the following location


Step d is redundant, but for a more meticulous approach I have added it. Once I had the link repro on my machine. I started examining the headers, disassembly and directives . I used dumpbin to dump them out for all lib file and obj files in the link repro folder. In the disassembly I observed some thing strange , 4E3 00000000 UNDEF  notype ()    External     | ?WinMainCRTStartup@@$$J0YAXXZ (extern "C" void __cdecl WinMainCRTStartup(void)).

Considering that the project is now Unicode, something was bringing in “WinMainCRTStartup” even though tchar.h has #defined _tmainCRTStartup as wWinMainCRTStartup.  So, we searched through the binary contents of all the .lib and .obj files being linked(available in linkrepro).  Aside from the Microsoft CRT libraries (where we expect to see all variations mainCRTStartup, wmainCRTStartup, WinMainCRTStartup, and wWinMainCRTStartup), the only file where WinMainCRTStartup was found is myexe.obj.  This implies that the developer has either defined his own WinMainCRTStartup, or he is linking to that name directly, or has somehow undefined UNICODE so the tchar #define didn’t work.


We now have to examine his code in myexe , which is his GUI app(exe). I got a .i file for myexe.cpp. Here is how you can get a .i file. In the .i file I observed the belo

extern "C" void WinMainCRTStartup();


void MyMain()





There was a call to the start up function WinMainCRTStartup explicitly.
It may have been done in order to force it to be an STA thread, now that its Unicode we need to call wWinMainCRTStartup,.  Myexe project needs to specify MyMain as the entry point.  Voila ! After the changes linker error is no longer extant J. 


Subscribe to Randy Riness @ SPSCC aggregator
Drupal 7 Appliance - Powered by TurnKey Linux