Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Database in Catalog 1

Status
Not open for further replies.
Nov 4, 2002
19
GB
I have a catalog which was built around one database called, say "LIVE". I have copied this database in SQL to create a "TEST" database for testing purposes, and I want to change the catalog to point to the TEST database.

I have tried changing the "database name" in Database Definition Manager (I assume the Logical Name should stay as "LIVE"? although I have tried changing this as well), and then went to Menu>>Catalog>>Tables, and changed the "database name" in here to "TEST" - but nothing, it still looks at the "LIVE" database.

I am sure this can be done, but I cannot get it working - any help would be appreciated.

Many Thanks
 
Hi,
Have you renamed the database in the Catalog Tables section on the right hand side of the Menu>>Catalog>>Tables screen?

The 3 database icons represent (from the top):

The database definition (from the database drop down)
The SQL Server database name (where data is actually stored)
The user of the database (usually dbo)

The middle one is the one which will pick either "TEST" or "LIVE" data.

If both databases are on the same server, you can leave all definitions as live and just change the SQL Server db name. But if the databases are on different servers, it may be easier to have 2 different database definitions and jusst flick between them (also changing the SQL db name)


Hope this helps

Kevin
 
The easier way to do this is to simply repoint the logical database to the new physical database name (i.e. from LIVE to TEST). This is done under the menu option Catalogs | Databases. Select your existing logical database and change the connection string.

Hope this helps,

Dave Griffin

The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ20-2863 first!
 
Impromptu menu item: Catalog, Tables, Edit, Database -lets you go from Live to Test with minimal maintenance if you have your test database using all the same table names. I am not sure about the SQL you are using.

CP [cook]
 
Thanks for all your help guys - I have managed to resolve this issue through re-naming the second item on the right hand catalog folder window of the tables dialog box - that was the bit I was missing! ;-)

One other related issue though is that although I can now connect to the &quot;TEST&quot; database, and create new reports against this database, the existing reports that were created against the &quot;LIVE&quot; database using this catalog, now no longer work - and this is - I think - because the report is conditioned to look at &quot;LIVE.<tablename>&quot; regardless of what database you are connected to - if you know what I mean!

This is not how I understood Cognos to work... But maybe I need to do something to the profile of the report or something to get it to look at whatever database is the current one in the catalog instead of being somehow hard-coded against one particular database which is at it seems to be at the moment...

Help!

Many Thanks
 
If you change the Logical database pointer to the test environment, this affects your computer only, and affects all reports run from catalogs that reference that logical database.

If you change the catalog (or hopefully a copy of the catalog) to point to a second logical database that points to the test database, then any user that opens that catalog points to the test database as long as they have that logical database defined!

Ultimately, the change of an existing logical database is best for adhoc testing in the test environment. Setting up a second logical database and mapping catalogs to use it is better for a persistent connection to the second database, especially if it is to be shared between users.

Hope this helps,

Dave Griffin



The Decision Support Group
Reporting Consulting with Cognos BI Tools
&quot;Magic with Data&quot;
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top