473,545 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ 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 - SQLSetConnectOp tion(SQL_AUTOCO MMIT, 0)
for each data set:
- bind parameter for each field - SQLBindParamete r
- 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 - SQLSetConnectOp tion(SQL_AUTOCO MMIT, 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 5614
On 15 Jul 2005 02:54:50 -0700, "Marcel Czerny"
<ma***********@ list.smwa.sachs en.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 - SQLSetConnectOp tion(SQL_AUTOCO MMIT, 0)
for each data set:
- bind parameter for each field - SQLBindParamete r
- 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 - SQLSetConnectOp tion(SQL_AUTOCO MMIT, 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
2231
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 http://www.egenix.com/files/python/mxODBC.html#Hints
11
3737
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 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET...
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 Li (likong@email.com)
6
6756
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 the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
3
2502
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 the table doesn't exist. I issue a raiserror if the table doesn't exist and then call RETURN. I construct the string using sprintf and pass it...
4
7223
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 to make ODBC calls to the db. The particular system I'm working with, will not work with an Oracle stored procedure I'm told. However, it
4
5640
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
6172
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 the Administrative Tools>Data SOurces (ODBC) menu? IS there a way to do this with VBA code from my installer disk, or by simply copying a file...
0
12014
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 '/CinemaBookingSystem' Application. -------------------------------------------------------------------------------- ERROR General error Unable to open registry...
2
2622
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 one that will use SQL Server authentication. I already have a seperate installation package that will create the proper System DSN depending on...
0
7502
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7434
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7946
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7457
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5078
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
744
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.