Hi,
Can anyone plz share their experience with -
Building shell script to append the file with date in following format-
Filename_MMDDYYYY.txt
Thanks in advance (2 Replies)
Hi Guys,
the requirement is like this,
i am having a error log file in this format,
4594.493: parallel nursery GC 2594592K->2544691K (2969600K), 30.848 ms
4605.958: parallel nursery GC 2634887K->2584986K (2969600K), 38.900 ms
4619.079: parallel nursery GC 2822555K->2774812K... (12 Replies)
Hi,
This run times recorded in UX shell script appears peculiar to me. The PL / SQL stored procedure is called through sqlplus from UNIX shell script and then a log is created with run times recorded.
The first set has actually taken 6 Hrs but the recorded time indicates it is only 2 Hrs and... (1 Reply)
Hi,
I have gps receiver log..its giving readings .like below
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GPSD,R=1
$GPGSV,3,1,11,08,16,328,40,11,36,127,00,28,33,283,39,20,11,165,00*71... (3 Replies)
When I write
Select date_field from TableA fetch first row only
I am getting the output as 09/25/2009.
I want to get the output in the below format
2009-09-25 i.e., MM-DD-YYYY. Please help (7 Replies)
Hi all,
I am executing shell script in which I am using SQLLDR
In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to spool in another text file. Currently I have given this in script file as following
Spool... (2 Replies)
this is my issue.
4 parameters are passed from korn shell to sql script.
parameter_1= varchar2 datatype or no value entered my user.
parameter_2= number datatype or no value entered my user.
parameter_3= number datatype or no value entered my user.
parameter_4= number datatype or no... (5 Replies)
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
I am running a cron job, every 6 hours a day (6 AM, 12 PM, 6 PM, and 12 AM),
#!/usr/bin/ksh
......
$SQLPLUS / as sysdba <<!
@/home/oracle/scripts/daily.sql
!
cat /home/oracle/scripts/dbsizedaily.lst | mail -s "$TODAY: PROD DB Size" $RECIPIENTS
"@/home/oracle/scripts/daily.sql" has ... (7 Replies)
I am developing one script which will take log file name, output file name, date, hour and minute as an argument and based on these inputs, the script will scan and capture all the error(s) that have been triggered from a given time. Example: script should capture all the error after 13:50 on Jan... (2 Replies)
Discussion started by: ROMA3
2 Replies
LEARN ABOUT DEBIAN
sql::translator::producer::oracle
SQL::Translator::Producer::Oracle(3pm) User Contributed Perl Documentation SQL::Translator::Producer::Oracle(3pm)NAME
SQL::Translator::Producer::Oracle - Oracle SQL producer
SYNOPSIS
use SQL::Translator;
my $t = SQL::Translator->new( parser => '...', producer => 'Oracle' );
print $translator->translate( $file );
DESCRIPTION
Creates an SQL DDL suitable for Oracle.
producer_args
delay_constraints
This option remove the primary key and other key constraints from the CREATE TABLE statement and adds ALTER TABLEs at the end with it.
quote_field_names
Controls whether quotes are being used around column names in generated DDL.
quote_table_names
Controls whether quotes are being used around table, sequence and trigger names in generated DDL.
NOTES
Autoincremental primary keys
This producer uses sequences and triggers to autoincrement primary key columns, if necessary. SQLPlus and DBI expect a slightly different
syntax of CREATE TRIGGER statement. You might have noticed that this producer returns a scalar containing all statements concatenated by
newlines or an array of single statements depending on the context (scalar, array) it has been called in.
SQLPlus expects following trigger syntax:
CREATE OR REPLACE TRIGGER ai_person_id
BEFORE INSERT ON person
FOR EACH ROW WHEN (
new.id IS NULL OR new.id = 0
)
BEGIN
SELECT sq_person_id.nextval
INTO :new.id
FROM dual;
END;
/
Whereas if you want to create the same trigger using "do" in DBI, you need to omit the last slash:
my $dbh = DBI->connect('dbi:Oracle:mysid', 'scott', 'tiger');
$dbh->do("
CREATE OR REPLACE TRIGGER ai_person_id
BEFORE INSERT ON person
FOR EACH ROW WHEN (
new.id IS NULL OR new.id = 0
)
BEGIN
SELECT sq_person_id.nextval
INTO :new.id
FROM dual;
END;
");
If you call this producer in array context, we expect you want to process the returned array of statements using DBI like "deploy" in
DBIx::Class::Schema does.
To get this working we removed the slash in those statements in version 0.09002 of SQL::Translator when called in array context. In scalar
context the slash will be still there to ensure compatibility with SQLPlus.
CREDITS
Mad props to Tim Bunce for much of the logic stolen from his "mysql2ora" script.
AUTHORS
Ken Youens-Clark <kclark@cpan.org>, Alexander Hartmaier <abraxxa@cpan.org>, Fabien Wernli <faxmodem@cpan.org>.
SEE ALSO
SQL::Translator, DDL::Oracle, mysql2ora.
perl v5.14.2 2012-01-18 SQL::Translator::Producer::Oracle(3pm)