Progress: Misc Commands

Iterate Through DB's

for x in $(ls -a ??/*.db | sed 's/\.db//g'); do 
  SH=$(echo $x | cut -f1 -d/); 
  DB=$(echo $x | cut -f2 -d/);
  echo $SH $DB
done 

Broker

Broker properties files are stored in /u1/oe101b_wrk/ . Also stored in here are the log files (i.e. PulseAS.server.log and PulseAS.broker.log) Both of these can be used when troubleshooting a broken Broker.

asbman -name PulseAS -q    # Query appservers
wbtman -name PulseWS -q    # Query webspeed 
nsman -name PulseNS-q      # Query registered as and ws

Mpro

To log into a database using mpro

mpro <db name>

Some SQL's

# CHECK what users exist IN the system
SELECT * FROM _user WHERE _userid = '';

Backup and Restore

Backup

# Do an online backup
# <database>      Full database name, i.e. prodrec = qp
# <backup_file>   The name of the backup to create
# -vs n           Create volume sets, with n database blocks (1000*1k = 1MB)
probkup online <database> <backup_file> [-vs n]

Restore

# Copy the backup
cp /u3/backup/whiteh/fa.bck.gz
# Stop the database
cd /u3/testsys; ./stop_testsys_servers fa
# Restore the database
cd fa; prorest fxdasset fa.bck
# Start the database
cd ..; ./start_testsys_servers fa

Remove Replication

proutil prodrec -C disablesitereplication source

Random Cmds

# Shutdown a database
proshut /u2/abm/bi/pulsebi
 
# Monitor a database
promon /u2/abm/bi/pulsebi
 
# View all db's shared mem
proutil -C dbipcs
 
# Delete a database (cd into the db dir)
prodel pulsebi
 
# Restore a database
prorest pulsebi pulsebi.backup
 
# Start the database
../start_abm_servers bi
 
# When moving db location
prostrct repair pulsebi
Print/export
QR Code
QR Code sysadmin:progress:misc_commands (generated for current page)