10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All,
I am trying to write a script which will generate output to a file based on input files on basis of a pattern which I am able to do so. But, I am stuck as I am trying to connect this to database server. Below is my command and output details.
Input Code
filedate=$(date... (6 Replies)
Discussion started by: grvk101
6 Replies
2. Shell Programming and Scripting
could someone please help me in shell scripting. i want to connect to oracle database which is on remote sever.
requirement:
1 want to check files in source directory if file exist then a execute a corresponding batch jobs on unix sever and fetch data from oracle database which is on remote... (2 Replies)
Discussion started by: refi123
2 Replies
3. Shell Programming and Scripting
Hi Friends,
I have a one unix box "x.y.z" on SunOS , where oracle is not installed. And another machine "a.b.c" on AIX , where oracle is installed. Now i want to make a script on x.y.z , that can connect to database on a.b.c, using sqlplus command. and then generate a report based on the... (5 Replies)
Discussion started by: gauravgarg
5 Replies
4. UNIX for Dummies Questions & Answers
How to connect a MySQL database from unix using unix shell scripting ( people are using perl scrpt to connect the same database).
I want to access a MySQL database through a shell script (4 Replies)
Discussion started by: apsprabhu
4 Replies
5. Shell Programming and Scripting
Hi all
I am working in datawarehouse project and use DB2 database . shell scripting is written to connect with DB2 database in my application but i dont know how to connect with oracle databse or other databases.Is there any command in unix to connect any of these datbases? (6 Replies)
Discussion started by: vijays3
6 Replies
6. Windows & DOS: Issues & Discussions
hi,
I'd like to connect to a Sybase ASE 12 through a a graphic user interface (GUI) that run on windows and solaris10, because i need to do some querys.
The database is running on solaris 10.
I'm not an expert using databases, but i know how to use some SQL commands through command line... (3 Replies)
Discussion started by: danin
3 Replies
7. Shell Programming and Scripting
Hi,
could you please help me out what are the command line commands to connect to as400.
Thanks, (0 Replies)
Discussion started by: mgirinath
0 Replies
8. IP Networking
i am working on informix database
can any body helps me with coding how to connect to it on solaris (3 Replies)
Discussion started by: ramneek
3 Replies
9. Programming
Anybody please help me how connect a database file in TC for windows.
regards
Senthil. K (5 Replies)
Discussion started by: Senthil
5 Replies
10. Shell Programming and Scripting
please, help me-....
i need connect to a database Sybase IQ 12 and I don't know if i can do it using a shell program.
if it's posibble, please tell me how...
please, help me, because I don't know what to do....
thanks...
jonathan (1 Reply)
Discussion started by: DebianJ
1 Replies
LedgerSMB::DBTest(3pm) User Contributed Perl Documentation LedgerSMB::DBTest(3pm)
NAME
LedgerSMB::DBTest - LedgerSMB commit filter for test cases.
SYOPSIS
This module creates a DBI-like interface but ensures autocommit is off, and filters commit statements such that they don't do anything.
This can be used for making API test cases which involve DB commits safe for production environments.
USAGE
Both LedgerSMB.pm and LedgerSMB/Form.pm assign a global database handler for all database access within a script in the dbh property (for
example, $request->{dbh} or $form->{dbh}). By setting this early to a LedgerSMB::DBTest (instead of a DBI object), the tests can be made
safe.
However, there are a few limitations to be aware of. One cannot run tests through the standard request handler and use this module. Hence
this is limited to unit tests of files in the LedgerSMB, scripts, and bin directories.
Here is an example of how this could be done:
my $lsmb = LedgerSMB->new();
$lsmb->merge($testdata);
my $dbh = LedgerSMB::DBTest->connect("dbi:Pg:dbname=$company", "$username",
"$password",)
$lsmb->{dbh} = $dbh;
METHODS
connect($dsn, $user, $pass)
Connects to the database and returns a LedgerSMB::DBTest object
commit()
Tests the current transaction (issues a 'SELECT 1;' to the database). If this is successful returns 1, if not, rolls back and returns
false.
Note that this means all past tests are rolled back and this is inconsistent with normal transactional behavior.
prepare()
Returns a statement handle, via the private DBI database handle.
do()
passes this statement on to the private database handle
errstr()
passes this call on to the private database handle
err()
passes this call on to the private database handle
quote()
passes this call on to the private database handle
quote_identifier()
passes this call on to the private database handle
rollback()
passes this call on to the private database handle. Note that this will roll back all statements issues through this object.
perl v5.14.2 2010-03-02 LedgerSMB::DBTest(3pm)