Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.sql files

Status
Not open for further replies.

Ultdrake

Programmer
Jul 15, 2002
19
0
0
CA
Tranfer a .sql file create by a script to unix and execute him on oracle database.

The transfer, the creation of .sql file and the execution on the database must be do by the same perl on DOS script.

I know it's a multi part question, but the most important part is execute .sql file on unix by perl on DOS script

 
I have done something similar to this in unix with shell script.
say for example yr .sql script report.sql
then in shell script u can give something like the following:

sqlplus /nolog @report

Hope this helps. Talent is what you possess;
genius is what possesses you

 
Hi,
create a shell script with the foll:
sqlplus uname/pwd@db <<here
spool sp_1
@/ex/dd/script_name.sql
other sql statements (if present)
spool off
here

Now write everything in a file in Your windows and use telnet to execute the shell script. Or a simple thing would be, if You have Hummingbird Exceed, Start a client programmatically in Your DOS script and give the above script as the input to that.
If You need more details on how to run a shell script in a unix m/c programmatically from DOS m/c, try posting the same qs in General Unix discussions.
Thanks & Regards,
DoubleH
 

Correct me if I'm wrong, your sql-generator runs in Windows but you want this script to be executed in Unix. Is that correct?

If yes, since the generation of sql script is already discussed, you may need to do your transfer via FTP to Unix.


Robbie

&quot;The rule is, not to besiege walled cities if it can possibly be avoided&quot; -- Art of War
 
Hi Robbie,
But using in FTP prompt I beleive that we cannot run any scripts.

Thanks & Regards,
DoubleH
 
Hi Robbie,
But in FTP prompt I beleive that we cannot run any scripts. We can only transfer the files.

Thanks & Regards,
DoubleH
 
Why don't you use DBI to run your script from perl itself?
 
Hi
Or you can transfer by FTP, use telnet ( or Xwindows or something) to connect to your Unix box and run the shell scripts that other posters provided.

[profile]

Ps: you could also use Samba to map a windows drive to a Unix location and copy the file like any other windows copy.

Then goto the unix box ( any way you can) and proceed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top