08-23-2012
Quote:
Originally Posted by
parthmittal2007
...For example suppose if a table student is present in master19 schema the Perl should take the back up of the table student in form of insert queries and store it in a given directory with file name student.sql
...
The easiest way to backup your database would be to export it. Check the help of the exp binary that is shipped with your Oracle client.
tyler_durden
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have written a script to perfrom a cold backup on an oracle database. The script is failing everytime. Can anyone tell me what (stupid) error I am making.
The output from the uname command follows
Linux rayora 2.2.14-6.1.1smp #1 SMP Thu Apr 13 19:55:55 EDT 2000 i686 unknown
The error... (8 Replies)
Discussion started by: beilstwh
8 Replies
2. UNIX for Dummies Questions & Answers
Hi,
i willbe very much grateful to u if u help me out..
if i simply connect pbx machine to printer by serial port RS232 then we find this view:
But i want to capture this data into database automatically when the pbx is running.The table in database will contain similar to this view inthe... (1 Reply)
Discussion started by: boss
1 Replies
3. Shell Programming and Scripting
Hey, dunno if the title really explains this well; basically my problem is (and this is on a router which is why the flash issue)...
I have some data I want to store (it's really irelevant, i'm just counting the lines per file, basically a simple counter).
I could store this data in flash but... (0 Replies)
Discussion started by: pepsi_max2k
0 Replies
4. Shell Programming and Scripting
Hi All,
I have a requirement to write a shell script for the following...
we have 3 different database.... lets say A, B, C
From these 3 DBs, i need to get data.. all have 3 different table...a,b, c
A.a => Emp_code, count(*)
B.b => emp_code, count(*)
C.c => emp_code, copunt(*)
Once get this... (4 Replies)
Discussion started by: Amit.Sagpariya
4 Replies
5. Shell Programming and Scripting
I want to use Perl to connect to a remote Oracle DB
I have no oracle installation on my server (and dont plan on installing one) I am using solaris 9 on x86 server.
Is this possible?
I basically want to run some basic sql queries on the remote oracle db which I have access to using perl on my... (0 Replies)
Discussion started by: frustrated1
0 Replies
6. Shell Programming and Scripting
I have a script like this ..
#!/bin/ksh
database=$(echo $@ | sed 's/.*-S \(*\).*/\1/')
instance=$(grep "$database" /var/opt/oracle/oratab | awk -F : '{print $1}')
command=$(echo $@ | sed 's/"$database"/"$instance"/')
echo $command
when I tried to execute the script like this ...
ksh... (5 Replies)
Discussion started by: talashil
5 Replies
7. Shell Programming and Scripting
Hello All,
I am very new to Linux i have assignment to take offline backup in linux and restore it to new database oracle 10g?
Help me out any script of it and steps i will be very thankful
Regards,
Sameer (0 Replies)
Discussion started by: sameer_123
0 Replies
8. Shell Programming and Scripting
Hi All
I am able to connect my oracle database with Perl and able to execute the queries.
There is one schema names master19 which contains 50 table.
I want to take backup of each table in and store at a given directory location in Perl
For example suppose if a table student is present in... (1 Reply)
Discussion started by: parthmittal2007
1 Replies
9. UNIX for Dummies Questions & Answers
Hi ,
I am new to Perl script.Can u please provide me perl scripts for the following:
1. Perl script on Cold backup in Oracle 10g
2.Perl script on Hot backup in Oracle 10g (0 Replies)
Discussion started by: Niharika Srivas
0 Replies
LEARN ABOUT DEBIAN
tangram::relational
Tangram::Relational(3pm) User Contributed Perl Documentation Tangram::Relational(3pm)
NAME
Tangram::Relational - Orthogonal Object Persistence in Relational Databases
SYNOPSIS
use Tangram;
$schema = Tangram::Relational->schema( $hashref );
Tangram::Relational->deploy($schema, $dbh);
$storage = Tangram::Relational->connect( $schema,
$data_source, $username, $password );
$storage->disconnect();
Tangram::Relational->retreat($schema, $dbh);
DESCRIPTION
This is the entry point in the vanilla object-relational persistence backend. Vendor-specific backends should be used when they exist. Cur-
rently Mysql, Sybase and Oracle have such backends; see Tangram::mysql, Tangram::Sybase and Tangram::Oracle.
More backends could be added in the future; they might implement persistence in XML documents, pure object databases, using C database
libraries to bypass the need for an RDBMS, etc.
CLASS METHODS
schema
$schema = Tangram::Relational->schema( $hashref );
Returns a new Schema object. See Tangram::Schema.
deploy
Tangram::Relational->deploy($schema);
Tangram::Relational->deploy($schema, HANDLE);
Tangram::Relational->deploy($schema, @dbi_args);
Writes SQL statements for preparing a database for use with the given $schema.
Called with a single argument, writes SQL statements to STDOUT.
Called with two arguments, writes SQL statements to HANDLE. HANDLE may be a DBI connection handle or a file handle.
Called with more than two arguments, passes all but the first to DBI::connect() and writes statements to the resulting DBI handle, which is
automatically closed.
The SQL code is only guaranteed to work on newly created databases.
connect
$storage = Tangram::Relational->connect( $schema,
$data_source, $user, $password, \%options )
Connects to a storage and return a handle object. Dies in case of failure.
$schema is a Schema object describing the system of classes stored in the database.
$data_source, $user and $password are passed directly to DBI::connect().
\%options is a reference to a hash containing connection options. See Tangram::Storage for a description of available options.
retreat
Tangram::Relational->retreat($schema);
Tangram::Relational->retreat($schema, HANDLE);
Tangram::Relational->retreat($schema, @dbi_args);
Remove the tables created by deploy(). Only guaranteed to work against a database that was deployed using exactly the same schema.
For an explanation of the possible argument lists, see deploy.
WRITING A VENDOR DRIVER
Like Charles Moore (inventor of Forth) used to say, "standards are great, everybody should have one!".
Tangram can take advantage of extensions available in some SQL dialects.
To create a vendor-specific driver, call it "Tangram::Foo" (where "Foo" is the name of the DBI driver, as would be selected with the DBI
connection string "dbi:Foo:"), and derive "Tangram::Relational".
For now, the existing back-ends should be used as examples of how to extend Tangram to support different databases or utilise some of their
more exotic features.
perl v5.8.8 2006-03-29 Tangram::Relational(3pm)