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

Nickname in two phase commit ????

Hi,
I have two databases in the same instance, sourcedb and
targetdb. In sourcedb I created one table (t1). In targetdb I created
another table (t2).

In sourcedb I created one nickname (N2) for T2 table in targetdb.

I can execute this statement OK

db2 "insert into T1 values......"

this statement OK (insert into nickname connected to sourcedb)

db2 "insert into N2 values ....."

but I can't execute both statements in the same transaction

db2 +c "insert into T1 values ......"
db2 +c "insert into N2 values ......"
DB21034E The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. During SQL processing it returned:
SQL30090N Operation invalid for application execution environment. Reason
code = "18". SQLSTATE=25000
What's the problem here ?????
Thanks in advance
Mel

*** Sent From/Enviado desde: http://groups.expo.st ***
Nov 12 '05 #1
4 6098
Seems like you are doing this from the command line.
DO;
db2 qyuery client
Ypu should see that connect ype is 1 and syncpoint is onephase.

What you are trying to do in the "samw" unit of work (+c) is to connect to
two databases in change mode. This is not allowed with the environment of
connect type 1 and syncpoint onephase. You need to specify that your command
window environment runs differently.
Do:
db2 set client connect 2 syncpoint twophase
db2 connect to sourcedb
db2 connect to target db
db2 +c "insert into T1 values ......"
db2 +c "insert into N2 values ......"
db2 commit
db2 disconnect all

This should work. Also, you may want to read a bit in the Admin Guide about
this environment.

HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"MelApiso" <Me*******@hotmail.com> a écrit dans le message de news:
b4********************************@groups.expo.st. ..
Hi,
I have two databases in the same instance, sourcedb and
targetdb. In sourcedb I created one table (t1). In targetdb I created
another table (t2).

In sourcedb I created one nickname (N2) for T2 table in targetdb.

I can execute this statement OK
db2 "insert into T1 values......"

this statement OK (insert into nickname connected to sourcedb)

db2 "insert into N2 values ....."

but I can't execute both statements in the same transaction

db2 +c "insert into T1 values ......"
db2 +c "insert into N2 values ......"
DB21034E The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. During SQL processing it returned:
SQL30090N Operation invalid for application execution environment.
Reason
code = "18". SQLSTATE=25000
What's the problem here ?????
Thanks in advance Mel

*** Sent From/Enviado desde: http://groups.expo.st ***


Nov 12 '05 #2
After looking at my note I thought this may not work with nicknamed tables,
I'm not sure but I don't think it will..
It will work like this though:
db2 set client connect 2 syncpoint twophase
db2 connect to sourcedb
db2 +c "insert into T1 values ......"
db2 connect to target db
db2 +c "insert into T2 values ......"
db2 commit
db2 disconnect all

Apologies, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Pierre Saint-Jacques" <se*****@invalid.net> a écrit dans le message de
news: ny******************@weber.videotron.net...
Seems like you are doing this from the command line.
DO;
db2 qyuery client
Ypu should see that connect ype is 1 and syncpoint is onephase.

What you are trying to do in the "samw" unit of work (+c) is to connect to
two databases in change mode. This is not allowed with the environment of
connect type 1 and syncpoint onephase. You need to specify that your
command window environment runs differently.
Do:
db2 set client connect 2 syncpoint twophase
db2 connect to sourcedb
db2 connect to target db
db2 +c "insert into T1 values ......"
db2 +c "insert into N2 values ......"
db2 commit
db2 disconnect all

This should work. Also, you may want to read a bit in the Admin Guide
about this environment.

HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"MelApiso" <Me*******@hotmail.com> a écrit dans le message de news:
b4********************************@groups.expo.st. ..
Hi,
I have two databases in the same instance, sourcedb and
targetdb. In sourcedb I created one table (t1). In targetdb I created
another table (t2).

In sourcedb I created one nickname (N2) for T2 table in targetdb.

I can execute this statement OK
db2 "insert into T1 values......"

this statement OK (insert into nickname connected to sourcedb)

db2 "insert into N2 values ....."

but I can't execute both statements in the same transaction

db2 +c "insert into T1 values ......"
db2 +c "insert into N2 values ......"
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it returned:
SQL30090N Operation invalid for application execution environment.
Reason
code = "18". SQLSTATE=25000
What's the problem here ?????
Thanks in advance Mel

*** Sent From/Enviado desde: http://groups.expo.st ***


Nov 12 '05 #3
I don't think this is supported in v8.

Nov 12 '05 #4
As indicated by the text of the error message, you can only update against
two databases simultaneously if your execution environment supports it. In
general, this means executing under the control of a suitable transaction
monitor - either an external one (recommended) or the DB2-provided one (last
resort measure). Review the documentation on configuring and using
transaction monitors.

The db2 command line processor is not a transaction monitor, so your case
won't work.

"MelApiso" <Me*******@hotmail.com> wrote in message
news:b4********************************@groups.exp o.st...
Hi,
I have two databases in the same instance, sourcedb and
targetdb. In sourcedb I created one table (t1). In targetdb I created
another table (t2).

In sourcedb I created one nickname (N2) for T2 table in targetdb.

I can execute this statement OK
db2 "insert into T1 values......"

this statement OK (insert into nickname connected to sourcedb)

db2 "insert into N2 values ....."

but I can't execute both statements in the same transaction

db2 +c "insert into T1 values ......"
db2 +c "insert into N2 values ......"
DB21034E The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. During SQL processing it returned:
SQL30090N Operation invalid for application execution environment.
Reason
code = "18". SQLSTATE=25000
What's the problem here ?????
Thanks in advance Mel

*** Sent From/Enviado desde: http://groups.expo.st ***

Nov 12 '05 #5

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

Similar topics

2
by: William Chan | last post by:
Dear all, When two systems are talking to each other by messaging mode (e.g. MQ), is there any way, system level and/or application level, to maintain transaction control (unit of work) across...
0
by: MelApiso | last post by:
Hi, I have two databases in the same instance, sourcedb and targetdb. In sourcedb I created one table (t1). In targetdb I created another table (t2). In sourcedb I created one nickname (N2) for...
1
by: _link98 | last post by:
On Linux or Solaris with UDB 8.2.2, can an SQL/PL stored-procedure use two-phase-commit with nicknames and if DB2 provides the Transaction-manager? i.e. in the same transaction, can an SQL/PL...
5
by: Jiggaz | last post by:
Hi, Look my stored procedure : __________________ ALTER PROCEDURE dbo.CreateAccount @Nickname varchar(30), @Password varchar(15), @Email varchar(50), @Date datetime,
3
by: Jean-Marc Blaise | last post by:
Hi, Is there any reason why a CREATE NICKNAME statement fails if the remote object is an ALIAS ? I actually have an ALIAS that is used to point to the correct table in the remote DB, and...
5
by: Ravi Chirawala | last post by:
Is Two phase commit allowed in DB2? We need to update a local tables and few federated tables in a single Unit of Work. Is it possible to do ? Regards, Ravi
2
by: amoon.ljlj | last post by:
Hello , My question is: does ms sql support two phase commit protocol? and Why if no. How if yes. Thank you
13
by: CindySue | last post by:
I have a table of providers that has a license number and fullname field, among others. Deman helped me with being able to enter a nickname and having it change to the fullname if a nickname exists...
1
by: TheAndroid | last post by:
All, I'm having a difficult time trying to implement two-phase commits across federated database members in UDB 8.3. I've tried using MQ (v 6.0) as the transaction manager and UDB tells me that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...
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...

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.