Insert data from Unix Server to DB in a MS Server 2003

Hi,

I need to create a script that executes weekly in a Unix server to collect data from new files added in certain directories. Then i need to send that data to an MS Access data base (planning to migrate to SQL Server 2005) located in a MS Server 2003.

So my question is how can i send the collect data to the MS Server an insert it in the data base? All of this must be done by the script.

Thanks!

Use cron to schedule your script once a week, like every Friday night.

Use find /path/to/files -type f -mtime -7
to get files than one week old, because you got last week's data already.

Format the output of the script into CSV format - awk is great for that - then send the formatted file via ftp to the windows machine. At this point it becomes a Windows problem. I do not know what you have or know how to do, but there are options for example: task scheduler, then an Access tool to run your load.

If you do not ftp over to windows:
There are no free shell-based unix tools ( unless you write something using ODBC:
unixODBC - meaning your own homegrown C code) that will load your db from the unix box. AFAIK, anyway. java has jdbc as well. Both of these options require the Windows drive with the access db to be NFS mounted on the locl unix box