Está en la página 1de 2

Copying HFM Applications On The Command Line

The command line version of the HfmCopyApplication utility - called HfmCopyAppCmd - is a useful but often overlooked tool. Some potential uses for HfmCopyAppCmd include:

Scheduled copies of HFM applications - for example monthly synchronization between Production and Development environments Scheduling long-running copy processes to get them performed during the night time Creating a batch file to copy several HFM applications in a sequence - useful for migrations

To use the utility you first need to create two database link (UDL) files - one for source and another for the target database (or Oracle schema).

Note that you need to select the "Allow saving password" for the utility to be able to access the databases. To keep your database passwords safe you can encrypt the UDL files using the EncryptHFMUDL tool. For more details about this see the HFM Admin Guide. Once you have the UDL files in place you are ready to run the HfmCopyAppCmd utility. The program can be found on the HFM application server in paths like C:\Hyperion\products\FinancialManagement\Server\HfmCopyApplication or C:\Oracle\Middleware\EPMSystem11R1\products\FinancialManagement\Server depending on your HFM version. It can be named either HfmCopyAppCmd.exe or HfmCopyAppCmd_x64.exe depending on the server architecture (32 or 64 bit). The most straightforward way to run the utility is shown below. The source application is SourceApp from database defined by source.udl, target application is called DestApp in database pointed to bytarget.udl.

HfmCopyAppCmd.exe -S="c:\path\to\source.udl" -s=SourceApp D="c:\path\to\target.udl" -d=DestApp

There are several options that can be used to change the way the applications are copied and as far I as remember anything you can specify in the CopyApp GUI tool can also be accomplished here. Some useful options include:

-r=Y/N - Replace destination app if it exists (default is Y) -o="<log file path>" - Default is HYPERION_HOME\logs\hfm\HfmCopyApp.log -Y="<years>" - Semi-colon delimited list of one or more years

Full list of the options can be found in the CopyApplication Readme File available on the Oracle Technology Network site. Here's an example of the kind of batch file I often use to migrate several applications from one environment to another: @CHOICE /c:YN /M "Start copying HFM applications?" @IF ERRORLEVEL 2 EXIT /B

cd /d C:\Hyperion\products\FinancialManagement\Server HfmCopyAppCmd_x64.exe -S="C:\Hyperion\products\FinancialManagement\HFM9.UDL" -s=CustmrMA D="C:\Hyperion\products\FinancialManagement\HFM11.udl" -d=CustmrMA -e=Y -r=Y -da=Y o="C:\Hyperion\logs\hfm\HFMcopy_CustmrMA.log" HfmCopyAppCmd_x64.exe -S="C:\Hyperion\products\FinancialManagement\HFM9.UDL" -s=CustmrFA D="C:\Hyperion\products\FinancialManagement\HFM11.udl" -d=CustmrFA -e=Y -r=Y -da=Y o="C:\Hyperion\logs\hfm\HFMcopy_CustmrFA.log" HfmCopyAppCmd_x64.exe -S="C:\Hyperion\products\FinancialManagement\HFM9.UDL" -s=HISTORY D="C:\Hyperion\products\FinancialManagement\HFM11.udl" -d=HISTORY -e=Y -r=Y -da=Y o="C:\Hyperion\logs\hfm\HFMcopy_HISTORY.log" Note: If you used HfmCopyAppCmd to create a new HFM application (not to overwrite the content of an existing one) you need to register the application to Shared Services before being able to use it. This can be accomplished by using the Register Application function found in EPM Workspace.