11-15-2009
Quote:
Just a general hint: Thy to avoid using shell + sqlplus if you are dealing with a large number of data and complex logic.
Great hint !
Generally for bulk loading I dont prefer a shell invoking a client to do that, instead establish a connection ( specific connection_id is returned ) to the database. Since you are using perl to do that, interfaces are very much available to connect to oracle database.
Also, the commit after number of records plays a vital and role, that should be determined before.
1) Few number of records and a commit after that will bring down the performance
2) Too many records and a commit - possibility of filling the redo log buffer, corruption of buffer and if operation should fail the retry logic should work out on all the records again
As requested earlier by adderek, please post some stats that you are trying to load
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We ran into an issue trying to install DBI and DB2 modules for perl for AIX from the link
http://www-306.ibm.com/software/data/db2/perl/
We tried to install the DBI module using
bash# perl -MCPAN -e 'install DBI'
command. However we ended up with the following error.
Stop.
... (3 Replies)
Discussion started by: jerardfjay
3 Replies
2. Programming
hi i am trying to connect to an oracle database using dbi and i get this ::
Driver has not implemented the disconnect_all method. at /opt/perl/lib/site_perl/5.8.0/sun4-solaris/DBI.pm line 575
END failed--call queue aborted.
for all i know, the script was working earlier, but has... (1 Reply)
Discussion started by: poggendroff
1 Replies
3. Shell Programming and Scripting
Hi, i have some queries on installing the Perl DBI and the DBD Oracle.
I know that i have to install the DBI first. I have the source files in a folder in my home directory.The commands to install arecd /home/DBI
Perl Makefile.PL
make
make installI would like to know, after executing these... (4 Replies)
Discussion started by: new2ss
4 Replies
4. Shell Programming and Scripting
Hi,
I want to connect perl with the mysql to select and so on but the connection don't work
code
#!/usr/bin/perl
BEGIN {
# PERL MODULES WE WILL BE USING
use DBI;
$dbh = DBI->connect('DBI:mysql:C:\Program Files\MySQL\MySQL Server 5.0\data\db1','','pass') or die $DBI::errstr;}
#... (1 Reply)
Discussion started by: eng_shimaa
1 Replies
5. UNIX for Advanced & Expert Users
i've been struggling with installing the Perl DBI & DBD modules all weekend, and I'm getting close, but no cigar as of yet. When I run the perl script db.pl I get the following mismatch error:
Mon Apr 19 09:43:29 EDT 2010
/Library/Perl/DBD-mysql-4.011 ->
peterv@MBP17.local<515>$: db.pl | tee... (0 Replies)
Discussion started by: peterv6
0 Replies
6. Shell Programming and Scripting
Hi there, I have a bit of code similar to below (which ive actually got from perldoc, but mine is similar enough)
$sth = $dbh->prepare(q{ SELECT region, sales FROM sales_by_region });
$sth->execute;
my ($region, $sales);
# Bind Perl variables to columns:
$rv =... (4 Replies)
Discussion started by: hcclnoodles
4 Replies
7. Shell Programming and Scripting
Hi All,
I installed DBI module in a non INC location and using it in my script via "use lib".
But it throw the below error at the "use DBI" step.
Please help
Usage: DBI::_install_method(dbi_class, meth_name, file, attribs=Nullsv) at /xx/xxx/xxxxx/xxxxx/oracle/lib/DBI.pm/oracle/lib/DBI.pm line... (2 Replies)
Discussion started by: prasperl
2 Replies
8. Shell Programming and Scripting
Experts,
I've been struggling with making a Perl Oracle DBI script to work through my Apache webserver.
Mysql DBI scripts work fine, but I'm having issue's with Oracle.
The oracle script works on command line, but I'm getting an
"Internal Server Error" with apache
Sourcing the oracle... (0 Replies)
Discussion started by: timj123
0 Replies
LEARN ABOUT MOJAVE
au_close
AU_OPEN(3) BSD Library Functions Manual AU_OPEN(3)
NAME
au_close, au_close_buffer, au_close_token, au_open, au_write -- create and commit audit records
LIBRARY
Basic Security Module Library (libbsm, -lbsm)
SYNOPSIS
#include <bsm/libbsm.h>
int
au_open(void);
int
au_write(int d, token_t *tok);
int
au_close(int d, int keep, short event);
int
au_close_buffer(int d, short event, u_char *buffer, size_t *buflen);
int
au_close_token(token_t *tok, u_char *buffer, size_t *buflen);
DESCRIPTION
These interfaces allow applications to allocate audit records, construct a record using a series of tokens, and commit the audit record to
the system event log. An extension API is also provided to commit the record to an in-memory buffer rather than the system audit log.
The au_open() interface allocates a new audit record descriptor.
The au_write() interface adds a token to an allocated audit descriptor. When a token has been successfully added to a record, the caller no
longer owns the token memory, and does not need to free it directly via a call to au_free_token(3).
The au_close() function is used to commit an audit record to the system audit log, or abandon the record. In either cases, all resources
associated with the record will be released. The keep argument determines the behavior: a value of AU_TO_WRITE causes the record to be com-
mitted; a value of AU_TO_NO_WRITE causes it to be abandoned. When the audit record is committed, a BSM header will be inserted before tokens
added to the record, using the event identifier passed via event, and a trailer added to the end. Committing a record to the system audit
log requires privilege.
The au_close_buffer() function writes the resulting record to an in-memory buffer of size *buflen; it will write back the filled buffer
length into the same variable. The argument event is the event identifier to use in the record header.
The au_close_token() function generates the BSM stream output for a single token, tok, in the passed buffer buffer. The initial buffer size
and resulting data size are passed via *buflen. The au_close_token() function will free the token before returning.
RETURN VALUES
The function au_open() returns a non-negative audit record descriptor number on success, or a negative value on failure, along with error
information in errno.
The functions au_write(), au_close(), au_close_buffer(), and au_close_token() return 0 on success, or a negative value on failure, along with
error information in errno.
SEE ALSO
audit_submit(3), libbsm(3)
HISTORY
The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer, Inc., in
2004. It was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution.
AUTHORS
This software was created by Robert Watson, Wayne Salamon, and Suresh Krishnaswamy for McAfee Research, the security research division of
McAfee, Inc., under contract to Apple Computer, Inc.
The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems.
BUGS
Currently, au_open() does not reserve kernel resources necessary to commit the record to the trail; on systems supporting au_close(), the
call will block until resources are available to commit the record. However, this leads to the possibility of an action being permitted
without the record being guaranteed to go to disk. Ideally, au_open() would reserve resources necessary to commit any submitted record,
releasing them on au_close().
BSD
March 4, 2006 BSD