官术网_书友最值得收藏!

Time for action – deploying an SSAS project

You've seen one of the ways of deployment in this chapter, which was deployment from SSDT. Deployment from SSDT can be easily done with a deployment option that can be set in the project's properties. There are other ways for deployment: deployment with Deployment Wizard and deployment with XMLA. In this example, we will change some deployment options in the SSDT project and also use the deployment wizard to deploy the project to an SSAS server by performing the following steps:

  1. In the Solution Explorer pane, right-click on a project and select Properties.
  2. In the project's Configuration Properties window, go to the Deployment tab. You can see some of the deployment options there, such as the server and database name.
    Time for action – deploying an SSAS project
  3. Close the project's properties window.
  4. Right-click on the project in Solution Explorer and build the project.
  5. Then, go to the project folder in Windows Explorer; under the bin folder, you will find four files. These files are deployment files that are created after a successful build action.
  6. Go to Start and under Microsoft SQL Server 2012, and under Analysis Services, click on Deployment Wizard.
  7. In the Deployment Wizard step, choose the Chapter 02 SSAS multidimensional.asdatabase file from the bin directory of the project.
  8. Set the server name and the database name. Note that the database will be created if the database name doesn't exist in that server. You can set the server as a localhost and the database name as Chapter 02 SSAS Multidimensional, which are deployed from the wizard (the database can hold one or more cubes, and each database can also have its own security model and a set of conformed dimensions).
  9. You can choose whether you want to keep partitioning on the destination database or you want to overwrite them with partitioning defined in this deployment kit. Leave this option as default.
  10. You can also choose to keep the existing roles and membership in the destination database or overwrite them with security settings in the deployment kit. Leave this option as the default.
  11. In the Specify Configuration Option tab, you can set the configurations, for example, the impersonation credential to connect to the source database.
  12. You can save the deployment script as an XMLA file. Don't create a script for this example.
  13. You can also choose a processing method after the deployment; for this example, choose default processing.
  14. After the deployment and processing step, open SSMS and you will see the new SSAS project created; you can browse the sales cube there to check it.

What just happened?

SSDT has configurations for deployment, such as the deployment server, the database name, and deploy in transaction (step 2). SSDT is a tool for developers and it is good for developers to deploy their projects to the development environment servers. However, in many scenarios, the production environment is not accessible for developers. So, you will have to use other methods of deployment.

Deployment Wizard is a deployment tool that will be installed with the SSAS service. There are four files required to deploy an SSAS project. These files can be created while building the project (step 4). Each file consists of specific information about deployment. The DBA or the gatekeeper of the production environment can easily run the Deployment Wizard and give the *.asdatabase file path (step 7); follow the steps in the wizard and deploy the project easily.

One of the main benefits of deploying the project with Deployment Wizard is that you can choose to retain roles and membership or retain partitioning on the destination database (steps 9 and 10). When you conduct deployment through SSDT, the partitioning and roles will be overwritten. This is an important option because in the production environment, partitioning might be set up in the database, and security and role settings might be different from the security configuration in the SSAS project in SSDT.

XMLA is the language for metadata scripts in SSAS. Running the deployment wizard will produce and run an XMLA command on the SSAS server. If you want to overlook all the wizard steps, you can create an XMLA deployment script (step 12), modify it as you wish to make it run on the production environment, and then just pass this script to the DBA and ask them to run it.

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

主站蜘蛛池模板: 赤壁市| 崇文区| 阿鲁科尔沁旗| 安丘市| 霍邱县| 江西省| 新田县| 松滋市| 淄博市| 民县| 株洲市| 古蔺县| 兴业县| 台南县| 和龙市| 含山县| 疏附县| 乳山市| 搜索| 林西县| 双江| 保康县| 方山县| 慈利县| 明星| 上蔡县| 综艺| 长岛县| 佛山市| 岢岚县| 西充县| 云和县| 马山县| 涟水县| 库车县| 晋中市| 颍上县| 邵东县| 沅江市| 蓬莱市| 常熟市|