473,394 Members | 1,371 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.

db2batch from windows client: SQL1427N An instance attachment does not exist

I am trying to use db2batch from my XP client against a remote
database.
And here's what I am getting:

C:\work\Tuning\DB2\db2batch> db2batch -d oakl0 -a fs/fs -f
db2batch.sql
Running in Embedded Dynamic mode.

---------------------------------------------
--#SET PERF_DETAIL 5

Statement number: 1

select count(*) from files

1
--------------
2715211
Number of rows retrieved is: 1
Number of rows sent to output is: 1

SQL1427N An instance attachment does not exist.
Elapsed Time is: 1.772 seconds

---------------------------------------------

Summary of Results
==================
Elapsed Agent CPU Rows Rows
Statement # Time (s) Time (s) Fetched
Printed
1 1.772 Not Collected 1 1

Arith. mean 1.772
Geom. mean 1.772
I tried to attach before executing db2batch like
C:\work\Tuning\DB2\db2batch> db2 attach to linux0 user fs using fs

Instance Attachment Information

Instance server = DB2/LINUX 8.1.3
Authorization ID = FS
Local instance alias = LINUX0

but it didn't help.

The same procedure works fine localy on the server generating stats
according to the PERF_DETAIL set.

Any idea?

Thanks
-Eugene
Nov 12 '05 #1
9 8664
"Eugene" <eu****@profitlogic.com> wrote in message
news:95**************************@posting.google.c om...
I am trying to use db2batch from my XP client against a remote
database.
And here's what I am getting:

[snip]
The same procedure works fine localy on the server generating stats
according to the PERF_DETAIL set.

Any idea?

Thanks
-Eugene


Try changing the default DB2 instance. Issue the following command from your
XP command window:

db2set db2instance=new_value
Nov 12 '05 #2
That is strange, but db2set fails to set DB2INSTANCE:

C:\Program Files\IBM\SQLLIB\BIN>db2set DB2INSTANCE=linux0

DBI1302E Invalid parameter detected.

Explanation:

An invalid parameter was used.

User Response:

Use the -? option for the usage help message.

Well... then I tried to reset DB2INSTDEF from the default, ie local
DB2, to the remote one on linux:

C:\Program Files\IBM\SQLLIB\BIN>db2set -all
[e] DB2PATH=C:\Program Files\IBM\SQLLIB
[i] DB2_CORRELATED_PREDICATES=TRUE
[i] DB2_HASH_JOIN=YES
[i] DB2ACCOUNTNAME=LIZARD\efiryago
[i] DB2INSTOWNER=LIZARD
[i] DB2PORTRANGE=60000:60003
[i] DB2_GRP_LOOKUP=LOCAL
[i] DB2INSTPROF=C:\PROGRA~1\IBM\SQLLIB
[i] DB2COMM=TCPIP
[g] DB2_DOCCDPATH=C:\Program Files\IBM\SQLLIB\
[g] DB2SYSTEM=LIZARD
[g] DB2PATH=C:\Program Files\IBM\SQLLIB
[g] DB2INSTDEF=DB2
[g] DB2ADMINSERVER=DB2DAS00

C:\Program Files\IBM\SQLLIB\BIN>db2set DB2INSTDEF=linux0

C:\Program Files\IBM\SQLLIB\BIN>db2set -all
[e] DB2PATH=C:\Program Files\IBM\SQLLIB
[i] DB2_CORRELATED_PREDICATES=TRUE
[i] DB2_HASH_JOIN=YES
[i] DB2ACCOUNTNAME=LIZARD\efiryago
[i] DB2INSTOWNER=LIZARD
[i] DB2PORTRANGE=60000:60003
[i] DB2_GRP_LOOKUP=LOCAL
[i] DB2INSTPROF=C:\PROGRA~1\IBM\SQLLIB
[i] DB2COMM=TCPIP
[g] DB2_DOCCDPATH=C:\Program Files\IBM\SQLLIB\
[g] DB2SYSTEM=LIZARD
[g] DB2PATH=C:\Program Files\IBM\SQLLIB
[g] DB2INSTDEF=LINUX0
[g] DB2ADMINSERVER=DB2DAS00
C:\work\Tuning\DB2\db2batch>db2 list db directory

System Database Directory

Number of entries in the directory = 8
....
Database 4 entry:

Database alias = OAKL0
Database name = OAKDB
Node name = LINUX0
Database release level = a.00
Comment =
Directory entry type = Remote
Catalog database partition number = -1
....
No any better:

C:\work\Tuning\DB2\db2batch>db2batch -d oakl0 -a fs/fs -f db2batch.sql
Running in Embedded Dynamic mode.

---------------------------------------------
--#SET PERF_DETAIL 5

Statement number: 1

select count(*) from files

1
--------------
2715211
Number of rows retrieved is: 1
Number of rows sent to output is: 1

