Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 88 89 90 91 92 93 < 94 > 95 96 97 98 99 100 .. 218 >> Next


Teradata RDBMS Database Administration

6 - 17 Chapter 6: Controlling Access

Session-Related Views

Session-Related Views

The session-related system views that you can use to monitor database access include DBC.SessionInfo[x], DBC.LogOnOff, DBC.EventLog, and, if Security Administration is in effect, DBC.LogonRules.

For more information on all system views, see Teradata RDBMS Data Dictionary.

DBC.SessionInfo View

This view provides information about users who are currently logged on, including the session source (host connection, logon name, and application), the current partition, collation, role, password status, and type of transaction, such as 2PC. (For information about collections of sessions initiated under the same logon, use the DISPLAY POOL command; for details, see Teradata Director Program Reference.)

If you use a multi-tier client architecture, the LogonSource field of this view can provide distinct source identification as it originated from the server tier, including the user ID and application name.

Note: Data strings for TCP/IP sessions are inserted into the LogonSource field by CLIv2, which truncates strings exceeding 128 bytes.

Example 1

Teradata BTEQ 08.00.00.00 for MVS. Enter your logon or BTEQ command: .logon tdpv/socal

.logon tdpv/socal Password:

*** Default Character Set Name 'EBCDIC ' *** Logon successfully completed. *** Transaction semantics are BTET.

*** Total elapsed time was 0.58 seconds.

BTEQ -- Enter your DBC/SQL request or BTEQ command: sel logonsource from dbc.sessiontbl;

sel logonsource from dbc.sessiontbl;

*** Query completed. 5 rows found. One column returned. *** Total elapsed time was 0.44 seconds.

LogonSource

(TCP/IP) 0 5BF 155.64.116.42 IETTST 818 ADMIN BTEQ 01 LSS

(TCP/IP) 06F9 208.199.59.157 NAG2N2 1396 POINT BTEQ 01 LSS

(TCP/IP) 04DC 10.243.71.25 PW_OLD 2462 ROOT ARCMAIN 01 LSS

MVS TDRT D4 8 73 4 BATCH CS210041 SOCAL BTQMAIN

MVS TDPV AN10 0 5 TSO AN10 05 SOCAL IKJFT01

6 - 30

Teradata RDBMS Database Administration Chapter 6: Controlling Access

Session-Related Views

BTEQ -- Enter your DBC/SQL request or BTEQ command:

The first three lines report network sessions. The last two lines report channel-connected sessions. The meaning of each field in each type is as follows:

Field Description, Network Sessions Value in Example 1 |
First Connection name or type (literal) (TCP/IP)
(TCP/IP) I
(TCP/IP) I
Second Port or socket identifier 05BF I
06F9 I
04DC I
Third IP address of the client (host) 155.64.116.42 I
05F9 208.199.59.157 |
10.243.71.25 I
Fourth Teradata Director Program Identifier (TDPID) IETST
NA2N2
PW_OLD I
Fifth Client process/thread identifier 818 I
1396 I
2462 I
Sixth Username under which this session logged on ADMIN
POINT
ROOT I
Seventh Name of the application (executable) under which this session was invoked BTEQ
BTEQ
ARCMAIN
Eighth Literal, all network sessions. 01
01
01
Ninth Literal, all network sessions. LSS
LSS
LSS

6 - 30 Teradata RDBMS Database Administration Chapter 6: Controlling Access

Session-Related Views

Field Description, Channel (Mainframe) Session Value in Example 1
First Machine name. MVS
MVS
Second Teradata Director Program (TDP) identifier. TDRT
TDPV
Third Job name. D48734
AN1005
Fourth Job type. BATCH
TSO
Fifth Client process/thread identifier. CS210041
AN1005
Sixth Group name. SOCAL
SOCAL
Seventh Name of the application (executable) under which this session was invoked. BTQMAIN
IKJFT01

Example 2

Because of the length of LogonSource field, if you combine it with other fields, make use of the BTEQ .SET formatting commands WIDTH and FOLDLINE to avoid data truncation. For example, you can set line width and folding with:

Teradata BTEQ 06.00.00.00 for WIN32. Enter your logon or BTEQ command:

.logon agassi/dbc Password:

*** Logon successfully completed. *** Transaction Semantics are BTET. *** Character Set Name is 'ASCII'.

*** Total elapsed time was 2 seconds.

BTEQ -- Enter your DBC/SQL request or BTEQ command: .set foldline on

.set foldline on

BTEQ -- Enter your DBC/SQL request or BTEQ command: .set width 75

.set width 75

BTEQ -- Enter your DBC/SQL request or BTEQ command: select logonsource, logondate, logontime from dbc.sessioninfo;

select logonsource, logondate, logontime from dbc.sessioninfo;

6 - 30

Teradata RDBMS Database Administration Chapter 6: Controlling Access

Session-Related Views

*** Query completed. 3 rows found. 3 columns returned. *** Total elapsed time was 1 second. LogonSource

LogonDate LogonTime

(TCP-IP) 05E1 153.64.145.66 NA2N3 314 TEST_USER BTEQ 01 LSS

02/06/11 09:58:35.59 (TCP-IP) 050C 153.64.14.183 PW_OLD 7512 WEEKLY BTEQ 01 LSS

02/07/05 20:24:14.43 (TCP-IP) 057F 153.64.145.66 NA2N2 230 TEST_USER BTEQ 01 LSS

02/06/11 07:44:42.17

BTEQ -- Enter your DBC/SQL request or BTEQ command:
Previous << 1 .. 88 89 90 91 92 93 < 94 > 95 96 97 98 99 100 .. 218 >> Next