• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 60
  • Last Modified:

moving files from linux to windows SQL

I have a project where I need to move files from a Linux file system to a Microsoft SQL server.

The app that I have resides on a Linux server and allows for older data records to be purged in form of small files. (1kb each)
I need to get these files to the windows server to allow a script (SSIS or other) to read the files and import them into SQL.

This routine will be run nightly, so the thought of a backup or anything else the requires a lot of intervention is not practical.

What's the best way to get this done ?  

   1.   If I have SAMBA loaded on the Linux server, I could easily read the files from a folder share ?
   2.   I could use [s]FTP to move the files from one system to the other ?
   3.   Write a script to run on the Linux system to read the files and insert them directly to SQL server via ODBC ?
   4.   Any other options ?

Thank you.
0
sidwelle
Asked:
sidwelle
  • 2
1 Solution
 
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
I think you mean moving Linux files to some sort of Windows file system, not an SQL server.

Some recent versions of Microsoft Windows report to have native rsync running. If so, use rsync.

If you have to do this same task repeatedly, best get rsync running on Windows, if it's missing.

If this is a one shot deal, just use whatever you can get to work. Samba or SFTP will work well.

I strongly suggest you move these files over into a directory first + then think long + hard before injecting a bunch of text files into SQL. If you really think you should do this, best to read up on how to represent files inside SQL tables + rows.

Best to read up on this, as you may get yourself in a situation where you have an SQL based set of data which brings your SQL server machine to it's knees when you try accessing this data.

SQL + Filesystems are designed for very different sorts of data.
0
 
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Marking my answer as a solution, as it describes various ways to accomplish what poster asked.

Poster never posted an update.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now