Showing posts with label bulk. Show all posts
Showing posts with label bulk. Show all posts

Thursday, March 29, 2012

Access Denied error in SQL Server 2000 db

Hi!
I have stored procedure that executes BULK INSERT command inside.
Recently I migrated my sql 7 database to sql 2000 SP2.
Now when running this stored procedure from both application and Query
Analyzer I'm getting this message:
Server: Msg 4861, Level 16, State 1, Line 1 Could not bulk insert
because file '\\HSCDRMAN01\CDR\BCPFiles\BCP_cdr_05301
999.close' could
not be opened. Operating system error code 5(Access is denied.).
I found article on Microsoft web site that this is a known bug and it
only applies to SQL Server 7 (BUG #: 56167 (SQLBUG_70) )
Why am I getting this error in SQL Server 2000?
Should I apply the latest SP to SQL 2000 to fix this security issue?
Thank you,
YelenaI checked all permissions.
SQL Server service is running under domain account and this user has
access to the share where the file is located.
Also when executing BULK INSERT with master..xp_cmdshell I'm logged in
as sa.
I can't figure out why I'm getting Access Denied error.
Please help.
enaglozman@.yahoo.com (Lena) wrote in message news:<fc1e8071.0403160709.2dfad366@.posting.goo
gle.com>...
> Hi!
> I have stored procedure that executes BULK INSERT command inside.
> Recently I migrated my sql 7 database to sql 2000 SP2.
> Now when running this stored procedure from both application and Query
> Analyzer I'm getting this message:
> Server: Msg 4861, Level 16, State 1, Line 1 Could not bulk insert
> because file '\\HSCDRMAN01\CDR\BCPFiles\BCP_cdr_05301
999.close' could
> not be opened. Operating system error code 5(Access is denied.).
> I found article on Microsoft web site that this is a known bug and it
> only applies to SQL Server 7 (BUG #: 56167 (SQLBUG_70) )
> Why am I getting this error in SQL Server 2000?
> Should I apply the latest SP to SQL 2000 to fix this security issue?
> Thank you,
> Yelena|||Does it fail if you are logged on as the account running MSSQLServer
service? Also, that account will need read permissions to the share/file
that you reference:
'\\HSCDRMAN01\CDR\BCPFiles\BCP_cdr_05301
999.close'
Steve
"Lena" <lenaglozman@.yahoo.com> wrote in message
news:fc1e8071.0403230855.57f26b9a@.posting.google.com...
> I checked all permissions.
> SQL Server service is running under domain account and this user has
> access to the share where the file is located.
> Also when executing BULK INSERT with master..xp_cmdshell I'm logged in
> as sa.
> I can't figure out why I'm getting Access Denied error.
> Please help.
> enaglozman@.yahoo.com (Lena) wrote in message
news:<fc1e8071.0403160709.2dfad366@.posting.google.com>...sql

Access Denied txt file on other server

Hi and Help!!
I'm using Bulk Insert to read a text file that is on a different server. I
get an access denied message.
- If I change the name to a non-existant file,
I get an error that it can't find that file, so it can see it.
- I can successfully read a copy that I stored on the SQL server server.
I pretty much have whatever rights I need, personally, but I'm guessing I
need to set something up elsewhere.
Any suggestions?
Thanks,
ArtTry checking the account that the server is running as, for example if
LocalSystem is being used, it may not have the permissions to access the
file. I always use a service account and grant permissions to a specific
folder on the server to pass to.
"Art" wrote:

> Hi and Help!!
> I'm using Bulk Insert to read a text file that is on a different server.
I
> get an access denied message.
> - If I change the name to a non-existant file,
> I get an error that it can't find that file, so it can see it.
> - I can successfully read a copy that I stored on the SQL server server.
> I pretty much have whatever rights I need, personally, but I'm guessing I
> need to set something up elsewhere.
> Any suggestions?
> Thanks,
> Art|||Josh,
Thanks for the suggestion -- I won't be able to try it until Tuesday.
Unfortunatly I still don't know much about how to use SQL Server. I've
learned enough SQL and enough about Stored Procedures, but I don't actually
know too much about the system itself. I guess that's something that I had
better change.
Any suggestions on a good book? I'm currently using 2000, but in a few
months will upgrade to 2005.
Thanks again,
Art
"Josh Crosby" wrote:
> Try checking the account that the server is running as, for example if
> LocalSystem is being used, it may not have the permissions to access the
> file. I always use a service account and grant permissions to a specific
> folder on the server to pass to.
> "Art" wrote:
>|||sure, great book on SQL 2005 written by Michael Otey i'm writing a review
for, here's the info.
SQL Server 2005: Developer's Guide
ISBN: 0-07-226099-8
--
Josh Crosby
"Art" wrote:
> Josh,
> Thanks for the suggestion -- I won't be able to try it until Tuesday.
> Unfortunatly I still don't know much about how to use SQL Server. I've
> learned enough SQL and enough about Stored Procedures, but I don't actuall
y
> know too much about the system itself. I guess that's something that I ha
d
> better change.
> Any suggestions on a good book? I'm currently using 2000, but in a few
> months will upgrade to 2005.
> Thanks again,
> Art
> "Josh Crosby" wrote:
>

Tuesday, March 20, 2012

Access 2000, SQL Server 2000, Bulk Insert

I am pulling information from a DB2 table through a pass-through query
in Access 2000. I am going to create a comma delimited file that I want
to use Bulk Insert to put into SQL Server 2000.
I have the query to pull the data, all is well. How do I program in VBA
(Acess 2000) to do a bulk insert into a SQL Server table. I have 100000
records that I do this to every day. Bulk Insert seems to be the fastest
way. I will bulk insert the comma delimited file.
I am on a PC, not the SQL Server for the bulk insert. I cannot access
the mainframe DB2 tables from the SQL Server. My PC is the middle man
right now. How do I effectively do the bulk insert.
Does anybody have any experience in doing this, if so, can you post some
code to assist.
Thanks, Lyners
--
Posted via http://dbforums.comOne more thing, I have the code written so that it pulls the data and
loads the records 1 by 1. It takes to long and I keep blowing up the
transaction file. That is why I want to do the bulk insert. 1 record for
the transaction file. (AT least that is what I have read).
Posted via http://dbforums.com