How To Load Files in (.log) into a table


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How To Load Files in (.log) into a table
# 1  
Old 01-28-2012
How To Load Files in (.log) into a table

Hi,

I was just wondering how can i load a files from a log file in unix into a table. e.i.

a.log contains the ff:
text.dmp
text2.dmp

Table contains the ff:
col 1 filename
col 2 date created

Thank You!
# 2  
Old 01-28-2012
You will need to write a control file and use sqlldr or similar sql data pump method (db dependant).

Other choice is use awk / perl / shell to generate insert statements from log file, that can be run against any type of database.

What is your database ?

Last edited by Peasant; 01-28-2012 at 02:43 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to load XML file to Oracle table

Experts. I have created a oracle table as below. create table xml_tab ( File_No number , File_content Varchar2(2000), file_type xmltype ); Daily we are receiving many XML files as below. here is our sample xml file. File1 : (7 Replies)
Discussion started by: vasuvv
7 Replies

2. UNIX for Dummies Questions & Answers

Load multiple files into a table

Hi, I need to load data from two files to a single table. My requirement is that I get two files in which a few column data are manadatory. These files are identified based on the file name. For example, I have two files ABCFile and BCDFile. ABCFile has mandatory data in column 3 and 4... (0 Replies)
Discussion started by: reshma15193
0 Replies

3. Shell Programming and Scripting

Load mutliple files into Netezza table

Hi All, I get ~1000 files everyday and the current unix script process one file at a time... like it unzips the file, loads into table . This process will repeat how many ever files were present in the directory. I was wondering can we process multiple files (like unzipping and loading X amount... (1 Reply)
Discussion started by: rajasony
1 Replies

4. UNIX for Dummies Questions & Answers

Log files @ high load

Hi, my VPS was overloaded and inaccessible for some time and i want to ask for help in which log files i need to look, or which tools to setup to monitor and find the cause of repeated hig load? watched: /var/log/messages /var/log/secure /var/log/httpd/access_log /var/log/httpd/error_log... (1 Reply)
Discussion started by: postcd
1 Replies

5. Shell Programming and Scripting

Load data to flat file from table.

Hi all, I need to know how to copy data from a table say ABC to a flat file say XYZ.dat in unix, Please leave ur comments and the fastest way to do so, I need to load the table records into flat file. Regards Ann (4 Replies)
Discussion started by: Haque123
4 Replies

6. Shell Programming and Scripting

How do I load records from table to a flat file!

Hi All, I need to load records from oracle table XYZ to a flat file say ABC.dat. could any one tell me how do i do this in UNXI, Regards Ann (1 Reply)
Discussion started by: Haque123
1 Replies

7. Shell Programming and Scripting

load a data from text file into a oracle table

Hi all, I have a data like, 0,R001,2,D this wants to be loaded into a oracle database table. Pl let me know how this has to be done. Thanks in advance (2 Replies)
Discussion started by: raji35
2 Replies

8. Shell Programming and Scripting

To load data from variable to oracle table ....???

Hi all, How to load variable value into Oracle table? I have created a file validation shell script. After the validation completes, i need to update a Oracle table with the variable value... Can someone help me how to do it? I have searched, but not able to get answer. i have 4 variables... (2 Replies)
Discussion started by: Amit.Sagpariya
2 Replies

9. Shell Programming and Scripting

To load data from variable to oracle table

Hi all, How to load variable value into Oracle table? I have created a file validation shell script. After the validation completes, i need to update a Oracle table with the variable value... Can someone help me how to do it? I have searched, but not able to get answer. i have 4... (1 Reply)
Discussion started by: Amit.Sagpariya
1 Replies

10. Programming

How can i load or insert a table in oracle from c language thru unix environment

I'm having a oracle server and i'm having a table in that. I'm having a linux server which is in network with the oracle server. I need to write a c program in linux env when on execution loads the table with the text file given as input. Please explain me the flow of process in that and also... (6 Replies)
Discussion started by: rramprasad
6 Replies
Login or Register to Ask a Question