TimesTen's logical server name concept

Source: Internet
Author: User
Tags dsn unix domain socket

Concept

The concept of logical server name (logical server name) in TimesTen is rarely used, but it is necessary to understand it.
First, logical server is defined on the client, pointing to the server side.
Second, you must use logical server name when using a non-TCP/IP communication protocol or TimesTen server not listening on the default port.

A logical server name is a definition for a server system on the TimesTen Client. In some cases, such as if using a communication protocol other than TCP/IP for local client/server or the TimesTen Serve R process is not listening on the default TCP/IP port, you must define a logical server name on the client system. In these cases, the Client DSN must refer to the logical server name. However, in most cases when the communication protocol used is TCP/IP, the Client DSN can refer directly to the server hos T name without has to define a logical server name.

The configuration of the logical server is defined in the Sys.ttconnect.ini file. For example:

$ cat Sys.ttconnect.ini# Copyright (c) 1999, the Oracle and/or its affiliates. All rights reserved. ############################################################# # # # # is a sample Sys.ttconnect.ini file, used for the# TimesTen Client. It contains entries for each server.###############################################################[ttlocalhost_tt1122] Description=timesten servernetwork_address=ttlocalhosttcp_port=53393

In this case, because it is a 32-bit version, 53393 in Tcp_port is the default port.
It is worth saying that network_address:
Ttlocalhost means using UNIX Domain socket communication
Ttshmhost means IPC communication using shared memory
Network_address can also be defined as host name or IP address

Example

In this example we have installed two TimesTen samples tt1122 and ttnew in one VM, the first using the default port 53392. Because the default port is occupied, the second uses a different port number of 55555.

$ cat/etc/timesten/instance_info#SUM 55602 1[tt1122]Product=timesten11.2.2.6.2InstallDir=/home/oracle/timesten/tt1122Instanceadministrator=oracleDaemonhome=/home/oracle/timesten/tt1122/infoBitlevel=64Component=client/server and DataManagerTt_port=53392[Ttnew]Product=timesten11.2.2.8.11InstallDir=/u01/timesten/ttnewInstanceadministrator=oracleDaemonhome=/u01/timesten/ttnew/infoBitlevel=64Component=client/server and DataManagerTt_port=55555$ ttversiontimesten Release 11.2.2.6.2 (linux/x86_64) (tt1122:53392) 2014-01-03t07:01:05z Instance admin:or Acle Instance Home directory:/home/oracle/timesten/tt1122 Group owner:oracle Daemon home directory:/home/oracle/time Sten/tt1122/info PL/SQL enabled.$. /u01/timesten/ttnew/bin/ttenv.sh$ ttversiontimesten Release 11.2.2.8.11 (linux/x86_64) (ttnew:55555) 2016-02-09t19:36:50z Instance admin:oracle Instance home directory:/u01/timesten/ttnew Group owner:oracle Daemon Ho Me directory:/u01/timesten/ttnew/info PL/SQL enabled.

Look again at the Tt1122ttstatus:

[[email protected] info]$ ttstatusTimesTen status report as of Wed Jun 29 04:20:17 2016Daemon pid 2644 port 53392 instance tt1122TimesTen server pid 2653 started on port 53393------------------------------------------------------------------------Data store /home/oracle/TimesTen/tt1122/info/DemoDataStore/cachedb1There are no connections to the data storeReplication policy  : ManualCache Agent policy  : ManualPL/SQL enabled.------------------------------------------------------------------------Accessible by group oracleEnd of report

Another terminal, take a look at Ttnew's Ttstatus

$ . /u01/TimesTen/ttnew/bin/ttenv.sh$ export TT_HOME=/u01/TimesTen/ttnew[[email protected] info]$ ttstatusTimesTen status report as of Wed Jun 29 04:21:38 2016Daemon pid 4494 port 55555 instance ttnewTimesTen server pid 4503 started on port 55556------------------------------------------------------------------------Data store /home/oracle/TimesTen/tt1122/info/DemoDataStore/cachedb2There are no connections to the data storeReplication policy  : ManualCache Agent policy  : ManualPL/SQL enabled.------------------------------------------------------------------------Accessible by group oracleEnd of report