SQL1427N An instance attachment does not exist.
Elapsed Time is: 2.243 seconds

---------------------------------------------

Summary of Results
==================
Elapsed Agent CPU Rows Rows
Statement # Time (s) Time (s) Fetched
Printed
1 2.243 Not Collected 1 1

Arith. mean 2.243
Geom. mean 2.243
By the way, I've been told, db2batch from 8.1GA client on W2K works
fine against a remote database, bug in FP3?

-Eugene
"Mark A" <ma@switchboard.net> wrote in message news:<Gr*****************@news.uswest.net>...
"Eugene" <eu****@profitlogic.com> wrote in message
news:95**************************@posting.google.c om...
I am trying to use db2batch from my XP client against a remote
database.
And here's what I am getting:

[snip]
The same procedure works fine localy on the server generating stats
according to the PERF_DETAIL set.

Any idea?

Thanks
-Eugene


Try changing the default DB2 instance. Issue the following command from your
XP command window:

db2set db2instance=new_value

Nov 12 '05 #3
Eugene wrote:
That is strange, but db2set fails to set DB2INSTANCE:

C:\Program Files\IBM\SQLLIB\BIN>db2set DB2INSTANCE=linux0

I would use SET DB2INSTANCE=name as it is environment variable to be
set, not DB2 regisry variable.

On Windows:

My Computer (right mouse click) -> Properties -> Advanced Tab ->
Environment Variables

Top pane is for the User variables of the currently logged on user;
bottom pane is for system variables. Use bottom pane.

After changes are done close the existin open windows on desktop and
open then again.

You may verify your settings by issuing from command prompt:

set | find "DB2INSTANCE"

If you need to change your environment variable *just* for current
session, just issue:

set DB2INSTANCE=newinst

This is valid until end of this session (until you close the window).
Jan M. Nelken

Nov 12 '05 #4
Hi Jan,

After I reset the XP system environment variable DB2INSTANCE from the
default DB2 to the new remote one LINIX0, I am getting this:

[db2batch]$ db2batch -d oakl0 -a fs/fs -f db2batch.sql

ERROR!!! -> Could not connect to database, SQLCODE = -1390
Make sure database name is correct
Type "db2batch -h" for more help

And, even worst, the DB2 client stopped working with the message:

C:\Program Files\IBM\SQLLIB\BIN>db2
SQL1390C The environment variable DB2INSTANCE is not defined or is
invalid (?)

Then, I also tried to reset DB2INSTDEF to LINIX0 by db2set so that
DB2INSTDEF would match DB2INSTANCE (just as a try)

C:\Program Files\IBM\SQLLIB\BIN>db2set -all
[e] DB2PATH=C:\Program Files\IBM\SQLLIB
[g] DB2_DOCCDPATH=C:\Program Files\IBM\SQLLIB\
[g] DB2SYSTEM=LIZARD
[g] DB2PATH=C:\Program Files\IBM\SQLLIB,
[g] DB2INSTDEF=LINUX0
[g] DB2ADMINSERVER=DB2DAS00
but it didn't help. So I had to reset both vars back to the
installation default, ie DB2, to make the client working at all.

Finaly, I opened pmr with IBM support :))
However, any further idea from the community on that would be
appreciated!

Thanks,
-Eugene

"Jan M. Nelken" <Un**********@Invalid.Domain> wrote in message news:<3f********@news1.prserv.net>...
Eugene wrote:
That is strange, but db2set fails to set DB2INSTANCE:

C:\Program Files\IBM\SQLLIB\BIN>db2set DB2INSTANCE=linux0

I would use SET DB2INSTANCE=name as it is environment variable to be
set, not DB2 regisry variable.

On Windows:

My Computer (right mouse click) -> Properties -> Advanced Tab ->
Environment Variables

Top pane is for the User variables of the currently logged on user;
bottom pane is for system variables. Use bottom pane.

After changes are done close the existin open windows on desktop and
open then again.

You may verify your settings by issuing from command prompt:

set | find "DB2INSTANCE"

If you need to change your environment variable *just* for current
session, just issue:

set DB2INSTANCE=newinst

This is valid until end of this session (until you close the window).
Jan M. Nelken

Nov 12 '05 #5
Set the db2instance and db2instdef back to the original setting. Then
catalog the remote node and remote database then just connect to it

--
Garfield A. Lewis
DB2 UDB Development,
IBM Canada Laboratory
"Eugene" <eu****@profitlogic.com> wrote in message
news:95**************************@posting.google.c om...
Hi Jan,

After I reset the XP system environment variable DB2INSTANCE from the
default DB2 to the new remote one LINIX0, I am getting this:

[db2batch]$ db2batch -d oakl0 -a fs/fs -f db2batch.sql

ERROR!!! -> Could not connect to database, SQLCODE = -1390
Make sure database name is correct
Type "db2batch -h" for more help

