ClearQuest

From DigitalOps.Org Wiki

Jump to: navigation, search

Contents

Links

Sites

Technotes

ClearQuest Tips & Tricks

Launch the Find Record dialogue from the keyboard

Ctrl-Shift-F

How to determine the feature level and metaschema version

Connect to the schema repository with pdsql (or similar) and run the following:

> SELECT feature_level,metaschema_version FROM master_global;

Oracle Database Tips

Export/Import a CQ Database

You can use the Oracle exp and imp utilities to copy a CQ user database or schema repository.

Export with exp <name>/<password>@<SID> FILE=<output file> STATISTICS=none, for example:

$ exp CQUSER/CQPASSWD@CQDBSID FILE=backup.dmp STATISTICS=none

Export: Release 9.2.0.6.0 - Production on Thu Jan 7 14:35:47 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses WE8ISO8859P1 character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user CQUSER
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user CQUSER
About to export CQUSER's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export CQUSER's tables via Conventional Path ...
. . exporting table                     MASTER_DBS          1 rows exported
. . exporting table         MASTER_EPOCH_ESTIMATES          1 rows exported
. . exporting table                  MASTER_GLOBAL          1 rows exported
. . exporting table                  MASTER_GROUPS          1 rows exported
. . exporting table               MASTER_ID_BLOCKS          0 rows exported
...

Import is similar with imp <name>/<password>@<SID> FILE=<input file> FROMUSER=<user1> TOUSER=<user2>, for example:

$ imp CQUSER/CQPASSWD@CQSID FILE=backup.dmp FROMUSER=CQMASTER TOUSER=CQUSER

Import: Release 9.2.0.6.0 - Production on Thu Jan 7 14:07:52 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production

Export file created by EXPORT:V09.02.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
. importing CQUSER's objects into CQUSER
. . importing table                   "MASTER_DBS"          1 rows imported
. . importing table       "MASTER_EPOCH_ESTIMATES"          1 rows imported
. . importing table                "MASTER_GLOBAL"          1 rows imported
. . importing table                "MASTER_GROUPS"          1 rows imported
. . importing table             "MASTER_ID_BLOCKS"          0 rows imported
....

Some excellent imp/exp tips can be found here and here.

Creating New CQ User Databases

A DBA should just create a new Oracle user (schema) and you use the CQ Designer to create a user db based on one of the current schemas in the CQ schema repo. However, sometimes this procedure fails with a "Unable to delete from userdb_packagerev_usage. Table or View does not exist" error. In these cases try these steps.

1. In sqlplus or pdsql or Toad prepare (don't execute!) the following SQL

CREATE TABLE USERDB_PACKAGEREV_USAGE
(PACKAGE_NAME VARCHAR2(30) NULL,
REV_STRING VARCHAR2(30) NULL,
ENTITYDEF_ID NUMBER(10,0) NULL,
ENTITY_TYPE_NAME VARCHAR2(255) NULL)
TABLESPACE "CAGSPACE";

Obviously the tablespace will be different. Don't execute the table creation statement just yet.

2. In CQ Designer, kick off the process of creating a new user DB, specifying the empty Oracle User required with the parameters asked.

3. Immediately after step 2 (Within 3 or 4 seconds), go back to your SQL client window and execute the create table statement in there that's waiting.

4. After some time in CQ Designer you should receive a confirmation that the new "User Database" was created successfully.

Out of Tablespace?

Which tablespace is the user using, for example:

SQL> SELECT USERNAME,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE FROM DBA_USERS WHERE USERNAME = 'CQUSER';

USERNAME                       DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE
------------------------------ ------------------------------ ------------------------------
CQUSER                         CQUSER_TBL                     TEMP

You can run the following SQL to see the amount of free space in each tablespace:

SQL> SELECT TABLESPACE_NAME, SUM(bytes)/1024/1024 "Free (MB)"
2  FROM dba_free_space
3  GROUP BY tablespace_name;

TABLESPACE_NAME                 Free (MB)
------------------------------ ----------
CQMASTER_IDX                      49.9375
CQMASTER_TBL                      49.9375
CQUNIT_IDX                        74.4375
CQUNIT_TBL                         88.625
CQUSER_IDX                             62
GENUSER                           49.8125
SYSTEM                           333.5625
TOOLS                            108.1875
UNDOTS                           195.5625

9 rows selected.

Additionally, on the db server check the following directory (or similar) for the alert log, named alert_<SID>.log:

/ora/admin/<SID>/bdump

Look for telltale errors like this:

ORA-1691: unable to extend lobsegment CQMASTER.SYS_LOB0000006526C00004$$ by 8192 in tablespace        CQUSER_TBL