473,725 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Federated Insert and local update in on transaction not possible

I get SQL30090 reason 18 by trying to do an insert in a federated table and
an update in a local table in one transaction

Do I have to change some settings to get done or ist this not possible by
definition?

Thanks
Klemens
Nov 12 '05 #1
5 3341
Do you have select/insert/update privileges on the federated table and
local table, if so, you can do that.

Klemens wrote:
I get SQL30090 reason 18 by trying to do an insert in a federated table and
an update in a local table in one transaction

Do I have to change some settings to get done or ist this not possible by
definition?

Thanks
Klemens


Nov 12 '05 #2
Both statements are successfull if they are in separate transactions.
Only in the same transaction it doesn't work.

<hi****@gmail.c om> schrieb im Newsbeitrag
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Do you have select/insert/update privileges on the federated table and
local table, if so, you can do that.

Klemens wrote:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction

Do I have to change some settings to get done or ist this not possible by definition?

Thanks
Klemens

Nov 12 '05 #3
Read Chapter 12/Appendix C of Federated Systems Guide!! Also read the
the last line of my posting, it states "Federated systems do 2 not
currently support the two-phase commit protocol"

Also from db2 for your error code:

For reason 18, do one of the following steps:

o Submit a COMMIT or ROLLBACK before issuing an update to a
different data source.

o If multiple data sources need to be updated within a unit of
work, make sure the two_phase_commi t server option has been
set to 'Y' for all the data sources that need to be updated.
See the SQL Reference for information on setting the value
used for the two_phase_commi t setting.

o If the data source to be updated supports only one-phase
commit and the application is operating with a CONNECT type 2
connection setting, change the application to operate with a
CONNECT type 1 connection setting.
From DB2 Help: Understanding federated system transaction support
2 Federated system transaction processing builds on DB2(R) distributed
2 database transaction capabilities. To understand federated system
transaction 2 processing, you must understand the following essential
DB2 distributed transaction 2 processing concepts:

2 2 Unit of work (UOW) 2 Remote unit of work (RUOW) 2 Distributed unit
of work (DUOW) 2 Multisite update 2 Transaction manager (TM) 2 Resource
manager (RM) 2 Type 1 connection 2 Type 2 connection 2 One-phase commit
2 Two-phase commit
2 These concepts work identically in both federated and non-federated 2
DB2 systems. However, the scope of each concept changes in a federated
system.

2 For example, a unit of work is implicitly begun when any data 2 in a
database is read or written. For a unit of work in a federated system,
2 the database can be a federated database or a data source database.
For a 2 distributed unit of work in a federated system, you can access
both a federated 2 database and a data source database.

An application must end a unit of work by issuing either a COMMIT or a
ROLLBACK statement, regardless of the number of databases that are
accessed. The COMMIT statement makes permanent all changes made within
a unit of work. The ROLLBACK statement removes these changes from a
database. Changes made by a unit of work become visible to other
applications after a successful commit.

Recommendation: Always explicitly commit or roll back units of work in
your applications.

2 When only one data source is updated in a unit of work, a COMMIT 2
statement for this unit of work can be sent in a single operation. This
operation 2 is called a one-phase commit or single site update. 2 A
site corresponds to a server definition in 2 a federated system. A
federated server is the local site for update operations 2 in a
federated system. Any remote data source is a remote site for update 2
operations in a federated system.

In a one-phase commit operation, no other data sources in the same unit
of work are required to verify their ability to commit data.

Examples of a one-phase commit operation include:

A non-distributed unit of work
2 A distributed unit of work that involves reading from one or 2 more
data sources but updating data at only one data source
2 In a distributed unit of work that involves updates of multiple 2
databases on multiple sites, data must be consistent. The multisite
update 2 or two-phase commit protocol is commonly used to ensure data
consistency across 2 multiple databases within a distributed unit of
work. Federated systems do 2 not currently support the two-phase commit
protocol.

Klemens wrote: Both statements are successfull if they are in separate transactions.
Only in the same transaction it doesn't work.