And, even worst, the DB2 client stopped working with the message:

C:\Program Files\IBM\SQLLIB\BIN>db2
SQL1390C The environment variable DB2INSTANCE is not defined or is
invalid (?)

Then, I also tried to reset DB2INSTDEF to LINIX0 by db2set so that
DB2INSTDEF would match DB2INSTANCE (just as a try)

C:\Program Files\IBM\SQLLIB\BIN>db2set -all
[e] DB2PATH=C:\Program Files\IBM\SQLLIB
[g] DB2_DOCCDPATH=C:\Program Files\IBM\SQLLIB\
[g] DB2SYSTEM=LIZARD
[g] DB2PATH=C:\Program Files\IBM\SQLLIB,
[g] DB2INSTDEF=LINUX0
[g] DB2ADMINSERVER=DB2DAS00
but it didn't help. So I had to reset both vars back to the
installation default, ie DB2, to make the client working at all.

Finaly, I opened pmr with IBM support :))
However, any further idea from the community on that would be
appreciated!

Thanks,
-Eugene

"Jan M. Nelken" <Un**********@Invalid.Domain> wrote in message

news:<3f********@news1.prserv.net>...
Eugene wrote:
That is strange, but db2set fails to set DB2INSTANCE:

C:\Program Files\IBM\SQLLIB\BIN>db2set DB2INSTANCE=linux0

I would use SET DB2INSTANCE=name as it is environment variable to be
set, not DB2 regisry variable.

On Windows:

My Computer (right mouse click) -> Properties -> Advanced Tab ->
Environment Variables

Top pane is for the User variables of the currently logged on user;
bottom pane is for system variables. Use bottom pane.

After changes are done close the existin open windows on desktop and
open then again.

You may verify your settings by issuing from command prompt:

set | find "DB2INSTANCE"

If you need to change your environment variable *just* for current
session, just issue:

set DB2INSTANCE=newinst

This is valid until end of this session (until you close the window).
Jan M. Nelken

Nov 12 '05 #6
In article <95**************************@posting.google.com >,
eu****@profitlogic.com says...
I am trying to use db2batch from my XP client against a remote
database.
And here's what I am getting:

C:\work\Tuning\DB2\db2batch> db2batch -d oakl0 -a fs/fs -f
db2batch.sql
Running in Embedded Dynamic mode.

---------------------------------------------
--#SET PERF_DETAIL 5

Statement number: 1

select count(*) from files

1
--------------
2715211
Number of rows retrieved is: 1
Number of rows sent to output is: 1

SQL1427N An instance attachment does not exist.
Elapsed Time is: 1.772 seconds

---------------------------------------------

Summary of Results
==================
Elapsed Agent CPU Rows Rows
Statement # Time (s) Time (s) Fetched
Printed
1 1.772 Not Collected 1 1

Arith. mean 1.772
Geom. mean 1.772
I tried to attach before executing db2batch like
C:\work\Tuning\DB2\db2batch> db2 attach to linux0 user fs using fs

Instance Attachment Information

Instance server = DB2/LINUX 8.1.3
Authorization ID = FS
Local instance alias = LINUX0

but it didn't help.

The same procedure works fine localy on the server generating stats
according to the PERF_DETAIL set.

Any idea?

Thanks
-Eugene

It looks like db2batch attaches to the remote instance without using
the specified user/pasword. Does it work if you specify another
level of PERF_DETAIL ?
Nov 12 '05 #7
I tried and it, of course, cusseeds for PERF_DETAIL=0,1 which do not
generate detailed SQL stats, but does not for greater 3,4,5 as desired

-Eugene
Gert van der Kooij <ge**@invalid.nl> wrote in message news:<MP***********************@news.xs4all.nl>...
In article <95**************************@posting.google.com >,
eu****@profitlogic.com says...
I am trying to use db2batch from my XP client against a remote
database.
And here's what I am getting:

C:\work\Tuning\DB2\db2batch> db2batch -d oakl0 -a fs/fs -f
db2batch.sql
Running in Embedded Dynamic mode.

---------------------------------------------
--#SET PERF_DETAIL 5

Statement number: 1

select count(*) from files

1
--------------
2715211
Number of rows retrieved is: 1
Number of rows sent to output is: 1

SQL1427N An instance attachment does not exist.
Elapsed Time is: 1.772 seconds

---------------------------------------------

Summary of Results
==================
Elapsed Agent CPU Rows Rows
Statement # Time (s) Time (s) Fetched
Printed
1 1.772 Not Collected 1 1

Arith. mean 1.772
Geom. mean 1.772
I tried to attach before executing db2batch like
C:\work\Tuning\DB2\db2batch> db2 attach to linux0 user fs using fs

Instance Attachment Information

Instance server = DB2/LINUX 8.1.3
Authorization ID = FS
Local instance alias = LINUX0

