Code: Select all
rmdir /q /s c:\dimcopy
mkdir c:\dimcopy
set tm1directory=\\xxxxxxxxxxx\c$\Program Files\Cognos\TM1\Custom\TM1Data\TM1 Server - DevA backup
echo copying from %tm1directory%
echo dimension
xcopy "%tm1directory%\%1.dim" c:\dimcopy
echo excel version of dimension
xcopy "%tm1directory%\%1.xdi" c:\dimcopy
echo subsets
xcopy "%tm1directory%\%1}subs" c:\dimcopy\%1}subs /s /i
echo attributes cube...
xcopy "%tm1directory%\}ElementAttributes_%1.cub" c:\dimcopy
echo views on the attributes cube...
xcopy "%tm1directory%\}ElementAttributes_%1}vues" c:\dimcopy\}ElementAttributes_%1}vues /s /i
echo ... and dimension
xcopy "%tm1directory%\}ElementAttributes_%1.dim" c:\dimcopy
echo security
xcopy "%tm1directory%\}ElementSecurity_%1.cub" c:\dimcopy
echo locking
xcopy "%tm1directory%\}ElementProperties_%1.cub" c:\dimcopy
dir c:\dimcopy
I tried using .mdi but there does not seem to be a way that you can create an .mdi from an existing .dim.
I assume this will work ok where you have a test environment created from the live in September and then you need the dimension from live as at October. This assumes that the way the numeric array reference is generated remains the same. If elements have been deleted between September and October then I would guess they are not loaded into memory when the disk version of the cube is read in. If elements were added in any cube the cells are zeroed out for the new elements.
One thing I could never find was how TM1 translates a dimension element into some sort of numeric array reference. On the applix site there used to be an internals doco but that seems to have been removed.
Any comments gratefully appreciated.