473,789 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8706
"Eugene" <eu****@profitl ogic.com> wrote in message
news:95******** *************** ***@posting.goo gle.com...
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\SQLLI B\BIN>db2set DB2INSTANCE=lin ux0

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\SQLLI B\BIN>db2set -all
[e] DB2PATH=C:\Prog ram Files\IBM\SQLLI B
[i] DB2_CORRELATED_ PREDICATES=TRUE
[i] DB2_HASH_JOIN=Y ES
[i] DB2ACCOUNTNAME= LIZARD\efiryago
[i] DB2INSTOWNER=LI ZARD
[i] DB2PORTRANGE=60 000:60003
[i] DB2_GRP_LOOKUP= LOCAL
[i] DB2INSTPROF=C:\ PROGRA~1\IBM\SQ LLIB
[i] DB2COMM=TCPIP
[g] DB2_DOCCDPATH=C :\Program Files\IBM\SQLLI B\
[g] DB2SYSTEM=LIZAR D
[g] DB2PATH=C:\Prog ram Files\IBM\SQLLI B
[g] DB2INSTDEF=DB2
[g] DB2ADMINSERVER= DB2DAS00

C:\Program Files\IBM\SQLLI B\BIN>db2set DB2INSTDEF=linu x0

C:\Program Files\IBM\SQLLI B\BIN>db2set -all
[e] DB2PATH=C:\Prog ram Files\IBM\SQLLI B
[i] DB2_CORRELATED_ PREDICATES=TRUE
[i] DB2_HASH_JOIN=Y ES
[i] DB2ACCOUNTNAME= LIZARD\efiryago
[i] DB2INSTOWNER=LI ZARD
[i] DB2PORTRANGE=60 000:60003
[i] DB2_GRP_LOOKUP= LOCAL
[i] DB2INSTPROF=C:\ PROGRA~1\IBM\SQ LLIB
[i] DB2COMM=TCPIP
[g] DB2_DOCCDPATH=C :\Program Files\IBM\SQLLI B\
[g] DB2SYSTEM=LIZAR D
[g] DB2PATH=C:\Prog ram Files\IBM\SQLLI B
[g] DB2INSTDEF=LINU X0
[g] DB2ADMINSERVER= DB2DAS00
C:\work\Tuning\ DB2\db2batch>db 2 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>db 2batch -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****@profitl ogic.com> wrote in message
news:95******** *************** ***@posting.goo gle.com...
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\SQLLI B\BIN>db2set DB2INSTANCE=lin ux0

I would use SET DB2INSTANCE=nam e 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 "DB2INSTANC E"

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

set DB2INSTANCE=new inst

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\SQLLI B\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\SQLLI B\BIN>db2set -all
[e] DB2PATH=C:\Prog ram Files\IBM\SQLLI B
[g] DB2_DOCCDPATH=C :\Program Files\IBM\SQLLI B\
[g] DB2SYSTEM=LIZAR D
[g] DB2PATH=C:\Prog ram Files\IBM\SQLLI B,
[g] DB2INSTDEF=LINU X0
[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**********@I nvalid.Domain> wrote in message news:<3f******* *@news1.prserv. net>...
Eugene wrote:
That is strange, but db2set fails to set DB2INSTANCE:

C:\Program Files\IBM\SQLLI B\BIN>db2set DB2INSTANCE=lin ux0

I would use SET DB2INSTANCE=nam e 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 "DB2INSTANC E"

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

set DB2INSTANCE=new inst

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****@profitl ogic.com> wrote in message
news:95******** *************** ***@posting.goo gle.com...
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\SQLLI B\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\SQLLI B\BIN>db2set -all
[e] DB2PATH=C:\Prog ram Files\IBM\SQLLI B
[g] DB2_DOCCDPATH=C :\Program Files\IBM\SQLLI B\
[g] DB2SYSTEM=LIZAR D
[g] DB2PATH=C:\Prog ram Files\IBM\SQLLI B,
[g] DB2INSTDEF=LINU X0
[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**********@I nvalid.Domain> wrote in message

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

C:\Program Files\IBM\SQLLI B\BIN>db2set DB2INSTANCE=lin ux0

I would use SET DB2INSTANCE=nam e 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 "DB2INSTANC E"

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

set DB2INSTANCE=new inst

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****@profitlo gic.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.n l> wrote in message news:<MP******* *************** *@news.xs4all.n l>...
In article <95************ **************@ posting.google. com>,
eu****@profitlo gic.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****@profitlo gic.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.tor olab.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****@profitl ogic.com> wrote in message
news:95******** *************** ***@posting.goo gle.com...
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\SQLLI B\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\SQLLI B\BIN>db2set -all
[e] DB2PATH=C:\Prog ram Files\IBM\SQLLI B
[g] DB2_DOCCDPATH=C :\Program Files\IBM\SQLLI B\
[g] DB2SYSTEM=LIZAR D
[g] DB2PATH=C:\Prog ram Files\IBM\SQLLI B,
[g] DB2INSTDEF=LINU X0
[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**********@I nvalid.Domain> wrote in message

news:<3f******* *@news1.prserv. net>...
Eugene wrote:
> That is strange, but db2set fails to set DB2INSTANCE:
>
> C:\Program Files\IBM\SQLLI B\BIN>db2set DB2INSTANCE=lin ux0
>
I would use SET DB2INSTANCE=nam e 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 "DB2INSTANC E"

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

set DB2INSTANCE=new inst

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
2770
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 other. On my application startup, I configure the objects usting the RemotingConfiguration class to load the config file. Then I "ping" each of the objects to call their constructors. This all works fine if no one is attempting to connect at the...
3
469
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 architecture into .Net -- not looking to do it at this time, just to understand how I would achieve it. In the old environment, we had two classes, a client and a server class, that managed a data object. The server object knew how to interface with the...
7
2274
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 application is "sleeping", and it is not loaded in the memory. Then, after very first request to the app, it is compiled (aspx files), loaded into memory, and executed. Then, a separate thread is issued to serve my page request, and it takes care for me...
8
2700
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 choose) on the users / client file system. I have toyed with a Self-Extracting zip file but the contents of my zip file changes each time it is downloaded so that invalidates the exe file. Also the text file is so small it is a waste to zip it.
4
3538
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 objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the application initially. I have VS 2002, Windows XP, Access XP(2000 format). He is my problem....
4
3998
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 told remoting was the way to go. So I got a client and a server program up and going and from the client I can call a routine in the server program. I can't figure out how to actually send data to the client. At the moment the client calls a...
0
3448
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 usually logged on to my PC as a domain user, IBE\ikovacs. As IBE\ikovacs, I'm member of my PC's Administrators group. There's also a local user Administrator, who's the default Windows admin user. I used that account (using runas) to install DB2...
5
13314
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 steps 1. Using Explorer and copy a file, "C:\temp\attachment.txt" 2. Locate the item of type "MAPIMAIL File" in "SendTo" in Explorer (i.e. the default mail client program) 3. Paste the file to the "MAPIMAIL File" item in "SendTo". This will cause...
1
2244
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 , it only takes about 55 minutes to get the same results. (I did restarted db2 instance to avoid cache, also, file system cache is not enabled. ) Now the difference between db2batch and cli is db2batch uses RR, but my cli is CS, so I used db2...
0
9502
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
10383
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
10178
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...
0
9971
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...
0
9000
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7521
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
6751
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
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
5541
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.