Can anyone provide me some input or pseudo code for my req as mentioned below...
I am loading 2 files through unix script into oracle table...as i am doing some updates also i am getting an error where both files try to update the table simultaneously and my script fails..
so i need to put some logic where if one file is updating the table then no other other try to load and once previous file loaded successfully then only second file try to load the table..
I have to use only one script so dont have an option to create new script and run sequentially..
How can you update a table from two files in one script in parallel/simultaneously? If you put one "load" into background and then lock the table, in effect the "loads" will run sequentially.
Select ... for update will lock the table for the entire transaction (ended by commit/rollback/ending the session), so if you make very small transactions for "parallel" (in fact "ping pong") updates, you'll pay a price in transaction speed.
i guess i couldnt explain correctly..please ignore my previous post my actual req is as below mentioned..
load_cdr-->main script
Source Feeds are A & B.
File in A-akm.dat
File in B-bkm.dat
Now my script runs through cron jobs everyday...and for both A&B it runs parllely...i.e script will start loading data from akm also and bkm also...prob is these two files try to update same table at some point and gives an error.
for eg: i use one script named as daily.sh which consist of commands which start my script
I cannot go with an option where i run my script sequentially for each source Feeds. So need smthing like sleep command usage ..
**when ever any feed's file start loading it creates some lock file..
eg: if akm.dat dile of source feed A is getting loaded in temp dir A.lck file gets created and similarly for B feed also..
Now i want that my script should check if A.lck file exist in that folder and if it is present and B feed try to load then script loading B feed should go into sleep mode and check in every 5 min if A.lck file got removed or not..once it got removed B file starts loading
It might be bit confusing ..so please let me knw if i missed ny pt.
Hello Folks,
I'm working on a requirement to automate the process of generating report(csv file) using metadata info stored in an Oracle table and E-mail it to respective people.
Meta data table:
Report_ID,Report_SUB_ID,Report_DB,Report_SQL,Report_to_email_Id
1,1,DEV,'select * From... (2 Replies)
Hello All,
I'm trying to spool an oracle table data into a csv file on unix server but the complete record is not being extracted. The record is almost 1000 characters but only 100 characters are being extracted and rest of the data getting truncated.
I'm setting below options :
SET... (4 Replies)
hi,
i need to copy one table with data into another table,
right now am using
create table table1 as select * from table2
i want the constraints of table1 to be copied to table2 also , can anyone give me some solution to copy the constraints also, now am using oracle 10.2.0.3.0... (1 Reply)
Hi,
Is it possible to delete oracle table datas using a UNIX script/Shell script?
how can we do this??
I have oracle Database and i have to delete millions of record everyday.. adn it is taking hours togather to execute this. Will the delete query triggered from UNIX be faster can we expect any... (1 Reply)
Hi,
I am trying to insert a record into a table (say dips_tbl) which resides in Oracle DB through a ksh script. I want to insert records into few of the table columns-not all. I'll give an e.g. for the date column "CREATE_DATE".
For that I first execute
SQL1="SELECT SYSDATE FROM DUAL"
... (1 Reply)
I have requirement:
1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time (Go to sleep mode) and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch... (1 Reply)
(sorry for my english)
Hi, i have an app that uses MYSQL API C.. i trying do a timeout until the table is locked by an other thread , in the docs of Mysql i can see that MYSQL_OPT_READ_TIMEOUT is not implemented for linux ¿?¿?.. any body knows a way to do a timeout until the table is locked by... (0 Replies)
Hi ,
Can anyone help me regarding loading a unix file data to oracle database table using shell scripts?
I wanted to grep only this data from a spool file
sql_test.txt
99
00:00:00:01
but if I use grep I am getting format
sql_test.txt
99 rows selected.
Elapsed:... (2 Replies)
Hi,
I have delimited file(|).
Sample data:
1|name|50009|DS24|0|12
2|name|30009|DS24|0|13
3|name|20409|DS24|0|14
4|name|20009|DS24|0|15
5|name|10009|DS24|0|16
I want to load this data into a oracle table (update and insert)
Please help me the commands and also... (1 Reply)
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)