Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

transfered sources collection to github

  • Loading branch information...
commit 64a4275d53d0f14d4cb22d6532581106f051d0ee 1 parent 41f2b0d
@tardate authored
View
BIN  OssoRecaptcha-1.0-src.zip
Binary file not shown
View
BIN  RewriteRequestHeaderFilter-1.0-src.zip
Binary file not shown
View
111 debugSoapData.pl
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+# $Id: debugSoapData.pl,v 1.2 2007/05/19 02:48:51 paulg Exp $
+#
+# how to debug SOAP::Lite xml
+#
+# See http://www.majordojo.com/archives/cat_soaplite_solutions.html
+#
+
+use strict;
+use Getopt::Long;
+use Data::Dumper; $Data::Dumper::Terse = 1; $Data::Dumper::Indent = 1;
+
+my $opt_name = "joe blow";
+my $opt_city = "Singapore";
+my $opt_zip = "787082";
+my $opt_street = "Yio Chu Kand Rd";
+my $opt_state = "na";
+my $opt_debug;
+my $opt_help;
+
+GetOptions(
+ "name=s" => \$opt_name,
+ "city=s" => \$opt_city,
+ "street=s" => \$opt_street,
+ "state=s" => \$opt_state,
+ "zip=s" => \$opt_zip,
+ "help" => \$opt_help,
+ "debug" => \$opt_debug
+);
+
+usage() if $opt_help;
+
+if ($opt_debug) {
+ eval "use SOAP::Lite +trace => 'debug';";
+} else {
+ eval "use SOAP::Lite;";
+}
+
+
+sub usage
+{
+ print <<END_OF_USAGE;
+PURPOSE:
+Tests debug for SOAP::Lite
+USAGE:
+perl debugSoapData.pl -debug
+
+END_OF_USAGE
+}
+
+
+my $serviceUrl = 'http://localhost:8000/axis2/services/AddressBookService';
+my $wsdlUrl = 'http://localhost/axis2/services/AddressBookService?wsdl';
+my $serviceNs = 'http://service.addressbook.sample/xsd';
+my $entryNs = 'http://entry.addressbook.sample/xsd';
+
+
+my $soap = SOAP::Lite
+ -> proxy ( $serviceUrl)
+ ;
+
+#
+#
+sub dumpit {
+ my ( $dat ) = @_;
+ print Dumper $dat;
+
+}
+
+# find entry
+sub findEntry {
+ my ( $soap, $search_name ) = @_;
+
+ my $som = $soap->call(SOAP::Data->name('findEntry')->attr({xmlns => $serviceNs})
+ => ($search_name)
+ );
+
+ #my $som = $soap->findEntry($search_name);
+ dumpit( $som );
+}
+
+
+
+# add an entry - works
+sub addEntry {
+
+ my ( $soap, $opt_name, $opt_city, $opt_street, $opt_state,$opt_zip ) = @_;
+
+ my $som = $soap->call(
+ SOAP::Data->name('addEntry')->attr({xmlns => $serviceNs}) =>
+ SOAP::Data->name('param0' =>
+ \SOAP::Data->value(
+ SOAP::Data->name('city' => $opt_city),
+ SOAP::Data->name('name' => $opt_name),
+ SOAP::Data->name('postalCode' => $opt_zip),
+ SOAP::Data->name('state' => $opt_state),
+ SOAP::Data->name('street' => $opt_street)
+ )
+ )
+ );
+
+ # cool. see http://tech.groups.yahoo.com/group/soaplite/message/5946
+ print $soap->transport->http_request->content();
+
+ dumpit( $som );
+
+}
+
+addEntry( $soap, $opt_name, $opt_city, $opt_street, $opt_state,$opt_zip );
+
+#findEntry( $soap, $opt_name);
View
BIN  dsize10.zip
Binary file not shown
View
135 extractPaths.sql
@@ -0,0 +1,135 @@
+--
+-- demonstrates collapsing an XML structure down to a vector of paths and values
+-- see discussion at http://forums.oracle.com/forums/thread.jspa?messageID=1696372
+-- uses xsl approach with path tracing (see http://www.dpawson.co.uk/xsl/sect2/N6077.html for more info)
+--
+-- $Id: extractPaths.sql,v 1.2 2007/02/17 18:08:52 paulg Exp $
+-- author: Paul Gallagher gallagher.paul@gmail.com
+--
+
+set serveroutput on
+set LINESIZE 132
+
+DROP TABLE x1;
+CREATE TABLE x1 (item varchar(25) primary key, xml xmltype);
+
+INSERT INTO x1 VALUES ('data',
+'<?xml version="1.0" encoding="ISO-8859-1"?>
+<FamilyHistory>
+ <Family>
+ <Sponsor>
+ <Name>
+ <Last>Jones</Last>
+ <First>Tom</First>
+ </Name>
+ <SSN>123456781</SSN>
+ </Sponsor>
+ <Children>
+ <Child>
+ <Name>
+ <Last>Smith</Last>
+ <First>Sandra</First>
+ </Name>
+ <SSN>123456783</SSN>
+ <Allergies>
+ <Allergy>
+ <Allergen>Dust</Allergen>
+ <TreatmentType>Injection</TreatmentType>
+ <Treatments>
+ <Treatment>
+ <Date>20040118</Date>
+ <Reaction>None</Reaction>
+ </Treatment>
+ <Treatment>
+ <Date>20040220</Date>
+ <Reaction>Redness</Reaction>
+ </Treatment>
+ </Treatments>
+ </Allergy>
+ <Allergy>
+ <Allergen>Ragweed</Allergen>
+ <Treatment>None</Treatment>
+ </Allergy>
+ </Allergies>
+ </Child>
+ <Child>
+ <Name>
+ <Last>Jones</Last>
+ <First>Carolyn</First>
+ </Name>
+ <SSN>123456782</SSN>
+ </Child>
+ </Children>
+ </Family>
+</FamilyHistory>');
+
+INSERT INTO x1 VALUES ('xsl-to-xml',
+'<?xml version="1.0" encoding="windows-1252" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml"/>
+<xsl:strip-space elements = "*" />
+<xsl:template match="/">
+ <items>
+ <xsl:apply-templates/>
+ </items>
+</xsl:template>
+<xsl:template match="text()">
+ <item>
+ <path>
+ <xsl:for-each select="ancestor-or-self::*">
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name()" />
+ </xsl:for-each>
+ </path>
+ <value>
+ <xsl:value-of select="." />
+ <xsl:apply-templates/>
+ </value>
+ </item>
+</xsl:template>
+</xsl:stylesheet>');
+
+INSERT INTO x1 VALUES ('xsl-to-text',
+'<?xml version="1.0" encoding="windows-1252" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text"/>
+<xsl:strip-space elements = "*" />
+<xsl:template match="text()">
+ <xsl:for-each select="ancestor-or-self::*">
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="name()" />
+ </xsl:for-each>
+ <xsl:text>():</xsl:text>
+ <xsl:value-of select="." />
+ <xsl:text>, &#xA;</xsl:text>
+ <xsl:apply-templates/>
+</xsl:template>
+</xsl:stylesheet>');
+
+declare
+v_out_xml xmltype;
+v_out_text varchar(4000);
+begin
+
+dbms_output.put_line('-- as text list:');
+select
+ XMLTransform(
+ xml,
+ (select xml from x1 where item='xsl-to-text')
+ ).getstringval() into v_out_text
+from x1 where item='data';
+dbms_output.put_line(v_out_text);
+
+dbms_output.put_line('-- as xml structure:');
+select
+ XMLTransform(
+ xml,
+ (select xml from x1 where item='xsl-to-xml')
+ ) into v_out_xml
+from x1 where item='data';
+dbms_output.put_line(v_out_xml.getstringval());
+
+
+end;
+
+/
View
BIN  inised10.zip
Binary file not shown
View
75 installInstantClient.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+echo "Installation script for Oracle Instant Client"
+echo ""
+echo "This will install Instant Client Basic + SDK + sqlplus. I need at the following 3 zip"
+echo "files in the current directory:"
+echo ""
+echo " instantclient-basic*.zip e.g. instantclient-basic-linux32-10.2.0.3-20061115.zip"
+echo " instantclient-sdk*.zip e.g. instantclient-sdk-linux32-10.2.0.2-20060331.zip"
+echo " instantclient-sqlplus*.zip e.g. instantclient-sqlplus-linux32-10.2.0.3-20061115.zip"
+echo ""
+
+# check zip file presence. expect to find 3 zips
+numfiles=$(ls -ld instantclient*.zip 2> /dev/null | grep -c "^-")
+
+if [ $numfiles != 3 ]
+then
+ echo "I'm expecting to see 3 Instant Client zip files. What I found is ${numfiles}:"
+ ls -ld instantclient*.zip 2> /dev/null
+ exit
+fi
+
+# unzip into specified directory
+echo "Unzipping ..."
+unzip instantclient-basic*.zip
+unzip instantclient-sdk*.zip
+unzip instantclient-sqlplus*.zip
+
+# get the actual directory name
+dir=$(ls -ld instantclient* 2> /dev/null | grep "^d" | tail -n 1 | awk '{print $9}')
+echo -e "\nIt seems the instant client directory is ${dir}"
+
+# Fixup - bin directory
+echo -e "\nMaking bin directory.."
+mkdir ${dir}/bin 2> /dev/null
+mv ${dir}/sqlplus ${dir}/bin
+mv ${dir}/*.sql ${dir}/bin
+mv ${dir}/genezi ${dir}/bin
+
+# Fixup - lib directory
+echo -e "\nMaking lib directory.."
+mkdir ${dir}/lib 2> /dev/null
+mv ${dir}/*.so* ${dir}/lib
+mv ${dir}/*.jar ${dir}/lib
+
+# Fixup - .so links
+ln ${dir}/lib/libocci.so.10.1 ${dir}/lib/libocci.so
+ln ${dir}/lib/libocci.so.10.1 ${dir}/lib/occi.so
+ln ${dir}/lib/libclntsh.so.10.1 ${dir}/lib/libclntsh.so
+ln ${dir}/lib/libclntsh.so.10.1 ${dir}/lib/clntsh.so
+
+# Fixup - tnsnames.ora
+echo -e "\nMaking network/admin directory.."
+mkdir ${dir}/network 2> /dev/null
+mkdir ${dir}/network/admin 2> /dev/null
+if [ ! -e ${dir}/network/admin/tnsnames.ora ]
+then
+ echo -e "# Dummy tnsnames.ora\n#\n\n" > ${dir}/network/admin/tnsnames.ora
+ echo " .. a default tnsnames.ora has been placed in ${dir}/network/admin"
+fi
+
+# summary results
+echo -e "\nInstant Client installed.\n"
+
+
+echo -e "\nTo set environment, suggest you modify your .bash_profile to add the following (NB: set SID appropriate to your installation):\n"
+echo "export ORACLE_HOME=$(pwd)/${dir}"
+echo "export LD_LIBRARY_PATH=\$ORACLE_HOME/lib"
+echo "export PATH=\$PATH:\$ORACLE_HOME/bin"
+echo "export ORACLE_SID=ORCL"
+echo ""
+echo "Done!"
+
+
+
View
106 myReCaptcha.pl
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+
+=head1 NAME
+
+myReCaptcha.pl - a simple CGI script to test the reCAPTCHA service http://recaptcha.net
+
+=head1 VERSION
+
+$Id: myReCaptcha.pl,v 1.2 2007/07/28 14:30:48 oracle Exp $
+
+=head1 DESCRIPTION
+
+For more information, see: http://tardate.blogspot.com/2007/07/playing-with-captchas.html
+
+=head1 REQUIRES
+
+CGI
+Captcha::reCAPTCHA
+
+=head1 AUTHOR
+
+gallagher.paul@gmail.com
+
+=cut
+
+
+use strict;
+
+use CGI qw (:standard escapeHTML);
+use Captcha::reCAPTCHA;
+
+# the following defines your personal reCAPTCHA public/private keys
+# $main::recaptcha_private and
+# $main::recaptcha_public
+require '/home/mywww/cgi-bin/myCaptchaKeys.conf';
+
+my $c = Captcha::reCAPTCHA->new;
+
+my $title = 'reCAPTCHA Test Page';
+my $webMaster = $ENV{'SERVER_ADMIN'};
+
+my $challenge = param('recaptcha_challenge_field');
+my $response = param('recaptcha_response_field');
+
+sendCaptchaPage();
+
+1;
+
+
+# send reCaptcha page
+sub sendCaptchaPage {
+ my $style=<<END;
+ BODY {
+ background-color: #FFF0BD;
+ }
+ P {
+ font-size: 10pt;
+ font-family: sans-serif;
+ color: black;
+ }
+END
+
+ print header();
+ print start_html( -title=>$title,
+ -author=>$webMaster,
+ -style=>$style );
+
+ print p( 'This is a sample script using the ' .
+ a({-href=>'http://recaptcha.net/'}, 'reCAPTCHA') .
+ ' service to tell if you are a human or not.' .
+ ' The neat thing is that each time you use it, you are also helping to digitize public domain archives!' );
+ print p( 'See ' .
+ a({-href=>'http://tardate.blogspot.com/2007/07/playing-with-captchas.html'}, 'here') .
+ ' for more information about this sample.' );
+
+
+
+ if ($challenge) {
+ my $result = $c->check_answer(
+ $main::recaptcha_private, $ENV{'REMOTE_ADDR'},
+ $challenge, $response
+ );
+
+ if ( $result->{is_valid} ) {
+ print p( 'That\'s correct. Try another?' );
+ }
+ else {
+ # Error
+ print p( 'Hmm .. are you human? [' . $result->{error} . ']' );
+ }
+ }
+
+
+ print start_form(-method=>'POST',-action=>'');
+
+ print $c->get_html( $main::recaptcha_public );
+
+ print submit('Submit','submit');
+
+ print endform();
+
+ print end_html();
+}
+
+
+
View
432 occimqdemo-readme.txt
@@ -0,0 +1,432 @@
+# ============================================================
+# Notes on the OCCI MQ Demo
+#
+# See http://tardate.blogspot.com/2007/06/mq-and-occi-demo.html
+# Prepared by Paul Gallagher <gallagher.paul@gmail.com>
+# $Id: occimqdemo-readme.txt,v 1.5 2007/06/09 02:38:02 paulg Exp $
+# ============================================================
+
+What this sample demonstrates:
+ 1. C++ (OCCI) Oracle database access
+ 2. Transparent Application Failover (TAF) notifications in C++ (OCCI)
+ 3. Building a C++ application with MQ and OCCI support
+
+What this sample does NOT demonstrate:
+ 1. MQ + DB operations within a single distributed transaction
+
+Platform:
+ 1. Code is written to run on Linux x86. See the make file for a hint on how this can be easily adapted to 64bit Linux (e.g. ZSeries Linux 64)
+ 2. Requires Websphere MQ 6.0 for Linux (free download from IBM)
+ 3. Requires Oracle Database (free download from Oracle). Works with either full client or Instant Client.
+
+
+For More Information
+==============================================================================
+See http://tardate.blogspot.com/2007/06/mq-and-occi-demo.html for more
+description of the demo and access to the latest demo download.
+
+For information on programming OCCI, see the OCCI home page on OTN
+http://www.oracle.com/technology/tech/oci/occi/index.html
+
+For more information about Oracle Database, see
+http://www.oracle.com/technology/documentation/database10gr2.html
+
+
+Overview of the Basic Flow to run this Demo
+==============================================================================
+The following sections are included in this file.
+
+1. Check Current Limitations/Untested Aspects
+
+2. Obtain and Install Oracle Database 10g
+
+3. Obtain and Install Websphere MQ
+
+4. setup the mqm user for Oracle
+
+5. Setting up ORACLE tnsnames.ora
+
+6. Setting up MQ OCCIMQDEMO environment
+
+7. Build the OCCIMQDEMO sample programs
+ 7a. Initialising ORACLE OCCIMQDEMO schema for the demo
+ 7b. Build the C++ sample programs
+ 7c. Verifying Correct Build Libraries for OCCI
+
+8. Running the demo
+
+9. Generate a Test Report
+
+10. Checking Queue Status
+
+Assuming Oracle Database and MQ already installed, the commands for a full
+build/test cycle are as follows:
+
+ ./qcontrol.sh initqm
+ ./qcontrol.sh createq 1..15
+ ./build.sh initdb
+ ./build.sh db
+ ./loadTest.sh run 1..15
+ ./loadTest.sh report 1..15
+ ./qcontrol.sh delqm
+ ./build.sh dropdb
+
+
+
+1. Current Limitations/Untested Aspects
+==============================================================================
+1. MQ and Database operations are not conducted in a distributed transaction.
+This means that an MQ dequeue will still succeed if, for example, a database write fails.
+The sample programs correctly report this behaviour if it should occur.
+
+2. MQ failover not tested.
+Additional exception handling may be required.
+
+3. Database failover to DR not tested.
+
+4. If queues are not empty at the start of a test, mqproducer and mqconsumer
+iterations may not tally correctly. Use (./qcontrol.sh clear x..y) to clear queues.
+
+5. Currently, Oracle only "officially" support GCC 3.2.3 with 10g Release 2 (10.2) for IBM zSeries Based Linux
+(see Oracle® Database Release Notes http://download-west.oracle.com/docs/cd/B19306_01/relnotes.102/b25399/toc.htm)
+In practice, I have been able to get this demo to work with GCC 3.4.3 by soft linking the required .so file names
+
+
+
+2. Obtain and Install Oracle Database 10g
+==============================================================================
+This sample requires an Oracle Database server. Only 10g has been tested, but there
+is nothing in the sample that shouldn't work with other versions of the server.
+
+If you do not already have an Oracle Database server available, see Oracle OTN
+to obtain free developer versions:
+http://www.oracle.com/technology/software/products/database/oracle10g/index.html
+
+Follow the Oracle installation instructions to setup and test the database server.
+
+
+
+3. Obtain and Install Websphere MQ
+==============================================================================
+This sample requires a Websphere MQ server. Only Websphere MQ 6.0 for Linux has been tested.
+
+A trial version of Websphere MQ is available for download from IBM (http://www.ibm.com)
+
+See Websphere documentation and information available at
+http://www-306.ibm.com/software/integration/wmq/library/?S_CMP=rnav
+
+
+
+4. Setting up mqm user for ORACLE environment
+==============================================================================
+
+Recommended approach is to install Oracle Instant Client for the mqm user.
+This means mqm user does not need any special oracle installation privileges.
+
+A script (installInstantClient.sh) has been provided to install and config the Instant Client.
+Installation procedure is as follows:
+
+1. Change to the directory where the instant client directory should be held. mqm home is fine:
+[mqm@tintin occimqdemo]$ cd
+
+2. Copy the 3 Instant Client zip files into this directory
+[mqm@tintin mqm]$ cp /downloads/instantclient-basic-linux32-10.2.0.3-20061115.zip .
+[mqm@tintin mqm]$ cp /downloads/instantclient-sdk-linux32-10.2.0.3-20061115.zip .
+[mqm@tintin mqm]$ cp /downloads/instantclient-sqlplus-linux32-10.2.0.3-20061115.zip .
+
+3. Run the installInstantClient.sh script
+[mqm@tintin mqm]$ occimqdemo/installInstantClient.sh
+
+this will unpack and fixup the installation ... read the output
+
+4. Fixup the .bash_profile file as instructed.
+e.g. you will be told to add the following lines:
+export ORACLE_HOME=/var/mqm/instantclient_10_2
+export LD_LIBRARY_PATH=$ORACLE_HOME/lib
+export PATH=$PATH:$ORACLE_HOME/bin
+export ORACLE_SID=OCCIMQDEMO
+
+5. Configure tnsnames.ora for your database
+see next section (Setting up ORACLE tnsnames.ora)
+
+6. Re-login to mqm user, should be ready to go
+
+
+
+5. Setting up ORACLE tnsnames.ora
+==============================================================================
+
+"OCCIMQDEMO" is the standard database connection name used in the scripts. Set this up
+appropriately in the $ORACLE_HOME/network/admin/tnsnames.ora file.
+
+For example, a single-instance database connection:
+OCCIMQDEMO =
+ (DESCRIPTION=
+ (ADDRESS=(PROTOCOL=TCP)(HOST=tintin.urion.com)(PORT=1521))
+ (CONNECT_DATA=
+ (SERVER=DEDICATED)
+ (SERVICE_NAME=ORCL.tintin.urion.com)
+ )
+ )
+
+For example, a RAC connection:
+OCCIMQDEMO =
+ (DESCRIPTION=
+ (ADDRESS_LIST =
+ (ADDRESS=(PROTOCOL=TCP)(HOST=tintin-rac1vip.urion.com)(PORT=1521))
+ (ADDRESS=(PROTOCOL=TCP)(HOST=tintin-rac2vip.urion.com)(PORT=1521))
+ (FAILOVER=yes)
+ (LOAD_BALANCE=yes)
+ )
+ (CONNECT_DATA=
+ (SERVER=DEDICATED)
+ (SERVICE_NAME=MYRAC.tintin.urion.com)
+ (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=1)(DELAY=5))
+ )
+ )
+
+
+
+
+6. Setting up MQ OCCIMQDEMO environment
+==============================================================================
+MQ Environment setup tasks are built into the qcontol.sh script. The two
+required setup steps are to create a queue manager (initqm), and create
+some queues (createq)
+
+[mqm@tintin occimqdemo]$ ./qcontrol.sh
+
+ OCCI/MQ Demo MQ Control Script
+
+ Usage:
+ ./qcontrol.sh help ... this message
+ ./qcontrol.sh initqm ... create and start the queue manager
+ ./qcontrol.sh startqm ... start the queue manager
+ ./qcontrol.sh stopqm ... stop the queue manager
+ ./qcontrol.sh delqm ... stop and delete the queue manager
+ ./qcontrol.sh createq qRange ... create queue/queue range
+ ./qcontrol.sh qstatus qRange ... show status of queue/queue range
+ ./qcontrol.sh clearq qRange ... clear queue/queue range
+ ./qcontrol.sh deleteq qRange ... delete queue/queue range
+
+ Where
+ qRange = queue number or range {a | a..b}
+ (queue number "a", or queues from "a" to "b")
+
+
+Setup example:
+1. create and start the OCCIMQ.QMgr queue manager
+[mqm@tintin occimqdemo]$ ./qcontrol.sh initqm
+
+2. create 100 queues:
+[mqm@tintin occimqdemo]$ ./qcontrol.sh createq 1..100
+
+
+
+
+7. Build the OCCIMQDEMO sample programs
+==============================================================================
+Building the sample program (C++ and database schema) is controlled with
+the build.sh script.
+
+
+[mqm@tintin occimqdemo]$ ./build.sh
+
+ Demo build script for OCCI/MQ Demo dbLibrary.
+
+ Usage - OCCIMQDEMO Schema Database operations:
+ ./build.sh initdb ... initialise the demo database (create the
+ occimqdemo user and sample tables)
+ ./build.sh testdb ... simple PL/SQL test of the occimqdemo user
+ and sample tables
+ ./build.sh cleandb ... cleanout all the occimqdemo tables
+ ./build.sh dropdb ... to drop all occimqdemo objects
+ ./build.sh dbstatus ... show db status
+
+ Usage - C++ sample code operations. Generates:
+
+ ./build.sh stub [verbose] ... build the stub sources, optionally with verbose
+ output on if specified
+ ./build.sh db [verbose] ... build the db-integrated sources, optionally with
+ verbose output on if specified
+ ./build.sh demodb ... build the dbLibrary demo using Oracle demo_rdbms.mk
+ (Use this to get platform-specific library info
+ that may need to be updated in occimq.mk)
+ ./build.sh clean ... clean up compiled files
+
+
+
+7a. Initialising ORACLE OCCIMQDEMO schema for the demo
+------------------------------------------------------------------------------
+Schema management is built into the build.sh script.
+
+Example usage:
+
+1. create the occimqdemo user and sample tables (will prompt for system password):
+[mqm@tintin occimqdemo]$ ./build.sh initdb
+
+2. cleanup the schema after test runs (resets the schema - will delete all information)
+[mqm@tintin occimqdemo]$ ./build.sh cleandb
+
+3. completely drop the schema:
+[mqm@tintin occimqdemo]$ ./build.sh dropdb
+
+
+
+7b. Build the C++ sample programs
+------------------------------------------------------------------------------
+C++ sample programs include:
+ bin/mqproducer (executable test program)
+ bin/mqconsumer (executable test program)
+ bin/dblibrary_test (executable db test program)
+
+Examples for building the C++ test program:
+
+1. Standard build - with database support, verbose output disabled:
+[mqm@tintin occimqdemo]$ ./build.sh db
+
+2. Standard build - with database support, verbose output enabled:
+[mqm@tintin occimqdemo]$ ./build.sh db verbose
+
+3. Stubbed build - programs without "dummy" db support (no Oracle environment required)
+[mqm@tintin occimqdemo]$ ./build.sh stub verbose
+
+
+
+7c. Verifying Correct Build Libraries for OCCI
+------------------------------------------------------------------------------
+The makefile (occimq.mk) is configured to build with OCCI libraries
+appropriate for Oracle 10gR2 on Linux x86.
+
+To build on other environments, the libraries and includes may need to be
+adjusted. Specifically, the CFLAGS, ORACFLAGS, LFLAGS and ORALFLAGS variables
+in occimq.mk may need to be revised.
+
+The easiest way to do this is to build the dblibrary_test program with the
+makefile distributed with oracle, examine the libraries used, and update
+occimq.mk accordingly.
+
+The build.sh script has an operation to do such a build:
+
+ ./build.sh demodb
+
+This will work provided the platform you are using contains the
+$ORACLE_HOME/rdbms/demo/demo_rdbms.mk file. If not, consult the database
+documentation for the platform concerned.
+
+
+
+8. Running the demo
+==============================================================================
+Program execution is built into the loadtest.sh script:
+
+[mqm@tintin occimqdemo]$ ./loadTest.sh
+
+ OCCI/MQ Demo Test Runner Script
+
+ Usage:
+ ./loadTest.sh help ... this message
+ ./loadTest.sh run qRange pTimeout pThinktime cTimeout
+ ... runs test pairs (producer/consumer) for specified queues
+ ./loadTest.sh prod qRange pTimeout pThinktime
+ ... only starts a producer for specified queues
+ ./loadTest.sh cons qRange cTimeout
+ ... only starts a consumer for specified queues
+ ./loadTest.sh tail qRange ... tails log files for test programs for specified queues
+ ./loadTest.sh report qRange ... generates report from logfiles for specified queues
+
+
+ Where
+ qRange = queue number or range {a | a..b}
+ (queue number "a", or queues from "a" to "b")
+ pTimeout = producer timeout in seconds (default=120)
+ pThinktime = producer message injection delay (default=0)
+ cTimeout = consumer timeout in seconds (default=30)
+
+
+
+NB: running the "load" operation will implicitly call "tail" after the programs have all been started.
+
+Example usage:
+
+1. Run a test with 1 producer-consumer pair for 20 seconds:
+[mqm@tintin occimqdemo]$ ./loadTest.sh run 1 20
+
+2. Run a test with 15 producer-consumer pairs for 120 seconds:
+[mqm@tintin occimqdemo]$ ./loadTest.sh run 1..15 120
+
+3. Watch the logs in real-time during a load test for queues 5 to 10:
+NB: running the "run" operation will implicitly call "tail" after the programs have all been started.
+[mqm@tintin occimqdemo]$ ./loadTest.sh tail 5..10
+
+4. Generate a report from a run for queues 1 to 10
+[mqm@tintin occimqdemo]$ ./loadTest.sh report 1..10
+
+
+
+9. Generate a Test Report
+==============================================================================
+Report generation is built into the loadtest.sh script:
+
+1. Generate a report from a run for queues 1 to 10
+[mqm@tintin occimqdemo]$ ./loadTest.sh report 1..10
+
+This will procude a report which could be redirected to a text file and analysed with Excel.
+Example output (admittedly on a slow machine):
+
+Instance, Producer Iterations, Producer Msg Sent OK, Producer Msg Reply OK, Consumer Iterations, Consumer Msg In OK, Consumer Msg Saved to DB OK, Consumer Msg Out OK, Test Duration(secs), Producer Iterations per second, Average Response Time, Count Response Time > 1, Slowest Response Time > 1, Producer Errors, Consumer Errors, TAF Failovers
+1, 43235, 43235, 43235, 43235, 43235, 43235, 43235, 600, 72, 0.0103713, 18, 3.09328, 0, 0, 0
+2, 42872, 42872, 42872, 42872, 42872, 42872, 42872, 600, 71, 0.0106544, 18, 3.09214, 0, 0, 0
+3, 42867, 42867, 42867, 42867, 42867, 42867, 42867, 600, 71, 0.0106341, 18, 3.09163, 0, 0, 0
+4, 43126, 43126, 43126, 43126, 43126, 43126, 43126, 600, 71, 0.0104773, 18, 3.09137, 0, 0, 0
+5, 42970, 42970, 42970, 42970, 42970, 42970, 42970, 600, 71, 0.0105106, 18, 3.09185, 0, 0, 0
+6, 42915, 42915, 42915, 42915, 42915, 42915, 42915, 600, 71, 0.0105912, 18, 3.09264, 0, 0, 0
+7, 43167, 43167, 43167, 43167, 43167, 43167, 43167, 600, 71, 0.0105066, 18, 3.092, 0, 0, 0
+8, 43249, 43249, 43249, 43249, 43249, 43249, 43249, 600, 72, 0.010494, 18, 3.09296, 0, 0, 0
+9, 43028, 43028, 43028, 43028, 43028, 43028, 43028, 600, 71, 0.010564, 18, 3.09189, 0, 0, 0
+10, 43218, 43218, 43218, 43218, 43218, 43218, 43218, 600, 72, 0.0104776, 18, 3.093, 0, 0, 0
+
+
+
+Notes on the above report:
+1) producer and consumer itermations and successful msg send/receieve all tally, which is what we want (no dropped messages)
+2) 15 messages fell outside the 1sec threashold for a reply, which is a concern. This was a slow/overloaded machine so perhaps expected.
+3) to compare results without the database access, you could re-run the test after building with the dbstub:
+ ./build.sh stub
+ ./loadTest.sh run 1..10 600
+ ./loadTest.sh report 1..10
+
+For example, this now reports:
+Instance, Producer Iterations, Producer Msg Sent OK, Producer Msg Reply OK, Consumer Iterations, Consumer Msg In OK, Consumer Msg Saved to DB OK, Consumer Msg Out OK, Test Duration(secs), Producer Iterations per second, Average Response Time, Count Response Time > 1, Slowest Response Time > 1, Producer Errors, Consumer Errors, TAF Failovers
+1, 57529, 57529, 57529, 57529, 57529, 57529, 57529, 600, 95, 0.00220925, 1, 1.28549, 0, 0, 0
+2, 57366, 57366, 57366, 57366, 57366, 57366, 57366, 600, 95, 0.00211662, 1, 1.31558, 0, 0, 0
+3, 57590, 57590, 57590, 57590, 57590, 57590, 57590, 600, 95, 0.00213661, 1, 1.28589, 0, 0, 0
+4, 57771, 57771, 57771, 57771, 57771, 57771, 57771, 600, 96, 0.00212538, 1, 1.30506, 0, 0, 0
+5, 57591, 57591, 57591, 57591, 57591, 57591, 57591, 600, 95, 0.00216829, 1, 1.30558, 0, 0, 0
+6, 57655, 57655, 57655, 57655, 57655, 57655, 57655, 600, 96, 0.00208699, 1, 1.30506, 0, 0, 0
+7, 57675, 57675, 57675, 57675, 57675, 57675, 57675, 600, 96, 0.00212047, 1, 1.305, 0, 0, 0
+8, 57704, 57704, 57704, 57704, 57704, 57704, 57704, 600, 96, 0.00205405, 1, 1.3043, 0, 0, 0
+9, 57578, 57578, 57578, 57578, 57578, 57578, 57578, 600, 95, 0.00217947, 1, 1.30432, 0, 0, 0
+10, 57705, 57705, 57705, 57705, 57705, 57705, 57705, 600, 96, 0.00197397, 1, 1.29046, 0, 0, 0
+
+
+10. Checking Queue Status
+==============================================================================
+Queue control is built into the qcontol.sh script (see "Setup MQ Environment" above).
+
+Sample usage:
+
+1. Show the status of queues 5 to 10:
+[mqm@tintin occimqdemo]$ ./qcontrol.sh qstatus 5..10
+
+2. Clear queues 1 to 10:
+[mqm@tintin occimqdemo]$ ./qcontrol.sh clearq 1..10
+
+
+
+
+
+
+
+
+
View
BIN  occimqdemo.tgz
Binary file not shown
View
159 oraAlertLog.pl
@@ -0,0 +1,159 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+oraAlertLog.pl
+
+=head1 SYNOPSIS
+
+Find and tail the Oracle alert log.
+See http://tardate.blogspot.com/2007/04/find-and-tail-oracle-alert-log.html for discussion.
+
+$Id: oraAlertLog.pl,v 1.8 2007/04/22 23:27:04 paulg Exp $
+
+=head1 DESCRIPTION
+
+USAGE:
+ perl oraAlertLog.pl OPTIONS
+
+OPTIONS:
+ [-i] show information about the Oracle environment and log location
+ [-f] tail the alert log
+ [-h] help
+
+=head1 AUTHOR
+
+Paul Gallagher gallagher.paul@gmail.com
+http://tardate.blogspot.com
+
+=cut
+
+use strict;
+use Carp;
+use IO::Handle;
+use DBI;
+use DBD::Oracle qw(:ora_session_modes);
+use Env qw(ORACLE_SID ORACLE_HOME);
+use Getopt::Std;
+use File::Basename;
+
+my $VERSION = 1.0;
+
+my ($scriptBase, $scriptPath, $scriptSuffix) = fileparse($0, qr/\..*/);
+
+my %option = ();
+getopts('ifh', \%option);
+
+if ($option{i}) {
+ info();
+}
+elsif ($option{f}) {
+ tailLog();
+}
+else {
+ usage();
+}
+
+1;
+
+
+sub usage
+{
+ my ($msg) = @_;
+ if ($msg) {
+ print "\nWARNING: $msg\n";
+ }
+ print <<END_OF_USAGE;
+
+PURPOSE: Find and tail the Oracle alert log.
+
+USAGE:
+ perl oraAlertLog.pl OPTIONS
+
+OPTIONS:
+ [-i] show information about the Oracle environment and log location
+ [-f] tail the alert log
+ [-h] help
+
+END_OF_USAGE
+
+ print "Version: $VERSION ".'Last modified: $Date: 2007/04/22 23:27:04 $'."\n";
+ exit;
+}
+
+
+sub getAlertLogName
+{
+ my $alertlog="";
+ use vars qw($cachedalertlog);
+ $cachedalertlog="";
+
+ if (!defined(${ORACLE_SID}) || !(${ORACLE_SID} =~ /\S/) ) {
+ print STDERR "ORACLE environment not available.\n\n";
+ exit(1);
+ }
+
+ my $cacheFile="${scriptPath}${scriptBase}.${ORACLE_SID}.conf";
+
+ my $skipdb=0;
+ my $dbh = DBI->connect('dbi:Oracle:', '', '',
+ {ora_session_mode => ORA_SYSDBA , RaiseError => 0, PrintError => 0, AutoCommit => 0}) or
+ $skipdb=1;
+ $skipdb or
+ my $sth = $dbh->prepare(q{SELECT value FROM v$parameter WHERE name = 'background_dump_dest'}) or
+ $skipdb=1;
+ if (!$skipdb) {
+ $sth->execute;
+ my $row = $sth->fetchrow_hashref;
+ $sth->finish;
+ $alertlog=$row->{VALUE};
+ $dbh->disconnect;
+ }
+
+ if ( $alertlog =~ /\S/ ) {
+ $alertlog .= "/alert_${ORACLE_SID}.log";
+ }
+ else {
+ print "ORACLE not available.Checking for cached settings..\n";
+ open( my $fh, "<", $cacheFile) or croak("Problem opening conf file $cacheFile : $!");
+ while (<$fh>) {
+ chomp;
+ if (/^\s*alertlog\s*=/i) {
+ s/.*=\s*//;
+ $alertlog= $_;
+ }
+ }
+ close $fh;
+ }
+ if ( $alertlog !~ /\S/ ) {
+ croak( "Could not determine alert log location.");
+ }
+ else {
+ open( my $fh, ">", $cacheFile) or croak("Problem opening cache file $cacheFile : $!");
+ print $fh "alertlog=${alertlog}\n";
+ close($fh);
+ }
+ return $alertlog;
+}
+
+
+sub info
+{
+ my $fn = getAlertLogName();
+ print "ORACLE_HOME = " . $ORACLE_HOME . "\n";
+ print "ORACLE_SID = " . $ORACLE_SID . "\n";
+ print "ALERT LOG = " . $fn . "\n";
+}
+
+
+sub tailLog
+{
+ my $fn = getAlertLogName();
+ my $log;
+ open (LOGFILE, $fn) or croak("can't open $fn: $!");
+ for (;;) {
+ while (<LOGFILE>) { print }
+ sleep 1;
+ LOGFILE->clearerr();
+ }
+}
View
102 oraAlertLog.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+# simple script to help find and tail the Oracle alert log
+#
+# Paul Gallagher gallagher.paul@gmail.com
+# http://tardate.blogspot.com/2007/04/find-and-tail-oracle-alert-log.html
+#
+# $Id: oraAlertLog.sh,v 1.9 2007/04/22 05:17:36 oracle Exp $
+#
+
+scriptPath=${0%/*}/
+scriptName=${0#$scriptPath*}
+cacheFile=${0%.*}.${ORACLE_SID}.conf
+alertlog=
+
+function setAlertLogName() {
+
+ if [ "$ORACLE_SID" = "" ]
+ then
+ echo "ORACLE environment not available." >&2
+ exit 1
+ fi
+
+ alertlog=$(sqlplus -S \/ as sysdba 2> /dev/null <<EOF
+SET NEWPAGE 0
+SET SPACE 0
+SET LINESIZE 80
+SET PAGESIZE 0
+SET ECHO OFF
+SET FEEDBACK OFF
+SET VERIFY OFF
+SET HEADING OFF
+SELECT value
+FROM v\$parameter
+WHERE name = 'background_dump_dest';
+EOF
+)
+
+ if [ $(echo $alertlog | grep -c "ORA-\|ERR") -gt 0 ]
+ then
+ echo "ORACLE not available. Checking for cached settings.." >&2
+ alertlog=
+ fi
+ if [ "$alertlog" = "" ]
+ then
+ . $cacheFile
+ else
+ alertlog=${alertlog}/alert_${ORACLE_SID}.log
+ fi
+ if [ "$alertlog" = "" ]
+ then
+ echo "Could not determine alert log location." >&2
+ exit 1
+ else
+ echo "alertlog=${alertlog}" > $cacheFile
+ fi
+
+}
+
+function info() {
+ setAlertLogName
+ echo "ORACLE_HOME = $ORACLE_HOME"
+ echo "ORACLE_SID = $ORACLE_SID"
+ echo "ALERT LOG = ${alertlog}"
+}
+
+function tailLog() {
+ setAlertLogName
+ tail -f $alertlog
+}
+
+function usage() {
+ cat <<EOF
+
+ $0 -i ... show Oracle environment and log info
+ $0 -f ... tail the alert log
+
+EOF
+ exit
+}
+
+# handle case of no parameters
+if [ $# -eq 0 ]
+then
+ usage
+fi
+
+# process parameters
+while getopts "if" options
+do
+ case $options in
+ f )
+ tailLog
+ ;;
+ i )
+ info
+ ;;
+ \? )
+ usage
+ ;;
+ esac
+done
+
View
107 oracleForumRSS.pl
@@ -0,0 +1,107 @@
+#!/usr/bin/perl
+
+=head1 NAME
+
+oracleForumRSS.pl - a CGI script to generate RSS feed of recent posts by a
+specified author to the Oracle forums at http://forums.oracle.com
+
+=head1 VERSION
+
+$Id: oracleForumRSS.pl,v 1.6 2007/05/13 17:16:56 oracle Exp $
+
+=head1 DESCRIPTION
+
+For more information, see: http://tardate.blogspot.com/2007/05/getting-your-oracle-forum-posts-as-rss.html
+
+=head1 REQUIRES
+
+CGI
+XML::RSS::SimpleGen
+
+=head1 AUTHOR
+
+gallagher.paul@gmail.com
+
+=cut
+
+
+use strict;
+
+use CGI qw (:standard escapeHTML);
+use XML::RSS::SimpleGen;
+
+my $userID = param("userID");
+my $userName = param("userName");
+my $webMaster = $ENV{'SERVER_ADMIN'};
+
+if ($userID) {
+ sendAuthorRss( $userID, $userName );
+} else {
+ sendConfigPage();
+}
+
+1;
+
+
+# send configuration page
+sub sendConfigPage {
+ my $style=<<END;
+ BODY {
+ background-color: cyan;
+ }
+ P {
+ font-size: 10pt;
+ font-family: sans-serif;
+ color: black;
+ }
+END
+
+ print header();
+ print start_html(-title=>'Oracle Forum - Author RSS Feed',
+ -author=>$webMaster,
+ -style=>$style );
+
+ print p( 'This script will generate an RSS feed of all recent posts to the ' .
+ a({-href=>'http://forums.oracle.com'}, 'Oracle Forums') . ' by the user you specify here.' );
+ print start_form(-method=>'GET',-action=>'');
+
+ print p( 'Forum User ID: ' . textfield(-name=>'userID') . ' (you will need to look this up. It is the numeric userID value)' );
+
+ print p( 'Display name: ' . textfield(-name=>'userName') . ' (make up a screen name for the user)' );
+
+ print submit('Submit','submit');
+
+ print endform();
+
+ print end_html();
+}
+
+
+# generate the RSS feed for given author
+sub sendAuthorRss {
+ my $userID = shift;
+ my $userName = shift;
+
+ my $urlRel = 'http://forums.oracle.com/forums/';
+ my $url = $urlRel . 'profile.jspa?userID=' . $userID . '&start=0';
+
+
+ rss_new( $url, "My Activity in the Oracle Forums", "Recent Posts By " . $userName );
+ rss_language( 'en' );
+ rss_webmaster( $webMaster );
+ rss_updatePeriod('daily');
+
+ get_url( $url );
+
+ while(
+ m{jive-thread-name.*?<a href="(.*?)"\s*>(.*?)</a>.*?<nobr>.*?<nobr>.*?<nobr>.*?<nobr>.*?<nobr>(.*?)</nobr>.*?<div class="preview">(.*?)</}sg
+ ) {
+ #print "url:$1, title:$2, date:$3, desc:$4\n";
+ rss_item("$urlRel$1", $2, $4);
+ }
+
+ print "Content-type: text/xml\n\n";
+ print rss_as_string();
+
+}
+
View
128 ownMySmc.pl
@@ -0,0 +1,128 @@
+#!/usr/bin/perl -w
+=head1 NAME
+ $Id: ownMySmc.pl,v 1.3 2007/05/13 18:29:30 paulg Exp $
+=head1 VERSION
+ 1.0
+=head1 DESCRIPTION
+ demonstrates security flaw (reported to SMC and CERT) in SMC wifi routers
+ see also: http://tardate.blogspot.com/2007/02/letting-strangers-on-your-wifi-need.html
+
+ HTTP POST Details:
+
+<form method="POST" action="http://192.168.2.1/cgi-bin/restore.exe" name="RebootForm">
+<input type="hidden" name="page" value="tools_restore">
+<input type="hidden" name="logout">
+To restore the factory default settings of the system,click on the &quot;SAVE SETTINGS&quot; button.
+<input type="submit" name="savesetting" value="SAVE SETTINGS">
+
+<form method="POST" action="/cgi-bin/restart.exe" name="RebootForm">
+<input type="submit" name="savesetting" value="REBOOT ROUTER">
+
+/cgi-bin/setup_pass.exe
+<input type="hidden" name="restart_time" value="0">
+<input type="hidden" name="reload" value="0">
+<input type="hidden" name="restart_page" value="">
+<input type="hidden" name="location_page" value="system_remote_mgmt.stm">
+<input type="password" size="12" maxlength="12" name="userOldPswd" value="">
+<input type="password" size="12" maxlength="12" name="userNewPswd" value="">
+<input type="password" size="12" maxlength="12" name="userConPswd" value="">
+<input type="text" name="timeout" size="3" maxlength="3">
+<input type="submit" name="savesetting" value="SAVE SETTINGS">
+
+
+=head1 AUTHOR
+ Paul Gallagher gallagher.paul@gmail.com
+
+=cut
+
+use strict;
+use warnings;
+
+use Getopt::Long;
+use LWP::UserAgent;
+use HTTP::Response;
+use Sys::Hostname;
+use NetAddr::IP;
+
+my $opt_help;
+my $opt_gw;
+
+GetOptions(
+ "help" => \$opt_help,
+ "gw=s" => \$opt_gw
+);
+my $opt_cmd = shift;
+
+usage() if $opt_help;
+usage() unless defined($opt_cmd);
+
+# guess the gateway
+if (! $opt_gw) {
+$opt_gw = (NetAddr::IP->new(hostname,'255.255.255.0')->network + 1)->addr;
+print "Guess your gateway is ", $opt_gw, "\n";
+} else {
+print "Using gateway ", $opt_gw, "\n";
+}
+
+# now branch to operation
+if ( $opt_cmd =~ /reboot/i ) {
+ reboot();
+}
+if ( $opt_cmd =~ /ownme/i ) {
+ factoryreset();
+}
+
+1;
+
+sub reboot {
+
+ print "Commencing router reboot...";
+ my $ua = LWP::UserAgent->new();
+ my $url = 'http://' . $opt_gw . '/cgi-bin/restart.exe';
+
+ my $response = $ua->post( $url, { savesetting => 'REBOOT ROUTER' } );
+
+ if ($response->is_redirect()) {
+ print ".. rebooting\n";
+ } else {
+ print ".. hmm, not the expected response:\n";
+ print $response->content();
+ }
+ return;
+}
+
+sub factoryreset {
+
+ print "Attempting to reset factory defaults ...";
+
+ my $ua = LWP::UserAgent->new();
+ my $url = 'http://' . $opt_gw . '/cgi-bin/restore.exe';
+
+ my $response = $ua->post( $url, { savesetting => 'SAVE SETTINGS' } );
+
+ if ($response->is_redirect()) {
+ print ".. reset. Go to http://${opt_gw}/ and try password of 'smcadmin'\n";
+ } else {
+ print ".. hmm, not the expected response:\n";
+ print $response->content();
+ }
+ return;
+}
+
+sub usage {
+ print <<END_OF_USAGE;
+Usage:
+ ownMySmc.pl [options] [command]
+
+ options:
+ -help # this message
+ -gw=<value> # set specific gateway address (use if script can't guess correctly)
+
+ commands:
+ reboot # reboots router
+ ownme # performs factory reset and reboot
+
+END_OF_USAGE
+
+ exit;
+}
View
103 regexplainr.pl
@@ -0,0 +1,103 @@
+#!/usr/bin/perl -w
+=head1 NAME
+
+regexplainr.pl - a CGI script to explain regex (using YAPE::Regex::Explain)
+
+=head1 VERSION
+
+$Id: regexplainr.pl,v 1.9 2008/02/24 12:51:10 paulg Exp $
+
+=head1 DESCRIPTION
+
+For more information, see: http://tardate.blogspot.com/2008/02/explaining-regular-expressions.html
+
+=head1 REQUIRES
+
+CGI
+YAPE::Regex
+YAPE::Regex::Explain
+
+=head1 AUTHOR
+
+gallagher.paul@gmail.com
+
+=cut
+
+
+use strict;
+
+use CGI qw (:standard escapeHTML escape);
+use YAPE::Regex::Explain;
+
+my $regex = param("regex");
+
+sendRegexPage( $regex );
+
+1;
+
+
+
+# send configuration page
+sub sendRegexPage {
+ my $regex = shift;
+ my $webMaster = $ENV{'SERVER_ADMIN'};
+ my $style=<<END;
+ BODY {
+ background-color: white;
+ font-size: 10pt;
+ font-family: sans-serif;
+ color: black;
+ }
+ h1 {
+ font-size: 18pt;
+ font-family: sans-serif;
+ }
+ h2 {
+ font-size: 14pt;
+ font-family: sans-serif;
+ }
+ blockquote {
+ font-family:courier new;
+ font-size:85%;
+ background: Gainsboro;
+ border: 1px solid LightSlateGray;
+ padding: 5px 5px;
+ white-space: pre;
+ }
+END
+
+ print header();
+ print start_html(-title=>'RegExplainr',
+ -author=>$webMaster,
+ -style=>$style );
+
+ print h1( 'RegExplainr!' );
+ print p( 'Helps to explain Regular Expressions. Discussion of this script is on my ' .
+ a({-href=>'http://tardate.blogspot.com/2008/02/explaining-regular-expressions.html'}, 'tardate') . ' blog.' );
+ print start_form(-method=>'POST',-action=>url());
+
+ print p( 'Regular Expression: ' . textfield(-name=>'regex', -size=>80) );
+
+ print submit('submit','Explain!');
+
+ print endform();
+
+ if ($regex) {
+ print p( i( a({-href=>url() . '?regex=' . escape($regex) }, 'Permalink to this regexplanation')));
+ my $exp = YAPE::Regex::Explain->new($regex)->explain;
+ print blockquote( escapeHTML( $exp ) );
+ }
+
+ print h2( 'Some Regular Expression Resources..' );
+
+ print ul(
+ li([
+ a({-href=>'http://en.wikipedia.org/wiki/Regular_expression'}, 'Wikipedia on Regular expressions'),
+ a({-href=>'http://www.regular-expressions.info/'}, 'Regular-Expressions.info'),
+ a({-href=>'http://del.icio.us/popular/regex'}, 'regex @ del.icio.us'),
+ a({-href=>'http://www.amazon.com/gp/product/0596528124?ie=UTF8&tag=itsaprli-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596528124'}, 'Mastering Regular Expressions (O\'Reilly)')
+ ])
+ );
+
+ print end_html();
+}
View
79 scriptWithConfigTemplate.cmd
@@ -0,0 +1,79 @@
+@echo off
+REM $Id: scriptWithConfigTemplate.cmd,v 1.2 2008/05/20 15:28:56 paulg Exp $
+
+setlocal
+
+echo Welcome to %0
+
+REM Initialise the config flag [CONFIGSET] and config file [LOCALCONF]
+REM You must name the config file .bat or .cmd to ensure Windows can execute it cleanly
+set CONFIGSET=NO
+
+REM this sets LOCALCONF to be a config file in the conf subdirectory relative to this script,
+REM named ThisScriptName-ComputerName.cmd
+set LOCALCONF=%~dp0conf\%~n0-%COMPUTERNAME%.cmd
+
+REM ===============================================================
+REM Configuration section
+REM ---------------------------------------------------------------
+if "%LOCALCONF%"=="" goto config_help
+goto config_do
+
+
+:config_help
+echo This is a configuration help script
+echo Call from another script with first parameter being the config file name
+echo This script will set the variable CONFIGSET
+echo CONFIGSET=NO in the case of error or undefined configuration
+echo CONFIGSET=YES in the case where configuration has been successfully read
+goto config_exit
+
+
+:config_do
+REM handle configuration file
+IF EXIST %LOCALCONF% goto config_cont
+
+REM generate default setting file
+REM adapt this to you needs. Here are some samples
+echo REM configuration file> %LOCALCONF%
+echo set JAVA_HOME=C:\bin\jdk1.6.0_03>> %LOCALCONF%
+echo set TMPFILE=c:\temp\mytemp.txt>> %LOCALCONF%
+echo set SUBJECT=A subject line>> %LOCALCONF%
+echo set DBUID=dbusername>> %LOCALCONF%
+echo set DBPWD=dbpassword>> %LOCALCONF%
+
+echo #
+echo # Local configuration not yet set.
+echo # A default configuration file (%LOCALCONF%) has been created.
+echo # Review and edit this file, then run this process again.
+echo #
+goto config_exit
+
+
+:config_cont
+call %LOCALCONF%
+set CONFIGSET=YES
+
+
+:config_exit
+if "%CONFIGSET%"=="YES" goto config_ok
+echo Configuration is not set
+goto exit
+:config_ok
+REM ---------------------------------------------------------------
+REM Configuration section ends
+REM ===============================================================
+
+
+echo The main script starts from here.
+
+echo The following configuration is set:
+echo JAVA_HOME=%JAVA_HOME%
+echo TMPFILE=%TMPFILE%
+echo SUBJECT=%SUBJECT%
+echo DBUID=%DBUID%
+echo DBPWD=%DBPWD%
+
+
+:exit
+endlocal
View
BIN  shlong10.zip
Binary file not shown
View
BIN  tardate.jdev.ide.filter.10.1.3-src.zip
Binary file not shown
View
BIN  tardate.jdev.ide.filter.10.1.3.jar
Binary file not shown
View
157 testOraTempTables.pl
@@ -0,0 +1,157 @@
+#!/usr/bin/perl -w
+#
+# demonstrates/tests the use of Oracle temporary tables with DBI
+# this was prompted by the discussion on perl.dbi.users list concerning
+# SQL Server/ODBC temp tables "disappearing"
+# See: http://www.nntp.perl.org/group/perl.dbi.users/2007/05/msg31390.html
+#
+# bottom line is that temp table behaviour with Oracle seems to work fine
+#
+# blogged about this at http://tardate.blogspot.com/2007/05/do-oracle-temp-tables-behave-correctly.html
+#
+# $Id: testOraTempTables.pl,v 1.3 2007/05/11 14:22:14 paulg Exp $
+#
+
+use DBI qw(:sql_types);
+use Carp;
+
+use strict;
+
+# Set trace level if '-# trace_level' option is given
+DBI->trace( shift ) if 1 < @ARGV && $ARGV[0] =~ /^-#/ && shift;
+
+die "syntax: $0 [-# trace] sid user pass" if 3 > @ARGV;
+my ( $sid, $user, $pass ) = @ARGV;
+
+# Connect to database
+print "[1st connection] connect to $sid {AutoCommit => 1}:\n";
+my $dbh = DBI->connect( "dbi:Oracle:$sid", $user, $pass,
+ { AutoCommit => 1, RaiseError => 0, PrintError => 1 } )
+ or croak $DBI::errstr;
+
+my $sth;
+
+my $s1 = "create global temporary table t1 (x varchar2(10)) on commit preserve rows";
+print "[1st connection] create global temp table: $s1\n";
+$sth = $dbh->prepare($s1);
+$sth->execute() or carp "$s1 creation failure\n";
+
+
+# put some data into it
+my $s2 = "insert into t1 values (?)";
+print "[1st connection] insert 3 rows of data into it: $s2\n";
+$sth = $dbh->prepare( $s2 );
+$sth->bind_param(1, "row #1");
+$sth->execute() or carp "$s2 failed\n";
+$sth->execute() or carp "$s2 failed\n";
+$sth->execute() or carp "$s2 failed\n";
+$sth->finish;
+
+$s2 = "select count(*) from t1";
+print "[1st connection] should be 3 rows because we have \"on commit preserve rows\" set: $s2 = ";
+printResults ($dbh, "$s2");
+
+# 2nd Connection to database
+print "[2nd connection] connect to $sid:\n";
+my $dbh2 = DBI->connect( "dbi:Oracle:$sid", $user, $pass,
+ { AutoCommit => 1, RaiseError => 0, PrintError => 1 } )
+ or croak $DBI::errstr;
+$s2 = "select count(*) from t1";
+print "[2nd connection] should be 0 rows because while the table definition is shared, the data is not: $s2 = ";
+printResults ($dbh2, "$s2");
+print "[2nd connection] disconnect:\n";
+$dbh2->disconnect;
+
+print "[1st connection] disconnect:\n";
+$dbh->disconnect;
+
+print "[1st connection] reconnect {AutoCommit => 0}:\n";
+$dbh = DBI->connect( "dbi:Oracle:$sid", $user, $pass,
+ { AutoCommit => 0, RaiseError => 0, PrintError => 1 } )
+ or croak $DBI::errstr;
+
+$s2 = "select count(*) from t1";
+print "[1st connection] should be 0 rows because this is a new session: $s2 = ";
+printResults ($dbh, "$s2");
+
+$s2 = "drop table t1";
+print "[1st connection] drop the temp table: $s2\n";
+$dbh->do( $s2 ) or carp "drop table failed\n";
+
+# now test with AutoCommit => 0 and on commit delete rows
+$s1 = "create global temporary table t1 (x varchar2(10)) on commit delete rows";
+print "[1st connection] create global temp table: $s1\n";
+$sth = $dbh->prepare($s1);
+$sth->execute() or carp "$s1 creation failure\n";
+
+
+# put some data into it
+$s2 = "insert into t1 values (?)";
+print "[1st connection] insert 3 rows of data into it: $s2\n";
+$sth = $dbh->prepare( $s2 );
+$sth->bind_param(1, "row #1");
+$sth->execute() or carp "$s2 failed\n";
+$sth->execute() or carp "$s2 failed\n";
+$sth->execute() or carp "$s2 failed\n";
+$sth->finish;
+
+$s2 = "select count(*) from t1";
+print "[1st connection] should be 3 rows because we have autocommit off and not committed yet: $s2 = ";
+printResults ($dbh, "$s2");
+
+$dbh->commit();
+
+$s2 = "select count(*) from t1";
+print "[1st connection] should be 0 rows because now we have committed: $s2 = ";
+printResults ($dbh, "$s2");
+
+print "[1st connection] disconnect:\n";
+$dbh->disconnect;
+
+print "[1st connection] reconnect {AutoCommit => 1}:\n";
+$dbh = DBI->connect( "dbi:Oracle:$sid", $user, $pass,
+ { AutoCommit => 1, RaiseError => 0, PrintError => 1 } )
+ or croak $DBI::errstr;
+
+# put some data into it
+$s2 = "insert into t1 values (?)";
+print "[1st connection] insert 3 rows of data into it: $s2\n";
+$sth = $dbh->prepare( $s2 );
+$sth->bind_param(1, "row #1");
+$sth->execute() or carp "$s2 failed\n";
+$sth->execute() or carp "$s2 failed\n";
+$sth->execute() or carp "$s2 failed\n";
+$sth->finish;
+
+# should be no data because we have autocommit on and "on commit delete rows" defined
+$s2 = "select count(*) from t1";
+print "[1st connection] should be 0 rows because we have autocommit on and \"on commit delete rows\" defined: $s2 = ";
+printResults ($dbh, "$s2");
+
+print "[1st connection] disconnect:\n";
+$dbh->disconnect;
+
+print "[1st connection] reconnect {AutoCommit => 0}:\n";
+$dbh = DBI->connect( "dbi:Oracle:$sid", $user, $pass,
+ { AutoCommit => 0, RaiseError => 0, PrintError => 1 } )
+ or croak $DBI::errstr;
+
+$s2 = "drop table t1";
+print "[1st connection] drop the temp table: $s2\n";
+$dbh->do( $s2 ) or carp "drop table failed\n";
+
+print "[1st connection] disconnect:\n";
+$dbh->disconnect;
+
+
+1;
+
+# function to execute a query and print results
+sub printResults {
+ my ($dbh, $sql) = @_;
+ my $rows = $dbh->selectall_arrayref( $sql ) or carp "$sql failed\n";;
+ foreach my $row (@$rows) {
+ print join(", ", map {defined $_ ? $_ : "(null)"} @$row), "\n";
+ }
+}
+
View
233 validateSso.sh
@@ -0,0 +1,233 @@
+#!/bin/bash
+#-----------------------------------------------------------------------
+# Purpose: verification of directory-integrated Oracle SSO configuration.
+# See: http://tardate.blogspot.com/2007/05/validating-oracle-sso-configuration.html
+# for a discussion of this script.
+#
+# This script performs a series of tests, which at the time of writting are
+# thought to be a good indication that your SSO server credentials are
+# properly setup. This script makes no changes in the ORASSO schema or OID.
+# No warranty is made that this script will give a correct certification
+# that Oracle SSO and OID are properly configured.
+#
+# The script performs the following tests:
+#
+# 1. Retrieve the ORASSO schema password from orclResourceName=ORASSO in ldap
+# 2. Verifying that the SSO_SERVER details from ORASSO schema are valid
+# 3. Verifying that the SSO_SERVER specified in ORASSO can bind to OID
+# 4. Verifying that the SSO_SERVER has the necessary OID group memberships
+#
+# For more information, see:
+# Note:315534.1 How to Verify that SSO can Communicate with OID
+# Note:191352.1 How Do I Find the Randomized Password Assigned to ORASSO?
+# Note:199633.1 Unix Script to Determine orasso Password
+# Bug: 4992712 For information on group memberships
+#
+# The script is configured using a .conf file of the same name as this script.
+# If the .conf does not exist, the script will generate a
+# default template on first execution.
+#
+# The script assumes an appropriate ORACLE environment is set when script
+# is invoked (but you can set it in the .conf file if you wish).
+#
+# Author: Paul Gallagher
+# $Id: validateSso.sh,v 1.14 2007/05/20 02:58:41 paulg Exp $
+#-----------------------------------------------------------------------
+
+#
+# determine script path and name, configuration file name
+#
+scriptPath=${0%/*}/
+scriptName=${0#$scriptPath*}
+confFile=${0%.*}.conf
+tmpFile=${0%.*}.tmp
+
+
+#
+# set/load configuration settings
+#
+if [ ! -e $confFile ]
+then
+ # generate a default configuration file
+cat > $confFile <<END_DEFAULT_CONF
+#-----------------------------------------------------------------------
+# CONFIGURATION SETTINGS
+# NB: to modify, edit $confFile. Do not edit these in $scriptName
+
+# TNS name of the database containing the ORASSO schema to check
+my_sid=ORCL
+
+# LDAP/OID host and port used by the SSO service
+my_ldaphost=localhost
+my_ldapport=389
+my_adminuid=cn=orcladmin
+
+# END CONFIGURATION SETTINGS
+#-----------------------------------------------------------------------
+END_DEFAULT_CONF
+echo "***************************************************************"
+echo "A default configuration file has been generated in $confFile"
+echo "Please review/customise this file and then re-run $scriptName"
+exit 0
+fi
+# load configuration
+. $confFile
+
+
+#
+# banner
+#
+echo "***************************************************************"
+echo "Oracle directory-integrated SSO configuration verification"
+echo ""
+
+#
+# get the directory password if not already set (in conf file)
+#
+if [ "$my_adminpwd" = "" ]
+ then
+ echo -n "Enter the directory admin ($my_adminuid) password: " >&2
+ read -s my_adminpwd
+ echo ""
+fi
+
+
+#
+#
+echo ""
+echo "STEP 1"
+echo "Retrieve the ORASSO schema password from orclResourceName=ORASSO in ldap://${my_ldaphost}:${my_ldapport}"
+
+orclpasswordattribute=$(ldapsearch -D $my_adminuid -w $my_adminpwd -p $my_ldapport -h $my_ldaphost -b "cn=IAS, cn=Products, cn=OracleContext" -s sub orclResourceName=ORASSO orclpasswordattribute |tail -n 1 | awk 'BEGIN { FS="=" } ; { print $2 }')
+rc=$?
+
+if [ $orclpasswordattribute ]
+then
+ echo "... ORASSO schema password retrieved [$orclpasswordattribute]"
+else
+ echo "*** Failed to retrieve the ORASSO schema password. [rc=$rc]"
+ echo "Can't go much further - need to know the ORASSO schema password and this needs to be set in OID."
+ echo "To find out how to do this, see: XXXXXX [TODO]"
+fi
+
+
+#
+#
+echo ""
+echo "STEP 2"
+echo "Retrieve SSO configuration from ORASSO schema"
+
+sqlplus /nolog > $tmpFile 2> /dev/null <<CHECK_LDAP_CONFIG
+conn orasso/${orclpasswordattribute}@${my_sid}
+set serveroutput on
+exec wwsso_oid_integration.show_ldap_config;
+exit
+CHECK_LDAP_CONFIG
+
+#returns:
+# OID HOST: oid-ais.aozora.lan
+#SSO_OID_HOST=
+# OID PORT: 10238
+#SSO_OID_PORT=
+# SSO SERVER DN:
+#SSO_DN=orclApplicationCommonName=ORASSO_SSOSERVER,cn=SSO,cn=Products,cn=OracleContext
+# OID USE SSL: Y
+#SSO_SERVER_PASSWORD=FAFF00152CEB87BA21A4EF3A7BCD495A
+SSO_SSL=$(grep "OID USE SSL" $tmpFile | awk 'BEGIN { FS=":" } ; { print $2 }' | sed "s/^\s*//g")
+echo "SSO_SSL=$SSO_SSL"
+SSO_OID_HOST=$(grep "OID HOST" $tmpFile | awk 'BEGIN { FS=":" } ; { print $2 }' | sed "s/^\s*//g")
+echo "SSO_OID_HOST=$SSO_OID_HOST"
+SSO_OID_PORT=$(grep "OID PORT" $tmpFile | awk 'BEGIN { FS=":" } ; { print $2 }' | sed "s/^\s*//g")
+echo "SSO_OID_PORT=$SSO_OID_PORT"
+SSO_DN=$(grep "cn=OracleContext" $tmpFile | sed "s/^\s*//g")
+echo "SSO_DN=$SSO_DN"
+SSO_SERVER_PASSWORD=$(grep "SSO SERVER PASSWORD" $tmpFile | awk 'BEGIN { FS=":" } ; { print $2 }' | sed "s/^\s*//g")
+echo "SSO_SERVER_PASSWORD=$SSO_SERVER_PASSWORD"
+
+
+#
+#
+echo ""
+echo "STEP 3"
+echo "Verifying that the SSO_SERVER details from ORASSO schema are valid"
+
+if [ "$SSO_OID_HOST" = "$my_ldaphost" ]
+then
+ echo "... OID host registered for SSO matches the one you told me to use [$my_ldaphost]"
+else
+ echo "*** OID host registered for SSO [$SSO_OID_HOST] is"
+ echo " NOT the same as the one you told me to use [$my_ldaphost]"
+fi
+
+if [ "$SSO_OID_PORT" = "$my_ldapport" ]
+then
+ echo "... OID port registered for SSO matches the one you told me to use [$my_ldapport]"
+else
+ echo "*** OID port registered for SSO [$SSO_OID_PORT] is"
+ echo " NOT the same as the one you told me to use [$my_ldapport]"
+fi
+
+
+#
+#
+echo ""
+echo "STEP 4"
+echo "Verifying that the SSO_SERVER specified in ORASSO can bind to OID"
+
+# now try to bind using the password registered:
+ssoServerBind=$(ldapbind -h $my_ldaphost -p $my_ldapport -D "$SSO_DN" -w $SSO_SERVER_PASSWORD)
+rc=$?
+echo "rc=$rc"
+echo "$ssoServerBind"
+
+if [ "$rc" != "0" ]
+then
+ ssoServerBind="bind failed"
+fi
+
+if [ "$ssoServerBind" = "bind successful" ]
+then
+ echo "... successfully connected to OID using credentials for $SSO_DN"
+else
+ echo "*** Failed to bind to OID using credentials for $SSO_DN. [rc=$rc]"
+ echo "Can't go much further - the SSO_SERVER credentials need to be valid for OID."
+ echo "You _may_ need to reset the SSO_SERVER password in OID. e.g.:"
+ echo ""
+ echo " ldapmodify -h $my_ldaphost -p $my_ldapport -D $my_adminuid -w $my_adminpwd <<MOD_ORASSO_PWD"
+ echo " dn: $SSO_DN"
+ echo " changetype:modify"
+ echo " replace:userpassword"
+ echo " userpassword:$SSO_SERVER_PASSWORD"
+ echo " MOD_ORASSO_PWD"
+ echo ""
+ exit
+fi
+
+
+#
+#
+echo ""
+echo "STEP 5"
+echo "Verifying that the SSO_SERVER has the necessary OID group memberships"
+
+# first, get unique list entries as recorded in the uniquemember attribute of the list
+search=$( echo "$SSO_DN" | awk 'BEGIN { FS="," } ; { print $1 }')
+search="(&(uniquemember=*${search}*)(objectclass=orclPrivilegeGroup))"
+attribs="dn"
+base="cn=Groups,cn=OracleContext"
+
+echo "$SSO_DN is a member of the following security groups:"
+
+for v_ownerdn in `ldapsearch -p $my_ldapport -h $my_ldaphost -b $base -D $my_adminuid -w $my_adminpwd -s sub $search $attribs | sed '/^filter\|^returning\|^ldap_open\|^$\|matches$\|^mail=/d'`
+do
+ echo "... $v_ownerdn"
+done
+
+echo ""
+echo "DONE"
+
+
+#
+# cleanup
+#
+rm $tmpFile 2> /dev/null
View
BIN  varc10b3.zip
Binary file not shown
View
26 whosOnPort.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# See Linux Server Hacks #54
+# $Id: whosOnPort.sh,v 1.5 2007/03/28 06:50:09 oracle Exp $
+#
+
+port=$1
+# get the process info (pid/name). restricted to tcp only
+procinfo=$( netstat --numeric-ports -nlp 2> /dev/null | \
+ grep ^tcp | grep -w ${port} | tail -n 1 | awk '{print $7}' )
+
+case "${procinfo}" in
+"")
+ echo "No process listening on port ${port}"
+ ;;
+
+"-")
+ echo "Process is running on ${port}, but current user does not have rights to see process information."
+ ;;
+
+*)
+ echo "${procinfo} is running on port ${port}"
+ ps -uwep ${procinfo%/*}
+ ;;
+
+esac
+
View
BIN  windowsBatchConfigPatterns.tgz
Binary file not shown
View
BIN  xeol11.zip
Binary file not shown
View
129 xmltypeinsert-testcase.pl
@@ -0,0 +1,129 @@
+#!/usr/bin/perl -w
+# see DATA section below for info
+# $Id: xmltypeinsert-testcase.pl,v 1.3 2007/04/22 02:48:37 paulg Exp $
+#
+
+use strict;
+use warnings;
+
+use DBI qw(:sql_types);
+use XML::Simple;
+
+die "syntax: $0 sid user pass xml-elements" if 4 > @ARGV;
+my ( $inst, $user, $pass, $xmlElements ) = @ARGV;
+
+# define how much xml data to insert
+print "create a long xml structure or $xmlElements elements (3000 or more should cause ORA fault on insert)\n";
+
+# generate an xml chunk
+my @books;
+my %dslong;
+for (my $i=1; $i<$xmlElements; $i++) {
+ push(@books, {id => $i, title => [ "the book $i title" ] } );
+}
+$dslong{"book"} = \@books;
+
+# Connect to database
+my $dbh = DBI->connect( "dbi:Oracle:$inst", $user, $pass,
+ { AutoCommit => 1, RaiseError => 0, PrintError => 1 } )
+ or die $DBI::errstr;
+
+print "create the database table:\n";
+$dbh->do( qq{
+CREATE TABLE xmlinserttest
+ ( fname VARCHAR(25)
+ ,file_header XMLTYPE
+)
+} ) or warn "table creation failure";
+
+
+print "insert:\n";
+my $sth = $dbh->prepare(qq{
+ INSERT INTO xmlinserttest
+ (fname
+ ,file_header
+ )
+ VALUES
+ (:fname
+ ,SYS.XMLType.CreateXML(:file_header)
+ )
+ }) || die $DBI::errstr;
+
+$sth->bind_param(":fname", "INSERTXMLTYPE");
+$sth->bind_param(":file_header", XMLout( \%dslong , RootName => "books") );
+$sth->execute or warn "INSERTXMLTYPE creation failure";
+
+print "list table contents:\n";
+list( qq{
+SELECT fname,dbms_lob.getlength(xmltype.getclobval(file_header)) FROM xmlinserttest
+});
+
+print "drop the database table:\n";
+$dbh->do( qq{
+drop table xmlinserttest
+} ) or warn "table drop failure";
+
+$dbh->disconnect;
+
+1;
+
+# function to list the tables
+sub list {
+ my ($sql) = @_;
+ my $rows = $dbh->selectall_arrayref( $sql );
+ foreach my $row (@$rows) {
+ print join(", ", map {defined $_ ? $_ : "(null)"} @$row), "\n";
+ }
+ return;
+}
+
+__END__
+
+
+=head1 NAME
+
+DBD::Oracle - Oracle database driver for the DBI module
+
+=head1 SYNOPSIS
+
+perl xmltypeinsert-testcase.pl {SID} {user} {password} {xml-elements}
+
+e.g.
+
+perl xmltypeinsert-testcase.pl ORCL scott tiger 10
+
+.. will test using scott/tiger@ORCL with an XML record of 10 elements
+
+
+=head1 TEST RESULTS
+
+-----------------------------------------------------------
+-- Paul Gallagher gallagher.paul@gmail.com 17-Feb-2007 ----
+
+Environment:
+ 1. ActiveState Perl 5.8.8 on Windows XP
+ 2. DBI 1.52-r1
+ 3. DBD::Oracle v1.17
+ 4. Database: Oracle v10.2.0.2 on RHEL3
+
+Results:
+
+ if xmlElements>63, insert fails with:
+ DBD::Oracle::st execute failed: ORA-01461: can bind a LONG value only for insert into a LONG column
+
+ explicit typing the xml as CLOB will fail with ORA-00942: table or view does not exist.
+ e.g. bind like this:
+ $sth->bind_param(":file_header", XMLout( \%dslong , RootName => "books"), { TYPE => SQL_CLOB } );
+
+------------------------------------------------------------
+-- Garrett, Philip Philip.Garrett@manheim.com 18-Feb-2007 --
+
+Environment:
+ 1. DBD::Oracle v1.19
+
+Results:
+ Philip confirmed on dbi-users that limit still remains with 1.19
+
+------------------------------------------------------------
+
+=cut
Please sign in to comment.
Something went wrong with that request. Please try again.