Wednesday, December 13, 2006

Offline MSWindows Patching

Installing a fresh operating system and connecting it to the Internet to install the latest patches can be risky.

The program available here will download needed patches so they can be put to an ISO CD or DVD. The program even has a simple GUI to choose the download options.

Wednesday, December 06, 2006

Oracle and Tuxedo Transaction Deadlock

Follow these steps to locate the Tuxedo logs of the services that have deadlocked in an Oracle database. Tuxedo service debugging should have already been implemented before the deadlock occurred.

Part of Oracle alert.log:
Mon Dec 4 13:59:36 2006
ORA-000060: Deadlock detected. More info in file /u103/oracle/admin/DB/udump/db_ora_1567.trc.

Optionally confirm time of deadlock:
$ grep 'SESSION ID' db_ora_1567.trc
*** SESSION ID:(176.15362) 2006-12-04 13:59:27.820

Find the Tuxedo program name and machine names. Replace "host" with a string that matches your application server host names.
$ grep host db_ora_1567.trc
Node name: dbhost
Unix process pid: 1567, image: oracle@dbhost (TNS V1-V3)
O/S info: user: arbor, term: , ospid: 10159, machine: app018
program: om_Customer@app018 (TNS V1-V3)
application name: om_Customer@app018 (TNS V1-V3), hash value=0
OSD pid info: Unix process pid: 1567, image: oracle@dbhost (TNS V1-V3)
O/S info: user: arbor, term: , ospid: 12110, machine: app020
program: om_OrderProces@app020 (TNS V1-V3)
application name: om_OrderProces@app020 (TNS V1-V3), hash value=0

On machine app018 go to Tuxedo service log directory:
$ cd log

Find the files with the service and time that were in the database deadlock trace file:
$ ls -otr om_Customer* om_OrderProces*|tail -9
-rw-r--r-- 1 arbor 3733 Dec 4 00:01 om_OrderProcessing-061204-000033.03.10169.server.sql00100
-rw-r--r-- 1 arbor 303300 Dec 4 00:01 om_OrderProcessing-061204-000026.03.10705.server.001
-rw-r--r-- 1 arbor 3378 Dec 4 12:10 om_Customer-061204-120950.03.10159.server.sql00100
-rw-r--r-- 1 arbor 46855616 Dec 4 19:57 om_OrderProcessing-061204-000003.03.10169.server.dbg
-rw-r--r-- 1 arbor 5525130 Dec 4 19:57 om_OrderProcessing-061204-000003.03.10169.server.001
-rw-r--r-- 1 arbor 882855649 Dec 4 19:57 om_Customer-061204-012635.03.10159.server.dbg
-rw-r--r-- 1 arbor 259093081 Dec 4 19:57 om_Customer-061204-012635.03.10159.server.001
-rw-rw---- 1 arbor 3017100 Dec 4 19:57 om_OrderProcessing.3.err
-rw-rw---- 1 arbor 324921588 Dec 4 19:57 om_Customer.3.err

These tuxedo log files along with the database deadlock trace file can be used to determine the cause and potential resolution of the deadlock condition.

Tuesday, December 05, 2006

Oracle alert.log "ORA-" Monitoring

Oracle DBAs often have a purchased tool or home-grown scripts to monitor the Oracle alert.log for errors.
DBAs will often search the alert.log for lines that begin with "ORA-", even though not all ORA- messages are database errors (user cancelling a long-running will query will create a ORA- message but this is not a database error).

Aside from the fact that all ORA- messages are not errors, not all errors are identified with ORA-. This is a list of some of the messages that do not begin with ORA- that a DBA may be interested in monitoring.

Fri Oct 27 14:35:43 2006
Failure to extend rollback segment because of 30036 condition
Failure to extend rollback segment because of 30036 condition
Failure to extend rollback segment because of 30036 condition


Thu Oct 26 07:11:29 2006
Failure to extend rollback segment 22 because of 30036 condition
FULL status of rollback segment 22 set.


Tue Oct 10 09:57:03 2006
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump


These two messages may be seen once when the instance is starting:
Deprecated system parameters with specified values:

Oracle instance running on a system with low open file descriptor limit. Tune your system to increase this limit to avoid severe performance degradation.


The number 30036 means ORA-30036.
Failure to extend rollback segment 8 because of 30036 conditionFULL status of rollback segment 8 set.

There are a couple ORA- messages for when the archive log destination is full.
Wed Jan 31 21:58:41 2007
ARC1: Evaluating archive log 5 thread 1 sequence 11273
ARC1: Archiving not possible: No primary destinations
ARC1: Failed to archive log 5 thread 1 sequence 11273
ARCH: Archival stopped, error occurred. Will continue retrying
Wed Jan 31 21:58:41 2007
ORACLE Instance SID - Archival Error
ARCH: Connecting to console port...
Wed Jan 31 21:58:41 2007
ORA-16014: log 5 sequence# 11273 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/u101/oradata/SID/redo05a.log'
ARCH: Connecting to console port...
ARCH:

Monday, November 27, 2006

PC/MSWindows Utilities

system info as wallpaper
BgInfo is now a Microsoft product. There is install program, so place the executable where you won't lose it.

folder size
http://foldersize.sourceforge.net/

mother board monitor
http://www.pcworld.com/downloads/file/fid,7309-order,1-page,1-c,systemresourcestuneup/description.html

control what programs automatically start up
http://www.pcworld.com/downloads/file/fid,7976-order,1-page,1-c,desktop/description.html

