473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

BCP and Bulk Insert to Linked Servers

BCP and Bulk Insert to Linked Servers
Hi guys!

Heres my set up:
1) Im using Win2003 with MS SQL 2000
2) I have a linked server in SQL Server pointing to an MS Access DB.

Why MS Access? Gee, I dont know. The guy who owns it refused to update his
VB app and point it to SQL Server.

Anyway, I have 190,000 records in SQL Server that I wanted to dump and
insert it to MS Access.
I tried to use OPENQUERY but OLE DB provider choked and wont be able to
handle that much records. Sucks!
Moreover, DTS packages wont do the job. I tried it and it have the same
problem.
Now, I got one last option to go to. I EXPORTED SQL Server data to a text
file using BCP but my problem is how to IMPORT those data from the TEXT
file to my Linked Server that points to an MS Access.

This is what Im trying to do:

SQL Server Data ---> Text file ---> Linked Server (MS Access)
bcp LinkedServerName..MSAccess_TableName in Shares1_tmp.txt -c -T -t ',' -r
'\n'

SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or access denied.
SQLState = 01000, NativeError = 53
Warning = [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
(Connect()).

Thank you and you guys have a nice day.

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #1
5 9082
Ervs Sevilla via SQLMonster.com (fo***@SQLMonster.com) writes:
Heres my set up:
1) Im using Win2003 with MS SQL 2000
2) I have a linked server in SQL Server pointing to an MS Access DB.

Why MS Access? Gee, I dont know. The guy who owns it refused to update his
VB app and point it to SQL Server.

Anyway, I have 190,000 records in SQL Server that I wanted to dump and
insert it to MS Access.
I tried to use OPENQUERY but OLE DB provider choked and wont be able to
handle that much records. Sucks!
Moreover, DTS packages wont do the job. I tried it and it have the same
problem.
Now, I got one last option to go to. I EXPORTED SQL Server data to a text
file using BCP but my problem is how to IMPORT those data from the TEXT
file to my Linked Server that points to an MS Access.

This is what Im trying to do:

SQL Server Data ---> Text file ---> Linked Server (MS Access)


This sounds like a dead end to me. Bulk insert to linked server is not
supported, as I recall. And last time I looked at it, at least the
other server was another SQL Server.

I would suggest that you inquire in an Access newsgroup for how to import
that data into Access.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
Yah thats what I thought too because those option fields from BCP dont have
something for Linked Servers.

Do you have any other suggestions to copy and insert those 190,000 records
to MS Access?

Thank you for the reply.
I appreciate it.

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #3
Ervs Sevilla via SQLMonster.com (fo***@SQLMonster.com) writes:
Do you have any other suggestions to copy and insert those 190,000 records
to MS Access?


To repeat myself: ask in a newsgroup devoted to Access. Maybe there
are some people here who knows Access, but I am certainly not one of
them.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #4

"Ervs Sevilla via SQLMonster.com" <fo***@SQLMonster.com> wrote in message
news:41******************************@SQLMonster.c om...
Yah thats what I thought too because those option fields from BCP dont
have
something for Linked Servers.

Do you have any other suggestions to copy and insert those 190,000 records
to MS Access?

Thank you for the reply.
I appreciate it.

--
Message posted via http://www.sqlmonster.com


One thing to try would be to experiment with the batch size option for a DTS
Transform Data task. The OLE DB provider might not like handling 190,000
rows in a single insert, but if you do it in batches of 10,000 rows (or
whatever), it might work. However, that's pure speculation, and as Erland
says, you'll probably get better information on importing into Access in an
Access group.

Simon
Jul 23 '05 #5
Thank you guys....
Ill post my prob in MS Access forum.

By the way, I did tried to insert 1,000 records at a time but again OLEDB
Jet 4.0 for MS Access choked.

I forgot to mentioned that the destination table in Access have 106 columns
thats why using OPENQUERY choked as well. The table is flat like a pan cake.
Moreover, theres another table that only have 54 columns/fields and I was
able to insert a total of 230,000 records.

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: php newbie | last post by:
Hello, I am trying to load a simple tab-delimited data file to SQL Server. I created a format file to go with it, since the data file differs from the destination table in number of columns. ...
7
by: iqbal | last post by:
Hi all, We have an application through which we are bulk inserting rows into a view. The definition of the view is such that it selects columns from a table on a remote server. I have added the...
2
by: Elvira Zeinalova | last post by:
Hei, We have 2 MS SQL SERVER 2000 installed on 2 different servers (2 separated machines). I am triing to connect them så that when one row is added to the table in the database in main server - ...
2
by: Steve Kuekes | last post by:
I have two sql servers, I have defined each one as a linked server to the other. I can mostly access the servers from one another, but I get the following error on a sql insert. Insert...
6
by: pk | last post by:
Sorry for the piece-by-piece nature of this post, I moved it from a dormant group to this one and it was 3 separate posts in the other group. Anyway... I'm trying to bulk insert a text file of...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
1
by: ABC | last post by:
Our environment has two servers, one is web and another is SQL Server. I can write upload file to IIS. But, I cannot call SQL Server's BULK Insert statement. Is there any idea to handle this...
11
by: Ted | last post by:
OK, I tried this: USE Alert_db; BULK INSERT funds FROM 'C:\\data\\myData.dat' WITH (FIELDTERMINATOR='\t', KEEPNULLS, ROWTERMINATOR='\r\n');
2
by: kuNDze | last post by:
hi, on localServer i execute this query INSERT INTO table (A, B, C) SELECT A, B, C FROM LinkedServer.myDB.dbo.table everything is fine. But if i execute this one INSERT INTO...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.