Ubuntu Bulk Insert to Windows SQLServer


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Ubuntu Bulk Insert to Windows SQLServer
# 1  
Old 07-15-2009
Ubuntu Bulk Insert to Windows SQLServer

Hi,

Anyone can help me, I can connect from ubuntu "freetds driver" to Windows sqlserver Database and doing select, insert, update, etc.

But when I try to use the Bulk Insert with these command;

1> BULK INSERT test FROM '/home/test/test.txt' WITH (FIRSTROW = 2, CODEPAGE = 'ACP', DATAFILETYPE = 'char', FIELDTERMINATOR = ',',ROWTERMINATOR = '\n')
2> go
Msg 4861, Level 16, State 1, Server GMSERVER, Line 1
Cannot bulk load because the file "/home/test/test.txt" could not be opened. Operating system error code 3(The system cannot find the path specified.).

Thanks in Advance.
# 2  
Old 07-15-2009
The documentation for BULK INSERT confirms what I suspected: the path you specify has to be reachable from the server the database is running on, which isn't true for a local UNIX path. You can either install & configure Samba and specify a UNC path, or upload the file to a location that the server knows & load it from there.
# 3  
Old 07-15-2009
Hi Pludi,

Now it works, so sweet.

Cheers
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert bulk values in DB table using isql

Hello, Objective is to insert bulk values in DB table using isql. Following code tried: isql -SServer_name -Ddb_name -Uuser_name -Ppassword < file.txt cat file.txt for i in `cat data_value_file.txt` do insert into tempdb..temp_table11 values ('$i') go done cat... (3 Replies)
Discussion started by: manishdivs
3 Replies

2. Ubuntu

Installation??? How to install Ubuntu on windows 7

guys tell me steps to install ubunto of linux kali over windows 7 (0 Replies)
Discussion started by: Roshan4u
0 Replies

3. Shell Programming and Scripting

MSSQL or SQL SERVER or SQLSERVER?

hi, i'll want to try on the parameter with three possibility because mine colleagues usally to work on the other name folders. for example: MSSQL SQL SERVER SQLSERVER case $q in a) echo -ne "Work database: " echo "" echo " 1) ORACLE" echo... (4 Replies)
Discussion started by: gsflash80
4 Replies

4. Debian

How to run windows application in Ubuntu?

HI ! all I have some model which works fine in windows 7 OS with matlab program I want to run all those from Ubuntu 12.04 32-bit OS. is there any provision to run windows applications? wine I tried, its not working, if any other available kindly explain the usage also Note : Dual boot ... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies

5. Windows & DOS: Issues & Discussions

Get file on our windows desktop from a ubuntu server

Hello, How can I please have a program automatically upload some files from a ubuntu server to my machine desktop that is running windows XP? I would like to be able to do that from the windows machine itself. Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies

6. UNIX for Dummies Questions & Answers

Accessing my windows Application on Ubuntu

I am sure this is simple to do but as a newbie to UNIX i don't know much. I have Ubuntu installed on my machine alongside windows 7. How do i access all the folders, files and more importantly programs and softwares installed on Windows so i can use them in Ubuntu instead of going back and... (1 Reply)
Discussion started by: pipsonian
1 Replies

7. UNIX for Dummies Questions & Answers

Rhel5 with ubuntu and windows xp

hi all.. i need to install RHEL5 on my machine. m having 15gb of primary partition reserved for this..... problem is: i have WindowsXP and Ubuntu 8.10 already running ...... XP on first primary and Ubuntu on logical. Please help me installing RHEL5 without disturbing XP... (0 Replies)
Discussion started by: AVINAZZ
0 Replies

8. Shell Programming and Scripting

connecting to sqlserver from perl

Hi, I am doing a migration of Oracle database to SQLSERVER 2005.Mostly my application code is perl scripts and i want to modify the scripts so as to connect to SQLSERVER. What all would be the changes i have to make for just establishing a connection from Perl script to SQLSERVER... (3 Replies)
Discussion started by: DILEEP410
3 Replies

9. AIX

connect SQLSERVER from unix

I have an application working in unix accessing oracle 9i database on a IBM AIX Unix 5.2 system. I want this unix application to retrieve data from a SQL server 2000 server to oracle database. how can i connect to this SQL server database from a unix application pls help me if you can (2 Replies)
Discussion started by: samsonsimon
2 Replies

10. Shell Programming and Scripting

Stored Procedure on NT/SQLServer

Hi: How will I execute a Stored Procedure that sits on NT/SQLServer. Any help would be appreciated. Thanks (3 Replies)
Discussion started by: mayohan
3 Replies
Login or Register to Ask a Question