Registering the server definitions for a Teradata data source
You must register each Teradata server that you want to access in the federated database.
Procedure
- Locate the hosts file.
- On federated servers that run AIX®, the hosts file is located in the /etc/hosts directory.
- On federated servers that run Windows, the hosts file is located in the %WINDIR%\system32\drivers\etc\hosts directory.
- Locate the server name of your Teradata node entry in the hosts file.
The server name is listed along with a suffix in the hosts file:
dbcnameCOPn.You specify the server name
Use the following syntax of a Teradata node entry to locate the server namedbcnameas thenode_namevariable of the CREATE SERVER statement.dbcname:- Syntax
a.b.c.d host_name dbcnameCOPn aliasnameCOPn- Parameters
a.b.c.d- The IP address of Teradata Server.
host_name- Optional. The host name of Teradata server.
dbcnameCOPn- The server name and number of the application processor in a Teradata
Communication Processor (COP) group. In systems that includes multiple
Teradata servers and a single database instance, the servers are referred
to as a COP group. Each server in a COP group is assigned a unique
sequential number, starting at 1. For example, if only one Teradata
server exists, the server name and number of the application processor
is
dbcnameCOP1.dbcname- The name of your Teradata server. The name is not longer than
eight characters. For servers in a COP group, the servers have the
same
dbcnameand sequentialCOPnvalues. n- The number of the application processor.
alias_nameCOPn- Optional. The alternate name for
dbcnameand number of the application processor in a COP group. The number of the application processor is the same number that exists for the server namedbcnameCOPn.
- Example
- In this sample hosts file,
nodexyzis the server name and must be specified as thenode_namevariable of the CREATE SERVER statement:127.0.0.1 localhost 9.22.5.77 nodexyz nodexyzCOP1 # teradata server 9.66.111.133 rtplib05.data.xxx.com aap 9.66.111.161 rtpscm11.data.xxx.com aaprwrt 9.66.111.161 rtpscm11.data.xxx.com accessm
- To create the server, ssue the CREATE SERVER statement
from the command line. For example:
CREATE SERVER server_definition_name TYPE TERADATA VERSION version_number WRAPPER wrapper_name OPTIONS (NODE 'node_name');Although the
node_namevariable is specified as an option in the CREATE SERVER statement, this option is required for Teradata data sources.