Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CDM 10.2.1 –HOW TO RESTORE A DATABASE DEPLOYED ON A DIFFERENT APPLICATION SERVER This document is intended to describe the procedure for deploying Cognos Disclosure Management 10.2.1 on multiple environments. Version 1 Table of Contents Background Information ...................................................................................................................... 3 Chapter 1: Backing-Up and Restoring the CDM Database .................................................................. 4 Chapter 2: Creating a New Webservice ............................................................................................... 6 Background Information Before we begin, it is important to understand the current architecture of Cognos Disclosure Management when it comes to database deployment. The CDM database is first created at installation time and by default, it deploys one database. However, the user has the option to install the Cache/XBRL databases separately if required. More information about CDM Databases is shown below: CognosDM CognosDMCache CognosDMXBRL Contains all “Core” CDM Components Used mainly for Caching mechanism Contains all XBRL Components In addition to the above: a data encryption key (DEK) is created during installation and is compiled based off a master key (Specified in the installer) combined with machine information. This is a preemptive measure to prevent unauthorized users from restoring and connecting to the database via the CDM client. Each time the CDM Server is installed, it will encrypt the same database using that information. It is a necessary step to Export/Import the master key file as part of the process of moving a database from one environment to another. This is most apparent if Production/Development/UAT environments are required to be set up within a hosting system. Chapter 1: Backing-Up and Restoring the CDM Database 1. Export the master key from the source application server using the Encryption Tool. Once the key is exported, it can be used for the following: - Restoring into a new environment, the key will need to be applied. - Working with IBM support. In order to replicate an issue with the same database, it will be required so that the database can be restored in IBM environments. CDM comes with an Encryption Utility that allows users to create/encrypt/export master key files. Open the command prompt (be sure to run as Administrator). Navigate to the Tools folder in the website root. For example: cd c:\inetpub\wwwroot\CognosDM-Server\Tools\EncryptionTool Once there, execute the following command: Ibm.CognosDM.EncryptionTool.exe /EMK /cfgfile:<path to web.config> /o:<path to output location key.txt> Note: You only need to modify the location of the web.config file as well as the output location in this command. Replace the path for /cfgfile with actual location of your web.config file. The /o parameter specifies the output location. Replace the content after that with the location desired to export the key. Be sure to add the path including the file names. For Example: Ibm.CognosDM.EncryptionTool.exe /EMK /cfgfile:"C:\inetpub\wwwroot\CognosDMServer\Web.config" /o:"C:\Websites\Backup\key.txt" Once finished, press Enter. You should get a DONE message displayed in the command prompt. If there are any errors, it will most likely be regarding syntax. 2. Back up the MasterKey.txt file from the destination server. This will be your own master key you have set up. That way, any issues encountered we can still restore the original. 3. Back up the database at the source server. 4. Restore the database at the destination server. 5. Modify the Connection String file at the destination server to point to the newly restored databases. If the server name of the destination server is different, this will also need to be updated in the same file. ConnectionString can be found under the Config folder in your root webservice location. For Example: C:\inetpub\wwwroot\CognosDM-Server\Config Below screenshot shows what needs to be modified: 6. Restore the master key exported from the source server into the destination server. This will require command prompt as well so ensure you run command prompt as an Administrator. Once open, navigate to the same directory as in Step 1. For example: cd c:\inetpub\wwwroot\CognosDM-Server\Tools\EncryptionTool Once there, execute the following command: Ibm.CognosDM.EncryptionTool.exe /SMK /newkey:<path to exported masterkey> /keyformat:file /cfgfile:<path to web.config> Note: Replace the <path to exported masterkey> with the actual location of the exported key from Step 1. <path to web.config> will need to be replaced with the location of the web.config file. Ensure that the file paths include the name of the file as well. For Example: Ibm.CognosDM.EncryptionTool.exe /SMK /newkey:"C:\Websites\Backup\key.txt" /keyformat:file /cfgfile:"C:\inetpub\wwwroot\CognosDM-Server\Web.config" Once finished, press Enter. You will have received a similar message “DONE” to indicate the process is complete. Any errors that may appear will be due to syntax issue. After the command is executed, and is successful, you are now able to log into CDM using the newly restored database! Chapter 2: Creating a New Webservice Now that the database is deployed, a new web service will need to be created to support this new database. A manual process is required to add multiple web services on one Application Server. If the CDM webservice is not installed on the server the database was restored on, the normal CDM installation can be conducted instead, hence not requiring this step. The manual step is achieved by using the following steps: 1. After successful installation, the CDM Web Service should now be deployed on the directory specified in the installer. Copy and Paste the same directory deployed to the desired location. 2. Backup the original database from SQL server and Restore the same database into the desired environment (If not already done so above). Important: If the CDM Application Server installation was performed on a different physical machine than ensure that the steps in Chapter 1 have been completed before proceeding 3. Edit the ConnectionString file in the newly pasted folder to point to the required database as shown below: Note: If the SQL user credentials are specified, they may be encrypted. Ensure to use the CDM Encryption utility to encrypt/decrypt prior to executing this step. After editing the database and credentials, be sure to encrypt the username and password in this file. For more information, see Appendix A in the CDM 10.2.1 Installation Guide. 4. Convert the pasted web service folder into an ASP application using IIS Manager as shown below: Note: Ensure you select the appropriate Application Pool. It should be the same as the previously deployed installation. In this example, it will be CognosDMServerApplicationPool. Alternatively, you may create a separate application pool using the following Application Pool settings. 5. Ensure that Anonymous Authentication is enabled in IIS Manager if it is not already enabled. See screenshot below: Results: Once complete, it is good practice to check the Webservice URL in an Internet Browser to ensure that all necessary components of the web application are functioning correctly. See the following screenshot: Note: You may need to enable directory browsing in order to see the contents of the web application. This is achieved through the following interface on IIS 7/7.5: If there are further connection problems, please follow the CDM installation troubleshooting guide found in the IBM Support Portal.