- Getting Started with SQL Server 2012 Cube Development
- Simon Lidberg
- 793字
- 2021-08-06 16:48:54
Understanding data sources
In order to get started with the development of a cube, a connection has to be done to the underlying data source. SQL Server Data Tools contains a small wizard that will help users to create the correct type of connection.
To connect to the source, you need to specify the provider that should be used as well as the connection string needed to connect to the source. Analysis Services can be used against several different databases apart from SQL Server; in fact, it is one of the most common OLAP engines used with databases such as Oracle and DB2. To connect to a non-Microsoft database, you often need to install special drivers to be able to connect to the database.
Tip
Description of the supported databases and the necessary drivers is available at http://msdn.microsoft.com/en-us/library/ms175608.aspx.
When connecting to a Microsoft SQL Server database, there are several options available out of the box. By default, the providers are installed on a Windows system. However, you should use the SQL Server Native Client provider as this gives you the best performance when connecting to the SQL Server.
If you connect to third-party databases, make sure that you use OLEDB providers and not .NET providers as they have the best performance. Analysis Services is written in C++, and if you use a .NET provider, the process needs to switch from unmanaged code to managed code for every request that it does to the .NET provider.
When you define your connection, there are some important settings that you need to consider. The first one is how the server should authenticate to the data source. If you specify that you want to use Windows credentials, you have to decide which Windows account should be used.

In the preceding screenshot, the first option is to specify the Windows username and password that will be used when connecting to the data source. The second option is to use the service account; this is the account that starts the Analysis Services service. In many cases, this is what you use in production scenarios. If this is the option that you decide to go with, you need to create a database user for this account as well. Make sure that is of least privilege both from a Windows and database standpoint.
Tip
For more information on how to create a good service account for Analysis Services, please refer to the following link:
The third option will use the credentials of the current user, this is not supported for multidimensional databases except when you are dealing with local cubes and out-of-line bindings.
Tip
For a description of what a local cube is, refer to the following link:
http://msdn.microsoft.com/en-us/library/bb522640.aspx
More information about bindings can be found at http://msdn.microsoft.com/en-us/library/ms128523.aspx.
Inherit is a useful option. If you have several connections in your cube and you want to maintain the connection information in one place, you can define it on the database level in your project. The database is something that you do not see by default when you open your project in SQL Server Data Tools. But if you click on the Show All Files button in Solution Explorer, you will see a new file in your project that you can open. This file contains information that is common to all objects within the project. Here you can define security information that will be inherited by all other data source objects in your project. This is defined in the property called <DataSourceImpersonationInfo>
.
Tip
More information on how to set this property can be found at http://technet.microsoft.com/en-us/library/ms127690.aspx.
Creating the data connection
To create the data connection, perform the following steps:
- Right-click on the Data Sources folder in the Solution Explorer window.
- Choose the New Data Source option.
- The Data Source Wizard window will start with a splash screen and you need to click on Next.
- In the Define Connection screen, click on the New button to create a data source based on a new connection.
- In the Connection Manager screen, ensure that you have the Native OLE DB\SQL Server Native Client 11.0 provider selected.
- Specify the server name to your SQL Server relational database.
- Choose the Use Windows Authentication option as the method of connecting to the server.
- Select the database called
AdventureWorksDW2012
. - Your screen should look like the following screenshot:
- Click on OK to save the connection.
- Click on Next to fill in the impersonation information that Analysis Services will use to connect to the database.
- In the Impersonation dialog, specify that you want to use a specific user and password. In the example, I have used the administrator account on my test server.
- Click on Next and give the data source a name.
- Click on Finish to save the data source.
- Getting Started with Citrix XenApp? 7.6
- Practical Data Science Cookbook(Second Edition)
- 征服RIA
- Hands-On Microservices with Kotlin
- Python機(jī)器學(xué)習(xí)編程與實戰(zhàn)
- The HTML and CSS Workshop
- Instant Nancy Web Development
- Scratch趣味編程:陪孩子像搭積木一樣學(xué)編程
- Hadoop大數(shù)據(jù)分析技術(shù)
- C++ System Programming Cookbook
- 進(jìn)入IT企業(yè)必讀的324個Java面試題
- Java高并發(fā)編程詳解:深入理解并發(fā)核心庫
- Python趣味創(chuàng)意編程
- 3D Printing Designs:Design an SD Card Holder
- HTML5+CSS3+JavaScript案例實戰(zhàn)