Amber Vaidya

Ranch Hand
+ Follow
since Oct 14, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Amber Vaidya

Thanks for the suggestions. My initial thought was to do it all in Java which was validated by you guys.
Thanks again !
16 years ago
I have a requirement in which I need to load multipl files into an Oracle database.
The actual code to read and load these files is written in Java because there a lot of business validations etc that need to be done on these files prior to loading.
There is a shell script that ftps/scps these files from a remote location to the working area (Linux server).
If a file fails due to some reason, the rest of the files should continue to be loaded.

My question is where should I loop and why? The concern is more around trying to find the better option when loading huge files.

Option 1 - Loop in the shell script
-----------------------------------


Option 2 - Loop in the java file
-----------------------------------
16 years ago
Hi,

I have a system that needs to update two databases (both Oracle 10g) in a single transaction.
The question is; if I create a DBLink between the two Oracle databases and treat this transaction as a normal transaction (not XA) would it work?

The system is a standalone java application (not deployed on any web/app server) and I am using Spring for JDBC.

If you think that the above approach will not work, can you please suggest an alternative?

Thanks in advance !!
Nope.. That does not work because I need the ACCTMGRIDs in a comma separated list on one row.

Here's the one that finally worked
I have 2 tables, TARGETLIST and ACCOUNT_MANAGER as follows


For all the CUSTOMERIDs in TARGETLIST, I am trying to find out the ACCTMGRIDs from ACCOUNT_MANAGER in a comma separted string

The data conditions are

1. There can be one or more ACCTMGRIDs per CUSTOMERID in the ACCOUNT_MANAGER table.
2. Not all the CUSTOMERIDs from TARGETLIST will be in the ACCOUNT_MANAGER table.
3. The TARGETLIST table may have multiple rows with the same CUSTOMERID

So, the final result should ideally look like this:


Here's the query I came up with, but its not working .


It gives out a result like


Can someone please help me?

Thanks in advance
Alright guys, so what you are saying is, I should write a shell script that submits the job to the utility and track the progress of the PID in the script (wait till the pid is active before finishing the script).
From my Java code, I should call the shell script and wait for the script to finish executing.

That seems feasible. Let me try it out.
Thanks !!
17 years ago
Hi All,

I have some java code that submits jobs to a utility running on Sun Solaris using the ProcessBuilder class of 1.5

The code is fairly simple. I am reading the error and output streams in separate threads too.



Now, my problem is that the utility, I am using, does not wait for the job to complete. Rather, it returns as soon as it submits the job(And returns the Pid of the process that is running the job).
This makes proc.waitFor() to return with 0 even though actually the job/process is still executing.

Any idea on how I can make Java wait for the actual process to finish?

Any help is appreciated.

Thanks,
Amber
[ October 26, 2007: Message edited by: Bear Bibeault ]
17 years ago
Here's what I was trying to do



Basically, run the function once per CUST_ID. Sorry if I did not explain it clearly.

Thanks anyway.
That's exactly where I am stuck . I need the first three columns to appear as they do in the expected result (with the same CUST_ID appearing multiple times) , but the value in the last column (VAL_MSG) can appear either once for every CUST_ID or multiple times.

The purpose is to determine if the customer has a valid bank account or not.

Is this possible with a single query?
Hi,

I have an oracle table called T_CUSTOMER_DEBT as follows

This table contains close to 200,000 records for 3000 unique CUST_IDs.

I need to print a report that lists down these 3 coulmns and also checks if a bank account exists for
the customer in the system.
There is a separate function to check if the bank account exists called pkg_val.fnc_error_msgs().

The query that I wrote was as follows


Now, the problem is that even though this query returns the correct results, it is very slow.
I assume its because it is running the function for all the rows (200,000).

Is there any way I can write a query that would return the same results as the above query but
execute the function only for unique/distinct CUST_IDs (3000) ?

Expected result is



Please help !! Thanks in advance.

- Amber

[edited subject - was "URGENT !! Please help with this query .."]
[ March 13, 2007: Message edited by: Jeanne Boyarsky ]
Hi All,

I have a requirement to display 2 select boxes (say "left" and "right") and be able to move items from one select box to the other and vice-versa with the click of 2 buttons (say "Move to Right" and "Move to Left")

This is simple, but the catch is that when I move the items back from "right" to "left" they should go back to the position in which they were earlier.

For example, when the page is first displayed I have the following items in the "left" select box (dynamically generated by querying the database)



Now, I move "General Manager" and "Sales Manager" from "left" to "right" and then move "General Manager" back from "right" to "left".
"General Manager" now appears at the botton in "left". My requirement is that it should appear at its original position i.e second in the list.

Is this even possible? And if yes, can someone please point me in the correct direction to get this done.

Thanks in advance !!
Hi All,

I have a webpage with 2 frames. One frame contains a HTML menu, with each link of this menu, opening a page (JSP) in the other frame.
The menu and most of the other pages are deployed on Websphere Application Server 3.5.
But, one of these pages is an external application deployed on Weblogic 6.1.

My problem is as follows:

If the user stays on the page hosted on Weblogic for more than 1 hour and then clicks on the menu, Websphere times out and throws the application login page. The same happens if the user stays on the Websphere part of the application for more than an hour and then tries to access the Weblogic part.
I want to prevent this because to the end user, its one single application.

Any suggestions on how to avoid this?
Any help is appreciated.

Thanks in advance.
Amber
19 years ago
JSP
Found the solution ...

I needed to put the HungServerRecoverSecs entry in the IfModule tag of httpd.conf file

It works now
19 years ago
Hi All,

I am using Apache 2.0 with Weblogic 7.0.

We have a report generation feature in our application which processes millions of records.
The SQL query that retrieves these records typically takes 8-10 min to return the result :roll:

Now, the problem is when my servlet calls the data access object to execute the query, I see a thread being started for this process(in the weblogic logs), but after about 4-5 min I get the following error in Apache logs

READ_TIMEOUT [os error=0, line 202 of ../nsapi/Reader.cpp]: no read after 300 seconds



and a new thread is started which starts the execution from the beginning (As if a new request has been made).
And it goes into an endless loop.

I tried increasing the Timeout and the ConnectTimeoutSecs parameters in the httpd.conf file, but it did not solve the problem.

Ideas, anyone ??
Any help in this regard will be appreciated.

Thanks in advance.
19 years ago
I think I got it ..
Tried this out



and it seems to be working fine.

Please let me know incase anyone sees any problem with this approach.

Thanks !!
19 years ago