Locall and Remote instances

Raquel Rodriguez

Locall and Remote instances
I read in the manual:

"Instances are cataloged as either local or remote in
the node directory."

How is this done? How is the correspondence between
nodes and instances defined? There is a
REMOTE_INSTANCE parameter on the CATALOG NODE
command. Is it used for this purpose?

Here is my understanding: A server with a logical IP
address of "svr" has two instances "inst1" (with
database "db1") and "inst2" (with database "db2"). So,
on a client, to enable access to the two instances, we
would execute the following commands:

CATALOG tcpip NODE node1 REMOTE svr SERVER portnum1
REMOTE_INSTANCE inst1
CATALOG tcpip NODE node2 REMOTE svr SERVER portnum2
REMOTE_INSTANCE inst2

Note that in the above commands, the correspondence
between NODEs and INSTANCEs is defined. Is this the
way it is done?

And then catalog the databases that exist on those
instances.

CATALOG DATABASE db1 AS db1 AT NODE node1
CATALOG DATABASE db2 AS db1 AT NODE node2

Is this correct?

In UDB Command reference, here is the description of
ATTACH command:

"Enables an application to specify the *instance* at
which instance-level commands (CREATE DATABASE and
FORCE APPLICATION, for example) are to be executed".

But the syntax of ATTACH command is:

ATTACH to *nodename*

So, it seems that nodename and instance-name have been
used synonymously. I am really confused....

TIA
Raquel.

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

tim malamphy

Re: Locall and Remote instances
(in response to Raquel Rodriguez)
Raquel-
Just remember that a lo-cal instance contains less
than 100 calories per serving and is low on sodium...



Let's say you have a database you've created on your
machine1 named dbase1.

If you say:
connect to dbase1
you've connected locally.

Now you
catalog tcpip node node1 remote machine1.dnsname
server blah,blah,blah
catalog database dbase1 as dbalias1 at node node1

Now when you:

connect to dbalias1 user username using password

You've still connected to dbase1, but are now
connected remotely, through an alias. I'm sure
there's a good reason to do this, but I can't think of
one. Maybe if you're testing tcp/ip.


Now it's also perfectly permissible to name both a
node and a database the same thing. This can be
useful, except when you have more than 1 database on a
machine/node.


ATTACH 'hooks' you to an node/instance. This lets
you do things like look at the configuration files
without actually connecting to any particular
database. CONNECT 'welds' you to a specific database
until you TERMINATE.

Each UDB instance listens through it's own tcp/ip
port. You tell your machine which port that each
instance uses via the SERVER option on the CATALOG
NODE statement. If you want to access multiple
instances on a separate machine, you have to create a
different NODE entry for each instance. When you
invoke ATTACH, you specify the NODE entry, which could
also be a database or instance name, depending on how
you set it up.

Clear as mud yet?

tim




--- Raquel Rodriguez <[login to unmask email]>
wrote:
> I read in the manual:
>
> "Instances are cataloged as either local or remote
> in
> the node directory."
>
> How is this done? How is the correspondence between
> nodes and instances defined? There is a
> REMOTE_INSTANCE parameter on the CATALOG NODE
> command. Is it used for this purpose?
>
> Here is my understanding: A server with a logical IP
> address of "svr" has two instances "inst1" (with
> database "db1") and "inst2" (with database "db2").
> So,
> on a client, to enable access to the two instances,
> we
> would execute the following commands:
>
> CATALOG tcpip NODE node1 REMOTE svr SERVER portnum1
> REMOTE_INSTANCE inst1
> CATALOG tcpip NODE node2 REMOTE svr SERVER portnum2
> REMOTE_INSTANCE inst2
>
> Note that in the above commands, the correspondence
> between NODEs and INSTANCEs is defined. Is this the
> way it is done?
>
> And then catalog the databases that exist on those
> instances.
>
> CATALOG DATABASE db1 AS db1 AT NODE node1
> CATALOG DATABASE db2 AS db1 AT NODE node2
>
> Is this correct?
>
> In UDB Command reference, here is the description of
> ATTACH command:
>
> "Enables an application to specify the *instance* at
> which instance-level commands (CREATE DATABASE and
> FORCE APPLICATION, for example) are to be executed".
>
> But the syntax of ATTACH command is:
>
> ATTACH to *nodename*
>
> So, it seems that nodename and instance-name have
> been
> used synonymously. I am really confused....
>
> TIA
> Raquel.
>
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
>
>
---------------------------------------------------------------------------------
> Welcome to the IDUG DB2-L list. To unsubscribe, go
> to the archives and home page at
> http://www.idugdb2-l.org/archives/db2-l.html. From
> that page select "Join or Leave the list". If you
> will be out of the office, send the SET DB2-L NO
> MAIL command to [login to unmask email] The IDUG
> List Admins can be reached at
> [login to unmask email] Find out the latest
> on IDUG conferences at
http://conferences.idug.org/index.cfm


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm