Stanford::LSDB

(Wrapper module for LS database connections)

SYNOPSIS

    use Stanford::LSDB;

    $dbh = Stanford::LSDB->connect ("$host:$sid", $user, $passwd);

    $dbh = Stanford::LSDB->connect_file ("$host:$sid", $user, $file);

DESCRIPTION

This is a small wrapper module around the DBI and DBD::mysql modules that takes care of building a connect string. It's meant to be subclassed by other modules to provide a username, password, host, and SID so that the user doesn't even need to know that.

The only overrided method is connect(). All other methods should work the same as DBI. connect() will automatically set the PrintError option to false and the RaiseError and AutoCommit options to true. (These can, of course, be changed later.)

This module also provides the following additional methods:

connect_file (connect-string, username, file [, extra ...])

Takes the same arguments as connect(), except that the password provided is instead a file name, which will be opened and read to obtain the file. Assumes the password is on the first line of the file, terminated by a newline.

sqlldr (user, file, control, log [, extra ...])

Runs Oracle's sqlldr command with the provided control and log files, connecting with the given username and reading the password from the provided file. Returns 0 on success and the exit status of sqlldr on failure, where success is defined as sqlldr exiting with status 0.

AUTHOR

Russ Allbery <rra@stanford.edu>

SEE ALSO

DBI, DBD::Oracle

COPYRIGHT AND LICENSE

Copyright 2001, 2004, 2008 Board of Trustees, Leland Stanford Jr. University. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Last spun 2022-12-12 from POD modified 2014-07-18