473,480 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Forcing ODBC-Autocommit

Hi,

I've got some troubles with exporting data base entries from
an "Access"-table (ver. 10) into an "Oracle"-table (ver. 9.2)
using the "Oracle-ODBC-driver".
At first I linked the corresponding tables in "Access" (via the odbc
driver) so
I can use the "Oracle"-table as a native "Access"-table.

tOracle - oracle table dummy
tAccess - access table dummy

Then I start the following sql command "INSERT INTO tOracle SELECT *
FROM tAccess;"

Now I've watched this using SQL-Trace.

- autocommit off - SQLSetConnectOption(SQL_AUTOCOMMIT, 0)
for each data set:
- bind parameter for each field - SQLBindParameter
- execute the sql command - SQLExecDirect("INSERT INTO "TORACLE"
(fields...) VALUES (?,?,...)")

after it's finished with executing the command this will appear
- Commit - - SQLTransact(SQL_COMMIT)
- switch autocommit on again - SQLSetConnectOption(SQL_AUTOCOMMIT, 1)
So here is my question:

If I try to insert more than a million data sets into the oracle-table
without any
commit, the undo-tables space grows and the destination table stays
empty until commit is called.
That's pretty slow (much too slow).
Is there any possibility to:
- let the autocommit enabled during the sql command is executed?
or
- how can I enable a commit after 100 data set or so (without using
any vbasic scripts)

where can I enable one of these options?


thanks a lot,

greets,

Marcel Czerny

Nov 13 '05 #1
1 5605
On 15 Jul 2005 02:54:50 -0700, "Marcel Czerny"
<ma***********@list.smwa.sachsen.de> wrote:
Hi,

I've got some troubles with exporting data base entries from
an "Access"-table (ver. 10) into an "Oracle"-table (ver. 9.2)
using the "Oracle-ODBC-driver".
At first I linked the corresponding tables in "Access" (via the odbc
driver) so
I can use the "Oracle"-table as a native "Access"-table.

tOracle - oracle table dummy
tAccess - access table dummy

Then I start the following sql command "INSERT INTO tOracle SELECT *
FROM tAccess;"

Now I've watched this using SQL-Trace.

- autocommit off - SQLSetConnectOption(SQL_AUTOCOMMIT, 0)
for each data set:
- bind parameter for each field - SQLBindParameter
- execute the sql command - SQLExecDirect("INSERT INTO "TORACLE"
(fields...) VALUES (?,?,...)")

after it's finished with executing the command this will appear
- Commit - - SQLTransact(SQL_COMMIT)
- switch autocommit on again - SQLSetConnectOption(SQL_AUTOCOMMIT, 1)
So here is my question:

If I try to insert more than a million data sets into the oracle-table
without any
commit, the undo-tables space grows and the destination table stays
empty until commit is called.
That's pretty slow (much too slow).
Is there any possibility to:
- let the autocommit enabled during the sql command is executed?
or
- how can I enable a commit after 100 data set or so (without using
any vbasic scripts)

where can I enable one of these options?


thanks a lot,

greets,

Marcel Czerny


You could order the data by a field with strictly increasing values
and run a series of TOP 100 queries (or maybe 1000 or 10,000 if you
have a million rows) and keep track of where you have got to.

Is this in effect a new table in Oracle each time or are you adding to
a bigger table, or even worse deleting a million items and then adding
a million new ones? IE have you speed problems in addition to your
transaction log size?
David

Nov 13 '05 #2

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

Similar topics

0
2225
by: Marco Aschwanden | last post by:
Hi - Win2000 - Python 2.3.3 - py2exe 0.5.0 - eGenix Comercial & Base Package I am developing an app using mxODBC. On the home page they say ...
11
3730
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
0
1386
by: Kong Li | last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset (9.2.0.5) fixed the handle count leak problem. The problem is in Oracle client component. Thanks. Kong ----- From: Kong...
6
6747
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
3
2492
by: Gary | last post by:
I am developing a simple DB-Library program in C calling SQL Server 2000 on windows 2003 and NT 4. I have some T-SQL code that checks for the existence of a table and want to abort the program if...
4
7209
by: Roger Redford | last post by:
Dear Experts, I'm attempting to marry a system to an Oracle 817 datbase. Oracle is my specialty, the back end mainly, so I don't know much about java or javascript. The system uses javascript...
4
5634
by: Andreas Lauffer | last post by:
Can anyone tell me advantages / disadvantages of DataDirect Server Wire ODBC-driver? Any experiences? What about redistribution? Andreas Lauffer, easySoft. GmbH, Germany
3
6165
by: Lauren Quantrell | last post by:
Maybe a dumb question - I'm new to ODBC. How do I install an Access ..mde file on a user's workstation and create the ODBC connection to the backend SQL Server database without having to go through...
0
11997
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
2
2606
by: Andy | last post by:
Hello, I am working on an Access Application that uses Linked Tables to a SQL Server Backend. The problem I have is that there will be 2 types of users, one which will use a trusted connection and...
0
7103
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
7010
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5362
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,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3011
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3003
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.