Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Unix script which scans through the LOG and gets output to a Databse table for analyzing

Posted on 2012-08-14
2
Medium Priority
?
607 Views
Last Modified: 2012-08-15
I have been asnwered this question using Control file by slightwv which was excellent but
can anyone give me a script written in UNIX

which reads this lopg file based on either timestamp or  thread (reader/writer/transformer)
and load into a database table
ASH-SIL-parloactionfactlog.xlsx
ASH-SIL-parloactionfactlog1.txt
0
Comment
Question by:neonag
2 Comments
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 1000 total points
ID: 38295633
which database?
which table?
which unix?
which shell?

anyway, your database should have some kind of import/load function which can be called to import your (probably tab-separared) file into the table
simple, isn't it?
0
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 38295769
I agree.  You are taking an simple process and trying to complicate it.

I mean you can pound in a nail with a screwdriver but a hammer is the correct tool.

Even if you create the script to parse the file, you still need something to connect to thee database to perform the DML.  This would likely involve a loop and multiple calls to a sqlplus here script or perl calls to actually perform the insert.

There is NO way this will be faster than the sql loader script I provided in yor other question.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question