COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => COGNOS Connection => Topic started by: lifzgud on 28 Jun 2010 07:02:56 AM

Title: Migrating Reports from Development to Production with different table names
Post by: lifzgud on 28 Jun 2010 07:02:56 AM
Hi all,
I am currently in the process of developing some reports and a package in developement environment  but i find that the developement environment table names are different from the Production environment table names.
developement table is like Dev$ABC and production is like Prod$ABC
So when i migrate the package from Development to Production the package will not identify the tables.
Please suggest an approach that would help me migrate the package without any Framework Manager changes.

Title: Re: Migrating Reports from Development to Production with different table names
Post by: blom0344 on 02 Jul 2010 02:33:20 AM
Depending on the database it would be a matter of aliasing the tables through views/synomyms to represent the naming from development.

-------------------------------------------------------------------------------
the following suggestion is off the record !!!!! 
-------------------------------------------------------------------------------

A less appropriate way would be to take the framework model.xml and hack it like:

select * from [datasource].[Dev$ABC]

to

select * from [datasource].[Prod$ABC]

by performing a replace on Dev$  into Prod$

Title: Re: Migrating Reports from Development to Production with different table names
Post by: CognosPaul on 02 Jul 2010 02:12:09 PM
Are the table names different because they're stored in the same database?

If you can create a table that has the same name in both production and development you could try the following.

1. Create a table called Parameters with two fields - Key and Value
2. Populate one row in that table with key: environment and value:Prod/Dev
3. Create a parameter map in FM called paramLookup that pulls from this table.
4. Replace the SQL in every table reference with select * from [datasource].[#$paramLookup{'environment'}#$ABC]

The obvious downside to this solution is that that table will be called for every single query run. Blom's will be better if database efficiency is paramount.