Hi ,
I want to pass parameters from a shell script to a sql script and use the parameter in the sql query ..and then I want to spool a particular select query on to my unix box... for 4 different locations by writing only one sql script
Right now no file is generated on the unix box...it is a... (2 Replies)
Hi,
I am trying to pass some of the variables in my shell scripts to the sqlplus call and use them as parameters.
For example, I would like to replace the 'SAS', and '20050612' with $var1 and $var2, respectively, how can I do that?
--------------------------------------------------------... (1 Reply)
Hey Guys
from the below script what I understood is we are sending the the first parameter as input to the main (){} file
main > $LOGFILE 2>&1
but can we send two or three parameter as input to this main file as
main > $LOGFILE 2>&1 2>&2 like this
Can any one plz help I need to writ a... (0 Replies)
Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files..
Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this?
Please tell me... (2 Replies)
Hi,
Currently i have a .sql file 1.sql.
I need to pass that as a parameter through a shell script to the sqlplus inside the same shell script.
How I should I do.can anyone help me pls.
I have an req where I need to send the .sql file and the place where the script has to create a .csv... (9 Replies)
if
then
# mail -s "Import failed file does not exist" sanjay.jaiswal@xyz.com
echo "FILE does not exist"
exit 1
fi
echo "FILE EXIST"
size=-1
set $(du /export/home/oracle/nas/scott21.dmp.gz)
while
do
echo "Inside the loop"
size=$1
set $(du... (1 Reply)
Why does this work
for myfile in `find . -name "R*VER" -mtime +1`
do
SHELLVAR=`grep ^err $myfile || echo "No error"`
ECHO $SHELLVAR
done
and outputs
No error
err ->BIST Login Fail 3922 err
No error
err ->IR Remote Key 1 3310 err
But... (2 Replies)
Hello All,
I am interested in finding out a way to pass parameters that are entered at the prompt from HP unix and passed to SQLPlus code with a Shell Script. Is this possible?
Thanks (4 Replies)
hello friend good morning
I have a problem, how can I take the value that the PROCEDURE returns to me in the variable "CodError", when the connection to the bbdd is closed I lose the value and I need it in the shell
#AIX
cat <<EOF | sqlplus -s ${ORA_LOGIN}/${ORA_PASSWORD} > $logftmp
set... (6 Replies)
Discussion started by: tricampeon81
6 Replies
LEARN ABOUT MOJAVE
sql::translator::parser::dbix::class
SQL::Translator::Parser::DBIx::Class(3) User Contributed Perl Documentation SQL::Translator::Parser::DBIx::Class(3)NAME
SQL::Translator::Parser::DBIx::Class - Create a SQL::Translator schema from a DBIx::Class::Schema instance
SYNOPSIS
## Via DBIx::Class
use MyApp::Schema;
my $schema = MyApp::Schema->connect("dbi:SQLite:something.db");
$schema->create_ddl_dir();
## or
$schema->deploy();
## Standalone
use MyApp::Schema;
use SQL::Translator;
my $schema = MyApp::Schema->connect;
my $trans = SQL::Translator->new (
parser => 'SQL::Translator::Parser::DBIx::Class',
parser_args => {
dbic_schema => $schema,
add_fk_index => 0,
sources => [qw/
Artist
CD
/],
},
producer => 'SQLite',
) or die SQL::Translator->error;
my $out = $trans->translate() or die $trans->error;
DESCRIPTION
This class requires SQL::Translator installed to work.
"SQL::Translator::Parser::DBIx::Class" reads a DBIx::Class schema, interrogates the columns, and stuffs it all in an $sqlt_schema object.
Its primary use is in deploying database layouts described as a set of DBIx::Class classes, to a database. To do this, see "deploy" in
DBIx::Class::Schema.
This can also be achieved by having DBIx::Class export the schema as a set of SQL files ready for import into your database, or passed to
other machines that need to have your application installed but don't have SQL::Translator installed. To do this see "create_ddl_dir" in
DBIx::Class::Schema.
PARSER OPTIONS
dbic_schema
The DBIx::Class schema (either an instance or a class name) to be parsed. This argument is in fact optional - instead one can supply it
later at translation time as an argument to "translate" in SQL::Translator. In other words both of the following invocations are valid and
will produce conceptually identical output:
my $yaml = SQL::Translator->new(
parser => 'SQL::Translator::Parser::DBIx::Class',
parser_args => {
dbic_schema => $schema,
},
producer => 'SQL::Translator::Producer::YAML',
)->translate;
my $yaml = SQL::Translator->new(
parser => 'SQL::Translator::Parser::DBIx::Class',
producer => 'SQL::Translator::Producer::YAML',
)->translate(data => $schema);
add_fk_index
Create an index for each foreign key. Enabled by default, as having indexed foreign key columns is normally the sensible thing to do.
sources
Arguments: @class_names
Limit the amount of parsed sources by supplying an explicit list of source names.
SEE ALSO
SQL::Translator, DBIx::Class::Schema
AUTHORS
See "CONTRIBUTORS" in DBIx::Class.
LICENSE
You may distribute this code under the same terms as Perl itself.
perl v5.18.2 2014-01-22 SQL::Translator::Parser::DBIx::Class(3)