<hi****@gmail.c om> schrieb im Newsbeitrag
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Do you have select/insert/update privileges on the federated table and
local table, if so, you can do that.

Klemens wrote:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction

Do I have to change some settings to get done or ist this not possible by definition?

Thanks
Klemens


Nov 12 '05 #4
Thanks,
I had missed the information that two-phase commit is currently not
supported on federated systems.
So my next question to ibm people: When will it be supported?
<hi****@gmail.c om> schrieb im Newsbeitrag
news:11******** *************@g 14g2000cwa.goog legroups.com...
Read Chapter 12/Appendix C of Federated Systems Guide!! Also read the
the last line of my posting, it states "Federated systems do 2 not
currently support the two-phase commit protocol"

Also from db2 for your error code:

For reason 18, do one of the following steps:

o Submit a COMMIT or ROLLBACK before issuing an update to a
different data source.

o If multiple data sources need to be updated within a unit of
work, make sure the two_phase_commi t server option has been
set to 'Y' for all the data sources that need to be updated.
See the SQL Reference for information on setting the value
used for the two_phase_commi t setting.

o If the data source to be updated supports only one-phase
commit and the application is operating with a CONNECT type 2
connection setting, change the application to operate with a
CONNECT type 1 connection setting.
From DB2 Help:

Understanding federated system transaction support
2 Federated system transaction processing builds on DB2(R) distributed
2 database transaction capabilities. To understand federated system
transaction 2 processing, you must understand the following essential
DB2 distributed transaction 2 processing concepts:

2 2 Unit of work (UOW) 2 Remote unit of work (RUOW) 2 Distributed unit
of work (DUOW) 2 Multisite update 2 Transaction manager (TM) 2 Resource
manager (RM) 2 Type 1 connection 2 Type 2 connection 2 One-phase commit
2 Two-phase commit
2 These concepts work identically in both federated and non-federated 2
DB2 systems. However, the scope of each concept changes in a federated
system.

2 For example, a unit of work is implicitly begun when any data 2 in a
database is read or written. For a unit of work in a federated system,
2 the database can be a federated database or a data source database.
For a 2 distributed unit of work in a federated system, you can access
both a federated 2 database and a data source database.

An application must end a unit of work by issuing either a COMMIT or a
ROLLBACK statement, regardless of the number of databases that are
accessed. The COMMIT statement makes permanent all changes made within
a unit of work. The ROLLBACK statement removes these changes from a
database. Changes made by a unit of work become visible to other
applications after a successful commit.

Recommendation: Always explicitly commit or roll back units of work in
your applications.

2 When only one data source is updated in a unit of work, a COMMIT 2
statement for this unit of work can be sent in a single operation. This
operation 2 is called a one-phase commit or single site update. 2 A
site corresponds to a server definition in 2 a federated system. A
federated server is the local site for update operations 2 in a
federated system. Any remote data source is a remote site for update 2
operations in a federated system.

In a one-phase commit operation, no other data sources in the same unit
of work are required to verify their ability to commit data.

Examples of a one-phase commit operation include:

A non-distributed unit of work
2 A distributed unit of work that involves reading from one or 2 more
data sources but updating data at only one data source
2 In a distributed unit of work that involves updates of multiple 2
databases on multiple sites, data must be consistent. The multisite
update 2 or two-phase commit protocol is commonly used to ensure data
consistency across 2 multiple databases within a distributed unit of
work. Federated systems do 2 not currently support the two-phase commit
protocol.

Klemens wrote:
Both statements are successfull if they are in separate transactions.
Only in the same transaction it doesn't work.

<hi****@gmail.c om> schrieb im Newsbeitrag
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Do you have select/insert/update privileges on the federated table and
local table, if so, you can do that.

Klemens wrote:
> I get SQL30090 reason 18 by trying to do an insert in a federated
table and
> an update in a local table in one transaction
>
> Do I have to change some settings to get done or ist this not
possible by
> definition?
>
> Thanks
> Klemens

