Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Doubt in Bulk insert

Author  Topic 

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-03-17 : 03:25:07
Hi all,

Can anyone tell the syntax for bulk insert from my local machine.

i.e the data file is in my local machine not in sql server's machine

Regards

Senthil.C
Willing to update...

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2009-03-17 : 03:28:52
You will have to specify UNC file path i.e.
\\servername\sharename\file


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-03-17 : 03:34:47
Is not possible from my local path??

If i try from server.. It says LOgin fail how i specify Username and password?

Regards

Senthil.C
Willing to update...
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2009-03-17 : 03:54:37
You can import you local file in sql server by using UNC folder path in BULK INSERT.

Lets say, your machine name is HomePC and the folder is MyFolder in which the data file is located.

Now you can specify this file in BULK INSERT as \\HomePC\MyFolder\datafile.dat, provided you have shared the folder on your local machine and given appropriate permissions

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -