Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Oradba Linux #1
Hi
I need to write a shell script that would call a sql script . While this sql
script is running i need to run another SQL in another
session continuously .
test.ksh would call test.sql which would run for about 10 -20 minutes . I
would like to call test1.sql ( which basically would be like
"select * from dual" ) and spool to a log file .
Any clues to do this will help .
Thanks
Oradba Linux Guest
-
Ban Spam #2
Re: Hi
"Oradba Linux" <oradba_linux@attbi.com> wrote in
news:fjmN9.67406$qF3.4863@sccrnsc04:
I surmise that you know neither Oracle nor Linux,> I need to write a shell script that would call a sql script . While
> this sql script is running i need to run another SQL in another
> session continuously .
> test.ksh would call test.sql which would run for about 10 -20 minutes
> . I would like to call test1.sql ( which basically would be like
> "select * from dual" ) and spool to a log file .
> Any clues to do this will help .
>
> Thanks
>
other than being able to spell each of them.
sqlplus << EOF
@test1
exit
EOF
HTH & YMMV!
Ban Spam Guest
-
Oradba Linux #3
Re: Hi
On Sun, 22 Dec 2002 19:47:46 +0000, Ban Spam wrote:
Yeah you are right thats why i am posting to newsgroup .> "Oradba Linux" <oradba_linux@attbi.com> wrote in
> news:fjmN9.67406$qF3.4863@sccrnsc04:
>> I surmise that you know neither Oracle nor Linux, other than being able to>> I need to write a shell script that would call a sql script . While this
>> sql script is running i need to run another SQL in another session
>> continuously .
>> test.ksh would call test.sql which would run for about 10 -20 minutes .
>> I would like to call test1.sql ( which basically would be like "select *
>> from dual" ) and spool to a log file . Any clues to do this will help .
>>
>> Thanks
>>
>>
> spell each of them.
>
>
> sqlplus << EOF
> @test1
> exit
> EOF
>
> HTH & YMMV!
I did not want to know how to call sql script from a korn shell script .
But i want to know how to run another SQL statement continuously (
possibly another shell script ) while this sql script is running .
Oradba Linux Guest
-
Ban Spam #4
Re: Hi
"Oradba Linux" <oradba_linux@attbi.com> wrote in
news:pan.2002.12.22.23.57.29.503034@attbi.com:
So what's stopping you from opening another "Window" on your Linux box> Yeah you are right thats why i am posting to newsgroup .
> I did not want to know how to call sql script from a korn shell script
> . But i want to know how to run another SQL statement continuously (
> possibly another shell script ) while this sql script is running .
>
and launching the 2nd script?
HAND!
Ban Spam Guest
-
Howard J. Rogers #5
Re: Hi
"Ban Spam" <ban-spam@operamail.com> wrote in message
news:Xns92ECB2C273F85SunnySD@68.6.19.6...> "Oradba Linux" <oradba_linux@attbi.com> wrote in
> news:pan.2002.12.22.23.57.29.503034@attbi.com:
>>> > Yeah you are right thats why i am posting to newsgroup .
> > I did not want to know how to call sql script from a korn shell script
> > . But i want to know how to run another SQL statement continuously (
> > possibly another shell script ) while this sql script is running .
> >
> So what's stopping you from opening another "Window" on your Linux box
> and launching the 2nd script?
>
Howard J. Rogers Guest
-
Noodles #6
Re: Hi
Why not put each SQL in its own shell and start them all at once with the nohup
and & commands? Then all of them would be running in the background "at the
same time".
However,I fail to see the reason for this requirement because you're just
competing with yourself.
Cliff
Noodles Guest
-
Howard J. Rogers #7
Re: Hi
"Noodles" <noodles@aol.com> wrote in message
news:20021223071256.21518.00000195@mb-fm.aol.com...nohup> Why not put each SQL in its own shell and start them all at once with thethe> and & commands? Then all of them would be running in the background "atWell, if you were trying to do performance tuning on a test setup, mimicing> same time".
>
> However,I fail to see the reason for this requirement because you're just
> competing with yourself.
>
as closely as possible what happens in a production environment, this would
be a very nice resource to have, don't you think?
Regards
HJR
> Cliff
Howard J. Rogers Guest
-
David Fitzjarrell #8
Re: Hi
Well, in a way you can. It's called a background job:
sqlplus user/pass @test &
sqlplus user/pass @test1 &
The '&' will submit the given task as a background job, thus returning
control to the calling shell allowing yet another statement to be
processed. If you want the first job to run in the background and
have the second job run 'live', simply remove the second '&':
sqlplus user/pass @test &
sqlplus user/pass @test1
test.sql will be executed in the background whilst test1.sql will run
in the foreground.
David Fitzjarrell
"Howard J. Rogers" <howardjr2000@yahoo.com.au> wrote in message news:<zGwN9.8566$jM5.24124@newsfeeds.bigpond.com>. ..> I think you've missed his point. He wants to run a shell script which runs
> multiple SQL scripts, and have each SQL script run asynchronously. As
> SQL1.sql runs, so the shell script starts running SQL2.sql, without waiting
> for the first one to finish and return.
>
> Can you script something asynchronously?
>
> God knows. But that's what he's after, I think.
>
> Regards
> HJR
>
>
> "Ban Spam" <ban-spam@operamail.com> wrote in message
> news:Xns92ECB2C273F85SunnySD@68.6.19.6...> > "Oradba Linux" <oradba_linux@attbi.com> wrote in
> > news:pan.2002.12.22.23.57.29.503034@attbi.com:
> >> >> > > Yeah you are right thats why i am posting to newsgroup .
> > > I did not want to know how to call sql script from a korn shell script
> > > . But i want to know how to run another SQL statement continuously (
> > > possibly another shell script ) while this sql script is running .
> > >
> > So what's stopping you from opening another "Window" on your Linux box
> > and launching the 2nd script?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > HAND!David Fitzjarrell Guest
-
Galen Boyer #9
Re: Hi
On Mon, 23 Dec 2002, [email]howardjr2000@yahoo.com.au[/email] wrote:
This can be done, but it would take a reasonable amount of testing to> I think you've missed his point. He wants to run a shell script which
> runs multiple SQL scripts, and have each SQL script run
> asynchronously. As SQL1.sql runs, so the shell script starts running
> SQL2.sql, without waiting for the first one to finish and return.
>
> Can you script something asynchronously?
>
> God knows. But that's what he's after, I think.
make sure it worked correctly.
But, first, he should probably get the cygwin distro at
[url]http://cygwin.com[/url].
Then, he should make sure he can, Start --> Run --> bash and then type
ls and get a directory listing. This will then mean that he has access
to sh.exe.
His script suite would look something like:
Call this file sql1.sh:
#!/bin/sh
sqlplus user/pass << EOF > sql1.log
`cat sql1.sql`
EOF
echo "DONE WITH SQL1" > sql1_ind.log
Call this file sql2.sh:
#!/bin/sh
while (1 eq 1) do
sqlplus user/pass << EOF >> sql1.log
`cat sql2.sql`
EOF
done
Call this file doit.sh:
#!/bin/sh
done_ind=0
sql1.sh&
while (done_ind = 0) do
if exists sql1_ind.log
done_ind = 1
fi
sleep #secs
done
So, then he could kill the background process when doit.sh completes,
but within the script he could get the process id and kill -9 it, or
something like that anyways. If that were done, then his script would
be fairly self contained.
--
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Galen Boyer Guest
-
Bermejo, Rodrigo #10
Re: Hi
--------------010506040801060709000403
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
I think we should redirect it to the perl community =)
Justin Copeland wrote:
> mpiby43agi6oaljik1m05s6v
> Stop Mailings Here
> <http://cRook-ED.com/%68os%74/%65%6d%61i%6c%72%65%6D%6F%76e.as%70>
> <http://WWW.CheaPOnnET1.COm/mk%61/%6D%32c.%70hp?%6D%61%6E=k%6f%6D%345%36>
> qspodfwj9y
> 32ct2anihpnf33
>
--------------010506040801060709000403--
Bermejo, Rodrigo Guest
-
Josef 'Jupp' Schugt #11
Re: Hi
Saluton!
* Bermejo, Rodrigo; 2003-07-02, 10:51 UTC:Or perhaps (see my message on IP matching against nets) start an> I think we should redirect it to the perl community =)
obfuscation contest of our own.
Gis,
Josef 'Jupp' Schugt
--
Someone even submitted a fingerprint for Debian Linux running on the
Microsoft Xbox. You have to love that irony :).
-- Fyodor on [email]nmap-hackers@insecure.org[/email]
Josef 'Jupp' Schugt Guest
-
Rausch Alexandru #12
Hi
MYSQL problems problems.
I want to install an user login aplicationa on my site, but it is intarely in FLASH. ( [url]www.poker.club66.ro[/url] ).
What do u think?
Rausch Alexandru Guest
-
Paul Chvostek #13
Re: Hi
On Tue, Jul 22, 2003 at 11:42:04AM +0300, Rausch Alexandru wrote:
I think this doesn't sound like a problem with "Hi", as your subject> From: "Rausch Alexandru" <rausch@go.ro>
> Subject: Hi
>
> MYSQL problems problems.
> I want to install an user login aplicationa on my site, but it is intarely in FLASH. ( [url]www.poker.club66.ro[/url] ).
> What do u think?
line indicated.
--
Paul Chvostek <paul@it.ca>
it.canada [url]http://www.it.ca/[/url]
Free PHP web hosting! [url]http://www.it.ca/web/[/url]
Paul Chvostek Guest
-
-
Wayne C. Morris #15
Re: hi
In article <woPTa.697$gr.453@ns45.bih.net.ba>,
"Almir " <ganic@bih.net.ba> wrote:
Try eBay.> Hi. I need MacOS 8.1.1 or 8.1.(english language).Thanks
Wayne C. Morris Guest
-
Sandman #16
Re: hi
In article <woPTa.697$gr.453@ns45.bih.net.ba>, "Almir " <ganic@bih.net.ba>
wrote:
Ok.> Hi. I need MacOS 8.1.1 or 8.1.(english language).Thanks
I need a new stereo, I am thinking about the Pioneer NS-DV1000. Thanks.
--
Sandman[.net]
Sandman Guest
-
ajay978 #17
hi
Hi,
I have created a UDF in java and I have registered that with DB2. I
have put the class file in sqllib\function but in DB2 v 7.2 its able
to load class but in DB2 version 8 its not able to find the class
file. It returns
custid='25'
DB21034E The command was processed as an SQL statement because
it was not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0723N An error occurred in a triggered SQL statement in trigger
"DB2ADMIN.CJCHD24". Information returned for the error includes SQLCODE
"-4304", SQLSTATE "42724" and message tokens
"DB2ADMIN.SEND|SQL030801010310400|Sample1|". SQLSTATE=09000
Could someone help me on this issue ?
Regards,
Ajay
--
Posted via [url]http://dbforums.com[/url]
ajay978 Guest
-
ajay978 #18
Re: hi
hi,
I am using DB2 v 8.1 and when i run the same program on 7.2 it worked
but not in 8.1. Actually I tried to register even a simple function like
=======================
import java.lang.*;
import java.io.*;
public class UDFjsrv
{
public static double scalarUDF()
throws Exception
{
double outNewSalary = 100 * 1.20;
return outNewSalary;
}
}
==========================
and after registering I call "db2 values(scalarUDF())" its giving
following error
1------------------------
SQL4304N Java stored procedure or user-defined function
"DB2ADMIN.SCALARUDF",
specific name "SQL030801115449400" could not load Java class
"UDFjsrv", reason
code "5". SQLSTATE=42724
code "5" means "Cannot establish default context."
I don;t know what it mean ? I guess there is some bug in java runtime in
db2 v8.1.If anyone has idea pls post it.
Regards,
Ajay
--
Posted via [url]http://dbforums.com[/url]
ajay978 Guest
-
Knut Stolze #19
Re: hi
ajay978 <member10239@dbforums.com> wrote:
Try calling the procedure outside of the trigger on the command line. Then>
> Hi,
> I have created a UDF in java and I have registered that with DB2. I
> have put the class file in sqllib\function but in DB2 v 7.2 its able
> to load class but in DB2 version 8 its not able to find the class
> file. It returns
> custid='25'
> DB21034E The command was processed as an SQL statement because
> it was not a
> valid Command Line Processor command. During SQL processing it
> returned:
> SQL0723N An error occurred in a triggered SQL statement in trigger
> "DB2ADMIN.CJCHD24". Information returned for the error includes SQLCODE
> "-4304", SQLSTATE "42724" and message tokens
> "DB2ADMIN.SEND|SQL030801010310400|Sample1|". SQLSTATE=09000
>
> Could someone help me on this issue ?
you will see the actual message of the error, which is SQL4304, and check
the conditions why this error could have been raised. (CLASSPATH not set,
UDF/StoredProc interface not implemented, public flag missing, default
constructor failed or mislsing, driver problem, ...).
--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Knut Stolze Guest
-
PM \(pm3iinc-nospam\) #20
Re: hi
Check security attributes of the directory where the file resides.
sqllib/function ?
Maybe you need a "Grant execute on function ..."?
PM
PM \(pm3iinc-nospam\) Guest



Reply With Quote

