Google Ryhmät ei enää tue uusia Usenet-postauksia tai ‐tilauksia. Aiempi sisältö on edelleen nähtävissä.

Operating system error code 3(The system cannot find the path specified.).

8 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Loi

lukematon,
3.6.2004 klo 7.13.513.6.2004
vastaanottaja
Hi All,

I use Bulk insert to put data to myTable.
When the SQL server is in local machin, it works well. But when I put
the data in a sql server situated not locally, then I get a error
message like this:

Could not bulk insert because file 'C:\Data\2003
txtfiles\abif_20031130.txt' could not be opened. Operating system
error code 3(The system cannot find the path specified.).

BULK INSERT myTable
FROM 'C:\Data\2003 txtfiles\abif_20031130.txt'
with (
-- codepage = ' + char(39) + 'ACP' + char(39) + ',
fieldterminator = ';',
rowterminator = '\n',
keepnulls,
maxerrors=0)

Someone can explan me what the error shows up

Thanks in advance
- Loi -

Dan Guzman

lukematon,
3.6.2004 klo 7.44.173.6.2004
vastaanottaja
The location of the file is relative to the SQL Server on which the BULK
INSERT command runs. To import a file from another machine, specify an UNC
path rather than use drive letters. For example:

BULK INSERT myTable
FROM '\\MyOtherServer\MyShare\Data\2003 txtfiles\abif_20031130.txt'

Note that the SQL Server service account needs permissions to the share.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Loi" <vota...@hotmail.com> wrote in message
news:af9512d5.04060...@posting.google.com...

Loi Tan Vo

lukematon,
4.6.2004 klo 7.58.114.6.2004
vastaanottaja
Hi Dan,
Thanks for your reply.
It does not work yet.
A next question:

SQL Server service account needs permissions to the share.
In my case SQL server is setup following:
In the security tab: Authentication - SQL server and windows.
Startup sevice account - system account.
Can somebody give me any hints

Regards
- Loi -

"Dan Guzman" <dang...@nospam-earthlink.net> wrote in message news:<laEvc.20183$Tn6....@newsread1.news.pas.earthlink.net>...

Dan Guzman

lukematon,
4.6.2004 klo 20.30.054.6.2004
vastaanottaja
> Startup sevice account - system account.

Try using a domain account rather than the local system account and ensure
the account has permissions to the share.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Loi Tan Vo" <loi.t...@fnh.no> wrote in message
news:73f04281.04060...@posting.google.com...

0 uutta viestiä