Note the two lines of Daemon PID and TimesTen server PID, Daemon refers to TimesTen Data Manager Daemon, which is responsible for the Data Manager service. The daemon port cannot be heavy.
TimesTen server is a child process of daemon, or Subdaemon.

After installing the TimesTen, the system automatically generated the Sys.ttconnect.ini file, first look at tt1122, because it is the first installation of the host, so the default values are used:

[Oracle@timesten-hol info]$ Cat Sys.ttconnect.ini# Copyright (c) 1999, the Oracle and/or its affiliates. All rights reserved. ############################################################# # # # # is a sample Sys.ttconnect.ini file, used for the# TimesTen Client. It contains entries for each server.###############################################################[ttlocalhost_tt1122] Description=timesten servernetwork_address=ttlocalhosttcp_port=53393

Take a look at the second non-default installation ttnew:

[tt1122]$ Cat Sys.ttconnect.ini# Copyright (c) 1999, the Oracle and/or its affiliates. All rights reserved. ############################################################# # # # # is a sample Sys.ttconnect.ini file, used for the# TimesTen Client. It contains entries for each server.###############################################################[Ttlocalhost_ttnew] Description=timesten servernetwork_address=ttlocalhosttcp_port=55556
[tt1122]$ ttisql-v1-e  ' Set Prompt ' Tt1122> "'  repdb1_1122tt1122>create  user tthr identified by  timesten;tt1122>grant create  session to  tthr;tt1122>call ttconfiguration ( ' connectionname ' ); < ConnectionName, repdb1_1122 >[ttnew]$ ttisql-v1-e  ' Set prompt ' ttnew> '  Repdb2_1122ttnew>create  user tthr identified by  timesten;ttnew>grant create  session to  tthr;ttnew>call ttconfiguration ( ' connectionname ' );< connectionname , repdb2_1122;  

Next, test the repdb1_1122 on the tt1122 from the repdb2_1122 on the ttnew.
There is a definition of repdb1cs_1122 in Sys.odbc.ini:

repdb1CS_1122=TimesTen 11.2.2 Client Driver[repdb1CS_1122]TTC_SERVER=ttLocalHost_ttnewTTC_SERVER_DSN=repdb1_1122

However, because Ttlocalhost_ttnew actually points to this instance, it cannot connect to each other.
So we have to modify the ttc_server point to the logical server, involving Sys.odbc.ini and Sys.ttconnect.ini, it may be necessary to copy the other instance of Sys.ttconnect.ini.

[ttnew]$ Cat Sys.odbc.ini...[repdb1cs_1122] ttc_server=ttlocalhost_tt1122ttc_server_dsn=repdb1_1122...[Ttnew]$ hostnametimesten-hol[ttnew]$ Cat Sys.ttconnect.ini# Copyright (c) 1999, the Oracle and/or its affiliates. All rights reserved. ################################################################ This is a sample Sys.ttconnect.ini file , that's used for the# TimesTen Client. It contains entries for each server.###############################################################[Ttlocalhost_ttnew] Description=timesten servernetwork_address=ttlocalhosttcp_port=55556####### ADDED by steven,copied from INSTANCE TT1122 ########[ttlocalhost_tt1122] Description=timesten servernetwork_address=timesten-holtcp_port=53393

Then test connectivity, success:
[ttnew]$ Ttisqlcs "Dsn=repdb1cs_1122;uid=tthr;pwd=timesten"
Command> call Ttconfiguration (' ConnectionName ');
< ConnectionName, repdb1cs_1122 >
1 row found.
Command> call Ttconfiguration (' datastore ');
< DataStore,/home/oracle/timesten/tt1122/info/demodatastore/repdb1_1122 >

Summarize

The logical server name is used for communication protocols that use non-TCP/IP, or TimesTen server is not listening on the default port.
The logical server name is defined in Sys.ttconnect.ini and points to the network address of the destination server and the port used by daemon. The actual DSN is defined in the other's DSN file.
The logical server name is used in the client's DSN file, the logical server name is specified with Ttc_server, and the DSN for the other is specified with TTC_SERVER_DSN.

Reference
    • TimesTen Operation Guide | Working with the TimesTen Client and Server | Configuring TimesTen Client and Server | Defining a logical server name
    • TimesTen Client Connection Failed with Error: (Doc ID 1571037.1)

TimesTen's logical server name concept

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.