RE: Host name in DB2

RE: Host name in DB2

 

  

DB2 gives you a host of current values. Maybe there's one in here:

CURRENT DATE
CURRENT DEFAULT TRANSFORM GROUP
CURRENT DEGREE
CURRENT EXPLAIN MODE
CURRENT EXPLAIN SNAPSHOT
CURRENT NODE
CURRENT PATH
CURRENT QUERY OPTIMIZATION
CURRENT REFRESH AGE
CURRENT SCHEMA
CURRENT SERVER
CURRENT TIME
CURRENT TIMESTAMP
CURRENT TIMEZONE

I think you could use
db2 values current schema;
or
db2 values current node;

or look at https://aurora.vcu.edu/db2help/db2s0/frm3toc.htm



-----Original Message-----
From: Bandaru Jayaprakash
[mailto:db2udbdba-ezmlmshield-x51810963.[Email address protected]
Sent: dinsdag 26 april 2005 15:12
To: LazyDBA Discussion
Subject: RE: Host name in DB2

Sorry there is a little confusion in this.

We need the equivalent of Sybase function host_name().

The host_name() function in Sybase is not the host on which the instance
is running, but rather the host from
which the client connected.

We need the equivalent of this in DB2.

If anybody know about this, plz le me know.

Thanks,

Jayaprakash.

> -----Original Message-----
> From: Bandaru, Jayaprakash
> Sent: Tuesday, April 26, 2005 1:45 PM
> To: '[Email address protected]
> Subject: Host name in DB2
>
> Hi All,
>
> We are in the process of migrating database from Sybase to DB2. In the

> Sybase triggers, they have used host name.
>
> In DB2 we get the host name using Administrator server conf parameter
> "DB2SYSTEM" at the command prompt (db2 "get admin cfg" | grep -i
> DB2SYSTEM), but we need this value to be used in DB2 triggers.
>
> Please let us know is there any way we can use the host name in
> triggers.
>
> Thanks for your help.
>
> Jayaprakash.
>


DB2 & UDB email list listserv db2-l LazyDBA home page