but it didn't help.

The same procedure works fine localy on the server generating stats
according to the PERF_DETAIL set.

Any idea?

Thanks
-Eugene

It looks like db2batch attaches to the remote instance without using
the specified user/pasword. Does it work if you specify another
level of PERF_DETAIL ?

Nov 12 '05 #8
In article <95**************************@posting.google.com >,
eu****@profitlogic.com says...
I tried and it, of course, cusseeds for PERF_DETAIL=0,1 which do not
generate detailed SQL stats, but does not for greater 3,4,5 as desired


Which indeed indicates that the instance attachment doesn't use the
specified user/password. It looks like a bug to me.
Nov 12 '05 #9
Connect from what?
Before I first tried db2batch, I had the remote instance and database
cataloged and accessed from other apps like CLP on my XP client.

"Garfield Lewis" <ga*****@SPAM-NO-MOREca.ibm.com> wrote in message news:<br**********@hanover.torolab.ibm.com>...
Set the db2instance and db2instdef back to the original setting. Then
catalog the remote node and remote database then just connect to it

--
Garfield A. Lewis
DB2 UDB Development,
IBM Canada Laboratory
"Eugene" <eu****@profitlogic.com> wrote in message
news:95**************************@posting.google.c om...
Hi Jan,

After I reset the XP system environment variable DB2INSTANCE from the
default DB2 to the new remote one LINIX0, I am getting this:

[db2batch]$ db2batch -d oakl0 -a fs/fs -f db2batch.sql

ERROR!!! -> Could not connect to database, SQLCODE = -1390
Make sure database name is correct
Type "db2batch -h" for more help

And, even worst, the DB2 client stopped working with the message:

C:\Program Files\IBM\SQLLIB\BIN>db2
SQL1390C The environment variable DB2INSTANCE is not defined or is
invalid (?)

Then, I also tried to reset DB2INSTDEF to LINIX0 by db2set so that
DB2INSTDEF would match DB2INSTANCE (just as a try)

C:\Program Files\IBM\SQLLIB\BIN>db2set -all
[e] DB2PATH=C:\Program Files\IBM\SQLLIB
[g] DB2_DOCCDPATH=C:\Program Files\IBM\SQLLIB\
[g] DB2SYSTEM=LIZARD
[g] DB2PATH=C:\Program Files\IBM\SQLLIB,
[g] DB2INSTDEF=LINUX0
[g] DB2ADMINSERVER=DB2DAS00
but it didn't help. So I had to reset both vars back to the
installation default, ie DB2, to make the client working at all.

Finaly, I opened pmr with IBM support :))
However, any further idea from the community on that would be
appreciated!

Thanks,
-Eugene

"Jan M. Nelken" <Un**********@Invalid.Domain> wrote in message

news:<3f********@news1.prserv.net>...
Eugene wrote:
> That is strange, but db2set fails to set DB2INSTANCE:
>
> C:\Program Files\IBM\SQLLIB\BIN>db2set DB2INSTANCE=linux0
>
I would use SET DB2INSTANCE=name as it is environment variable to be
set, not DB2 regisry variable.

On Windows:

My Computer (right mouse click) -> Properties -> Advanced Tab ->
Environment Variables

Top pane is for the User variables of the currently logged on user;
bottom pane is for system variables. Use bottom pane.

After changes are done close the existin open windows on desktop and
open then again.

You may verify your settings by issuing from command prompt:

set | find "DB2INSTANCE"

If you need to change your environment variable *just* for current
session, just issue:

set DB2INSTANCE=newinst

This is valid until end of this session (until you close the window).
Jan M. Nelken

Nov 12 '05 #10

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

Similar topics

11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
3
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
7
by: Pavils Jurjans | last post by:
Hello, I wanted to get some light in the subject. As I develop ASP.NET applications, it's necessary to understand how exactly the server- communication happens. It seems like initially...
8
by: DanB | last post by:
This is probably soooo simple but I can't seem to get it. I have a text file that I want users to download via a web page. I want the file to be saved to a default folder (or one that they...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
4
by: WinDev | last post by:
We are trying to build a system where we have a Windows Service do some manipulation of data, and then sending the data to a Windows App. I had posted a question of how we should do this and was...
0
by: Kofa | last post by:
Hi, I cannot create/drop databases from the command line, only from the GUI. Below is a detailed description of my installation and configuration attempts (sorry about the long post). I'm...
5
by: Ben K | last post by:
I saw some posting some time ago regarding a "trick" to automatically pop up an email editor with attachment using the default mail client. It is basically using automation to do the following...
1
by: alisonfun | last post by:
I have a very strange db2 performance problem. I have a sql which join 5 tables and also have a predicate <>. By using cli, it runs about 7 hours to get 8736409 rows result. By using db2batch...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
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.