Nov 12 '05 #5
Klemens wrote:
Thanks,
I had missed the information that two-phase commit is currently not
supported on federated systems.
So my next question to ibm people: When will it be supported?

In a "future release". Seriously it's high up in the priority list.
If you need better information you'll need to go through the official
channel and be prepared to sign a dotted-line.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #6

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

Similar topics

1
15425
by: shottarum | last post by:
I currently have 2 tables as follows: CREATE TABLE . ( mhan8 int, mhac02 varchar(5), mhmot varchar(5), mhupmj int )
5
4440
by: Marco Lazzeri | last post by:
Hi, I need some examples of INSERT and UPDATE of DATE columns using 'ALLBALLS' and 'INFINITY' values. I could not find examples on the net. I need, also, to move columns in tables (just like the MOVE BEFORE/MOVE AFTER MySQL commands). Can you help me? Thank you! Have a nice day, --
1
1175
by: Max | last post by:
I'm looking for best methods in terms of performance and simplicity to do an INSERT and UPDATE. Using Microsoft's Application Blocks and SQL Server stored procedures, this is simple: Insert: iNewCustomerID = Convert.ToInt32(SqlHelper.ExecuteScalar(strConn, _ "myStoredProc", _ param1, _ param2, _ param3
4
1511
by: Diana Estrada | last post by:
Hi, I have a store procedure to insert , and I use tableadapter to execute this store procedure, when I run the application and execute the sp , works ok and after I see the datagridview and the new row is there, but the problem ir that when I stop the application and look my database in SQL Server 2005 the table don´t have the new row. Somebody knows why? or Any idea to execute the store procedure to insert or delete or update rows in...
1
2483
by: Dragon | last post by:
I am using mysql with the InnoDB engine. I wrote a perl script that first selects something from a table, and then updates a second table based on the select from the first table. I need to make sure that there is no read or write to the tables while my script performs the insert and update. I looked at <http://dev.mysql.com/doc/refman/4.1/en/lock-tables.html> and it says this: ...
1
6209
by: abhi81 | last post by:
Hello All, I have a table on which I have created a insert,Update and a Delete trigger. All these triggers write a entry to another audit table with the unique key for each table and the timestamp. Insert and Update trigger work fine when i have only one of them defined. However when I have all the 3 triggers in place and when i try to fire a insert query on the statement. It triggers both insert and update trigger at the same time and...
14
3191
by: fjm1967 | last post by:
Hi all, I am nearing the end of programming my select forms and I will be soon need to create my insert and update forms. I have a question as to how this is best handled. I want to use one form to do the inserts and updates. Now, as far as the data in the database goes, if I have some data in a table already and only 1 field needs to be updated how does this work? Should I use an "if" conditional and isset on every field in the form or...
5
13530
by: sticky | last post by:
Hi I need to be able to lock a table against INSERT and UPDATE, but not SELECT, for the duration of a transaction. The transaction will be defined at the application level in c#, and then use stored procedures to make multiple selects and then an insert. What is the best way of doing this? Description of the system:
0
2288
by: magnolia | last post by:
i created a trigger that will record the changes made to a table .everything works fine except the insert query.whenerever i try to insert a record it fires insert and update triger at the same time which means i hav 2 record for every insert operation. any help appreciated. thank u herez teh code i tried. ALTER TRIGGER trg_ContactAddress_Audit ON Address FOR DELETE, INSERT, UPDATE AS
11
15289
by: TechnoAtif | last post by:
INSERT AND UPDATE MULTIPLE CHECKBOX DATA USING PHPMYSQL OR JAVASCRIPT Hi All I want to check the multiple checkboxes update them after revisiting that page. I am taking the name as name=type..in the form of array..but on checking it the result in the database simply gives the world 'array'.i want multiple checkboxes to be checked and updated simultaneously.. and the query to insert the checkbox value has to be included along with...
0
8752
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9116
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4519
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
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

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.