intel application accelerator. replaces ata driver.
http://support.intel.com/support/chipsets/iaa/

Intel® Chipset Identification Utility
http://downloadfinder.intel.com/scripts-df-external/Product_Filter.aspx?ProductID=861

Tuesday, November 14, 2006

Tuning Secure File Copy For Performance

When scp is too slow, and rdist over scp is more functionality than you need, look at sftp.

The sftp command set will be familiar to anyone who has used ftp.
Sftp allows use of a batch file, and it has a tunable buffer size. The -B flag controls the tunable buffer size and is useful when copying files over wide links that have latency. Tests over a DS3 have shown 20% throughput increases simply by increasing the default buffer of 32K. There are limits, and you can experiment on your platforms. Choosing a value too high will result in a message such as, "Outbound message too long 262169".

Wednesday, November 08, 2006

Release Tuxedo Connections

If the MAXWSCLIENTS had been reached, additional users can not log in to Tuxedo. One way to release connections in Tuxedo is to kill the WSH processes, then use the tmadmin bbclean command.

$ ps -ef|grep WSH | head
arbor 8133 19874 1 12:09:09 ? 0:00 WSH -c 11 -d /dev/tcp -i 21 -s 647181 -p 2048 -P 65535
arbor 16042 19875 0 Nov 6 ? 0:08 WSH -c 11 -d /dev/tcp -i 2 -s 647182 -p 2048 -P 65535
arbor 18303 19874 0 09:21:09 ? 0:00 WSH -c 11 -d /dev/tcp -i 46 -s 647181 -p 2048 -P 65535
arbor 19369 19874 0 09:28:38 ? 0:00 WSH -c 11 -d /dev/tcp -i 47 -s 647181 -p 2048 -P 65535
arbor 3754 19874 0 11:29:54 ? 0:00 WSH -c 11 -d /dev/tcp -i 8 -s 647181 -p 2048 -P 65535
arbor 5840 19874 0 11:42:43 ? 0:00 WSH -c 11 -d /dev/tcp -i 2 -s 647181 -p 2048 -P 65535
arbor 10810 19874 0 12:55:25 ? 0:01 WSH -c 11 -d /dev/tcp -i 44 -s 647181 -p 2048 -P 65535
arbor 10565 19874 0 Nov 6 ? 0:04 WSH -c 11 -d /dev/tcp -i 15 -s 647181 -p 2048 -P 65535
arbor 19989 19874 0 Nov 5 ? 0:04 WSH -c 11 -d /dev/tcp -i 0 -s 647181 -p 2048 -P 65535
arbor 7109 19874 2 Nov 6 ? 0:04 WSH -c 11 -d /dev/tcp -i 33 -s 647181 -p 2048 -P 65535

$ $ kill -kill 19989

$ tmadmin
tmadmin - Copyright (c) 1996-1999 BEA Systems, Inc.
Portions * Copyright 1986-1997 RSA Data Security, Inc.
All Rights Reserved.
Distributed under license by BEA Systems, Inc.
Tuxedo is a registered trademark.

> bbclean
Cleaning the bulletin board on machine FX.

> quit


Count the current tuxedo connections (including the internal users)
$ tuxedo8.0/bin/tmadmin 2>/dev/null << EOF | /usr/bin/grep ^FX | /usr/bin/wc -l
printclient
quit
EOF

Monday, November 06, 2006

Capture and Transfer Oracle Statistics

The dbms_stats Oracle-supplied package makes it easy to back up and restore statistics.

Create the table where statistics will be captured. dbms_stats.create_stat_table
SQL> exec dbms_stats.create_stat_table('SCHEMAOWNER', 'STATTAB')
PL/SQL procedure successfully completed.


dbms_stats.export_schema_stats
This requires a table name where the statistics will be stored. This table can be exported (like any other table) and imported into a development database.

dbms_stats.import_schema_stats


Example of capturing and transferring statistics:
SQL> exec dbms_stats.export_schema_stats('SCHEMAOWNER','STATTAB')
PL/SQL procedure successfully completed.


$ exp file=stattab.dmp tables=SCHEMAOWNER.stattab compress=n

About to export specified tables via Conventional Path...
Current user changed to SCHEMAOWNER
. . exporting table STATTAB
8701 rows exported
Export terminated successfully without warnings.


>>> Copy export file and change ORACLE_SID as appropriate.


$ sqlplus SCHEMAOWNER@qa
SQL> delete from stattab;


$ imp file=stattab.dmp fromuser=SCHEMAOWNER touser=SCHEMAOWNER ignore=y

Export file created by EXPORT:V09.02.00 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
. importing SCHEMAOWNER's objects into SCHEMAOWNER
. . importing table "STATTAB"
8701 rows imported
Import terminated successfully without warnings.


$ sqlplus SCHEMAOWNER@qa
SQL> exec dbms_stats.import_schema_stats('SCHEMAOWNER','STATTAB')
PL/SQL procedure successfully completed.

Friday, November 03, 2006

Vista Upgrade Advisor

This tool can help determine if legacy equipment will support Windows Vista.

I ran the tools on a laptop purchased this year, and the tool says I would need a TV tuner card to run the home premium version of Vista.

"TV Tuner card
Make sure you have an approved TV tuner card No compatible TV tuner was detected. Upgrade Advisor did not detect a TV tuner card in your current system. To watch TV on your computer, you need an approved USB-based TV tuner or TV tuner card. Contact your computer manufacturer for more information.
"