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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to copy some text files from one directory to another 1

Status
Not open for further replies.

middlename

Programmer
Mar 14, 2003
16
0
0
US
Hello everybody,
I am just curies if it possible or somebody have an experience with how to automate process of coping text files from one server to another(different directory)?

Any help is appreciated!
 
Hi,
Why would you want a Database engine to do that? Use OS level commands instead..


[profile]
 
I need to copy text files into different directories based on school's number, so every school has there own directory.
What is OS level commands?...Where can I get some information?
Thanks
 
On Unix the O/S level command is variant of "cp" such as scp or rcp or you can use ftp
Example copy file abc.sql from Oracle home directory on my server to another server called "linux" account "sybase". Note here that I am using secure shell copy command scp. You amy or may not have this. You can use rcp or ftp commands. Ask you Unix SA to help you out

Code:
oracle:/home/oracle% scp abc.sql sybase@linux:/tmp
sybase@linux's password:
abc.sql              100% |******************************************************************************************|  1398       00:00
oracle:/home/oracle%


Hope this helps
 
Thank you for your help and patience!
The problem is that we run Oracle on Windows NT platform. I don't know if it makes difference.
 
Can you ask your administrator to mount a directory on server A as readible on server B so you can go to server B and do a straight pick and drop of files. I am not that familiar with NT but you should be able to do it through mapping network drives in windows explorer.
 
Thanks,
I can do it through mapping network drives.
Is it possible to automate this process throught Oracle form or Pl/SQL?
 
I suppose it would be easier if you run a nightly batch jump which basically copies files from one server to another.

Within SQL*Plus you can try the O/S command using &quot;host <O/S command>&quot;. Just go to SQL*Plus and see whether you can copy a single file using NT's native command line arguments. If you can then you can easily cron that sql file

good luck
 
We do something similar to this. I have created several batch files that copy files from one location to another, run SQL*Loader to load these files into Oracle, run update SQL statements, and create log files. After you get the batch file working, then you can create an entry in your servers Scheduler tool (Look up help for AT command) to schedule these jobs to run automatically nightly.

Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Thank you all!
On Oracle form 6i there is a win_api_utility.copy_file procedure I hope can do all hard job. :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top