473,394 Members | 1,700 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,394 software developers and data experts.

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 3297
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.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.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_commit 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_commit 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.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.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.com> schrieb im Newsbeitrag
news:11*********************@g14g2000cwa.googlegro ups.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_commit 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_commit 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.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.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
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
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...
1
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:...
4
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...
1
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...
1
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....
14
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...
5
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...
0
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...
11
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.