Monitoring IBM HTTP Server From Browser

October 1, 2007 – 5:16 pm
Sometimes it is easier and quick to get status on a Web Server from a browser - you can be anywhere and know what is going on with the server. Of course, this works only if you are on a firewall protected network. The IBM HTTP Server server-status page is available on all supported IBM HTTP Server platforms. It shows performance data on a Web page in HTML format. Statistics include total accesses, requests/sec, data(KB)/sec, total traffic (MB) since last restart, etc. To make this work, perform the following steps to activate the server-status page: 1. Open the IBM HTTP Server file httpd.conf in an editor. 2. Remove the comment character "#" from the following lines: #LoadModule status_module modules/mod_status.so # # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com # 3. Customize the ".example.com" in the sample configuration to match your source workstation reverse DNS ...

How to export / mount a nfs mount from AIX nfs server to nfs client

July 6, 2007 – 3:02 pm
bash-3.00# exportfs/data/fs/fs1 -rw=pw41,access=pw41.test.pw.com,root=pw41.test.pw.com NOTE: the exported directory (e.g., /data/fs/fs1) must be a file system itself, not just any directory.In this case, /data/fs/fs1 is a file system itself, but /data is not. So if you export /data, when youmount it from client, it will not work (you will get an error).bash-3.00# exportfs -a This commands exports (or freshes) the list again from the server. Man page for exportfs shows this:Flags -a Exports all directories listed in the exports file. -v Prints the name of each directory as it is exported or unexported.To verify what's been exported, run:bash-3.00# exportfs/cesa/fs/fs1 -rw=pw41,access=pw41.test.pw.com,root=pw41.test.pw.comFrom client side, you can run showmount to list what's exported:bash-3.00# showmount -a pw40pw41.test.pw.com:/data/fs/fs1Then you mount it to an existing directory (create it if it doesn't exist yet): bash-3.00# mount pw40:/data/fs/fs1 /data/clientfsbash-3.00# cd /data/clientfsbash-3.00# ls<files under it>

DB2 V9.1 on AIX: tips on drop instance, de_install, re_install, re-create instance

June 14, 2007 – 10:56 pm
Like the Nissan Pathfinder's ad: "not that you would, but you could". In certain performance test conditions, you may have to drop the current DB2 V8 instance, install V9.1, and re-create a instance. Here is a short list of helpful commands - run as root unless specifically sudo'ed: 1. Drop DB2 instance /opt/IBM/db2/V9.1/instance/db2idrop -f db2inst1 OR version 8 /usr/opt/db2_08_01/instance/db2idrop -f db2inst1 2. Uninstall previous db2 Stop and drop the DB2 Admin server first. bash-3.00# su dasusrbash-3.00$ pwd/home/dasusr/das/binbash-3.00$ ./db2admin stopSQL4407W The DB2 Administration Server was stopped successfully. Drop the DAS server as root: bash-3.00# pwd/opt/IBM/db2/V9.1/instancebash-3.00# ./dasdropSQL4410W The DB2 Administration Server is not active.DBI1070I Program dasdrop completed successfully. Then db2_deinstall UDB: bash-3.00# pwd/opt/IBM/db2/V9.1/installbash-3.00# ./db2_deinstall -aDBI1016I Program db2_deinstall is performing uninstallation. Please wait.The execution completed successfully. 3. Run db2 V9.1 install, db2_install will install at console (non-GUI). 4. After install, create an instance Make sure db2fence1 and db2inst1 directories created under /home and with correct permissions: drwxr-xr-x ...

Resolving ORA-12705 on Client

June 14, 2007 – 10:44 pm
This tip resolves Oracle client error: "ORA-12705: Cannot access NLS data files or invalid environment specified". According to Oracle documentation, "ORA-12705" can happen under the following conditions: 1. ORA-12705 with incorrect NLS_LANG parameter 2. ORA-12705 with incorrectly specified ORA_NLSx 3. ORA-12705 from incorrect Oracle install or configuration 4. ORA-12705 when using Special Character sets 5. ORA-12705 when connecting with SQL*Net 6. ORA-12705 during migrations 7. ORA-12705 when connecting with SQL*Plus 8. ORA-12705 when connecting with language pre-compilers 9. ORA-12705 during Export/Import Try doing the following to fix this error on the client side. On the client Windows machine (this tip is only for Windows), The NLS_LANG must be unset in the Windows registry (re-naming works the best because you know what you changed). Look for the NLS_LANG subkey in the registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, and rename it. Then try SQLPlus again.

tar only directories, not files

June 14, 2007 – 10:24 pm
Sometimes you want to preserve only a directory structure into a tar ball without having to archive the files themselves. This can happen if you want to backup a pre-defined directory structure, run some tests, and do not really care about the files created during the test. You can use the UNIX commands 'find' and 'tar' to do that. # find bwtest -type d > dirlist.txt# more dirlist.txtbwtestbwtest/dd1bwtest/dd1/1bwtest/dd1/458986 bwtest/dd1/217128bwtest/dd1/217136bwtest/dd1/217182bwtest/dd2bwtest/dd2/2bwtest/dd3bwtest/dd3/3bwtest/reports# tar -cvf ./bwtest.tar -L dirlist.txt content.tar will contain only the directories, no files. This should work on all UNIX and Linux platforms.

Backup and Restore Oracle Databases From Command Line

June 5, 2007 – 11:21 pm
Below shows simple steps in Oracle 9i and 10g to backup and restore Oracle databases; the goal is for the tasks to be called remotely so they can be automated as part of a performance test execution (i.e., always restores a known baseline before start a test!)1) Shuts down the listener:F:\_backup>lsnrctl stopLSNRCTL for 32-bit Windows: Version 10.2.0.3.0 - Production on 23-MAY-2007 09:49:20 Copyright (c) 1991, 2006, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pw213)(PORT=1521)))The command completed successfully2) Shuts down the instance:F:\_backup>sqlplus /nologSQL*Plus: Release 10.2.0.3.0 - Production on Wed May 23 09:49:27 2007Copyright (c) 1982, 2006, Oracle. All Rights Reserved.SQL> connect sys as sysdbaEnter password:Connected.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> quitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - ProductionWith the Partitioning, OLAP and Data Mining options3) Use operating system "copy" command to copy the entire "oradata" directory to your backup location:F:\_backup>xcopy /Y/E D:\oradata oradata_2007_05_21Copies all oradata to the "oradata_2007_05_21" directory.4) ...

Increase storage for existing LV

June 3, 2007 – 2:13 am
Steps taken to to increase the storage for an existing logical volume. The following commands are for AIX. The steps, however, are universal. You only need to substitute the commands for other platforms. 1) How big is the vg? <Oracle 10.2.0.2 - ora10g>/home/oracle $ lsvg oradata_vg VOLUME GROUP: oradata_vg VG IDENTIFIER: 00224ada00004c000000010f64352701 VG STATE: active PP SIZE: 128 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 1086 (139008 megabytes) MAX LVs: ...