Tuesday, July 11, 2006

Running Updatespace Utility

To run the utility updatespace with the input:
update space for all databases;
quit


connecting to CNS on an SMP system, use the following command:
cnsrun -utility updatespace -commands ''{update space for all databases;} {quit}''

Running Ferret thro CNSRUN

The cnsrun utility provides the ability to start and run a database utility from a
script.

/* ferret - showfsp */
cnsrun -utility ferret -commands '{enable scriptmode} {output over /tmp/showfsp.out}
{scope vproc 0}
{showfsp -r 200 } {Y} {quit}' -debug 1

/* ferret - packdisk for selective table*/
cnsrun -utility ferret -commands '{enable scriptmode} {output over /tmp/packdisk.out}
{scope table "dbName.tableName" 0}
{packdisk fsp=15}
{Y} {quit}' -debug 1

Friday, July 07, 2006

Releasing User lock on DBC

What to do if someone tries to logon to DBC with a wrong password three times and locks the user ???

Solution:
1. Logon as Root (on to the gateway node).
2. Enter cnsterm 6 on the UNIX command line. This will display the
Database Window Supervisor screen.
3. To start a console utility, type 'start tstsql'). The display will tell you which partition tstsql was
started in (i.e., Window 1).
4. Press the Delete key (CTRL + D) and enter cnsterm 1. You will now see the
contents of Window 1 (i.e., the TSTSQL program)
TSTSQL here. Enter your logon or TSTSQL command:
>.logon dbc,
.logon dbc,

*** Logon successfully completed.
*** Time was 0 seconds.
TSTSQL -- Enter DBC/SQL request or TSTSQL command:
> MODIFY USER dbc AS RELEASE PASSWORD LOCK;
MODIFY USER dbc AS RELEASE PASSWORD LOCK;


*** Database/User has been modified.
*** Time was 0 seconds.

TSTSQL -- Enter DBC/SQL request or TSTSQL command:

5. Press the DELETE key and enter cnsterm 6 to move back to the
Supervisor display.
6. Type stop 1 to terminate the utility that was running in Window 1 (i.e.,
TSTSQL).