![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| unix script to takes the old data from a TXT file and compress them into new file | vpandey | Shell Programming and Scripting | 2 | 03-05-2008 08:10 AM |
| How to fetch data from a text file in Unix | shikhakaul | Shell Programming and Scripting | 4 | 01-25-2008 08:20 AM |
| help for writing shell script to export table data | sankarg | Shell Programming and Scripting | 3 | 10-18-2006 03:01 AM |
| unix script to export data from csv file to oracle database | vinayagan | Shell Programming and Scripting | 3 | 07-20-2005 01:16 AM |
| How to copy data file from UNIX and put it on PC | BillyT | UNIX for Dummies Questions & Answers | 3 | 01-22-2001 07:09 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hi,
I am searching a way to export data file on Unix to SQL server on a daily bases. Any one has any ideas? Thanks in advance! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Quote:
1. Create a delimited flat file on UNIX 2. ftp or rcp the file to your SQL Server database server 3. Use bcp to load the data into SQL Server Alternatively for a hands-free approach: 1. Create a delimited flat file on UNIX 2. Define a DTS jobs that ftps your data from UNIX and then loads your SQL Server database however often you wish Thomas |
|
#3
|
||||
|
||||
|
What I do at work
We have an application on the Unix side that has a job that creates a comma delimited file every night. That file gets written to a specific directory. I have that directory shared out using Samba. Our Microsoft SQL admin then has a daily job that imports the data file into the SQL tables using a UNC path to the Samba share on the Unix box. Works like a charm.
As the other comment noted, we need more specifics to really address your particular situation, but... the basics are: 1. Set up a script or use the functionality of your Unix application to generate a comma delimited data file 2. Use cron to schedule that job to happen at a specified interval (daily, hourly, etc...) 3. Use some kind of file transfer protocol (Samba, FTP, SCP, NFS) to allow your SQL server to grab that data file 4. Set up a script or use the functionality of your SQL application to import the comma delimited data file |
|
#4
|
||||
|
||||
|
I will try it out!
|
|
#5
|
||||
|
||||
|
Our Unix server is not configureed to allow ftp from SQL server side to Unix side.
But I can ftp files from Unix to Windows server. I have a cron job to write pipe deliminated file on certain directory. I am trying to write a script to ftp the log files to windows shared drive folder every night automatically. It seemed like unless the server allows anonymous user, I can't pass auto authentication step. Can I write script to ftp file automatically with correct user name and password? |
|
#6
|
||||
|
||||
|
ftp -n hostName <<EOF
user userName userPasswd .....ftp commands here....... EOF |
|
#7
|
||||
|
||||
|
Thanks a lot!
|
||||
| Google The UNIX and Linux Forums |