The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Ubuntu
.
google unix.com



Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Rhel5 with ubuntu and windows xp AVINAZZ UNIX for Dummies Questions & Answers 0 03-12-2009 08:13 AM
Ubuntu Hardy: How to span windows over more than 1 screen? mcW UNIX for Dummies Questions & Answers 3 11-23-2008 09:58 PM
connecting to sqlserver from perl DILEEP410 Shell Programming and Scripting 3 05-02-2008 07:31 AM
connect SQLSERVER from unix samsonsimon AIX 2 02-05-2006 09:22 PM
Stored Procedure on NT/SQLServer mayohan Shell Programming and Scripting 3 08-09-2005 05:29 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-15-2009
dba_macau dba_macau is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 8
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 (permalink)  
Old 07-15-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,839
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 (permalink)  
Old 07-15-2009
dba_macau dba_macau is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 8
Hi Pludi,

Now it works, so sweet.

Cheers
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0