Oracle Database Operations
Use ttGridAdmin
commands in this section to import or export sqlnet.ora
configuration or TNS names entries for connecting to an Oracle database.
These are Oracle Database features that allow an application in TimesTen Scaleout to interact with an Oracle database using the ttLoadFromOracle
utility, OCI, or Pro*C/C++.
Notes
-
Do not use these commands for OCI or Pro*C/C++ connections to a TimesTen Scaleout database. Entries for
tnsnames
andsqlnet
are made automatically by TimesTen Scaleout. -
The
ttLoadFromOracle
built-in procedure is for loading data from an Oracle database into TimesTen Classic or TimesTen Scaleout. -
For a summary of TNS names and
sqlnet.ora
, see Connecting to a TimesTen Database From OCI in Oracle TimesTen In-Memory Database Scaleout User's Guide.
Export a sqlnet file (SQLNetExport)
That SQLNetExport
command exports sqlnet.ora
configuration (that had previously been imported) from the specified version of the model, typically to a specified file.
ttGridAdmin SQLNetExport [-latest|-current|-version n] [filepath]
Options
The SQLNetExport
command has the options:
Option | Description |
---|---|
|
Export |
|
Export |
|
Export |
|
Path and name of the file that will contain the exported |
Examples
This example exports sqlnet.ora
from the latest version of the model (by default) then shows the contents of the file.
% ttGridAdmin SQLNetExport /sw/tten/grid/misc/sqlnet.ora % cd /sw/tten/grid/misc % more sqlnet.ora # To use ezconnect syntax or tnsnames, the following entries must be # included in the sqlnet.ora configuration. # NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Import a Sqlnet File (SQLNetImport)
The SQLNetImport
command imports sqlnet.ora
configuration (used in communicating with an Oracle database through ttLoadFromOracle
, OCI, Pro*C/C++, or ODP.NET) from the specified file into the sqlnet.ora
file for the latest version of the model. This will be in place of any previously existing sqlnet.ora
configuration.
ttGridAdmin SQLNetImport filepath
Note:
Any previous import is overwritten.
Option
The SQLNetImport
command has the option:
Option | Description |
---|---|
|
Path and name of the file containing |
Examples
% ttGridAdmin SQLNetImport /tmp/sqlnet.ora SQLNet configuration file /tmp/sqlnet.ora imported
Notes
-
This is the only way to bring
sqlnet.ora
configuration into the grid. Do not manually add or manipulate configuration files. -
The resulting
sqlnet.ora
file will be made available across all instances of the grid when you runmodelApply
.
Export TNS Names (TNSNamesExport)
The TNSNamesExport
command exports TNS names entries (that had previously been imported) from the specified version of the model, typically to a specified file.
ttGridAdmin TNSNamesExport [-latest|-current|-version n] [filepath]
Options
The TNSNamesExport
command has the options:
Option | Description |
---|---|
|
Export TNS names entries from the latest model—the model being modified and not yet applied to the grid. This is the default. |
|
Export TNS names entries from the current model—the model most recently applied to the grid. |
|
Export TNS names entries from the specified version number of the model. |
|
Path and name of the file that will contain the exported TNS names entries. If no file is specified, the export goes to |
Examples
This example exports tnsnames.ora
from the latest version of the model (by default), then shows the contents of the file.
% ttGridAdmin TNSNamesExport /sw/tten/grid/misc/tnsnames.ora % cd /sw/tten/grid/misc % more tnsnames.ora ... ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = www.example.com)(PORT=1630)) (CONNECT_DATA = (SERVICE_NAME = orcl) ) ) ...
Import TNS Names (TNSNamesImport)
The TNSNamesImport
command imports TNS names entries (used in communicating with an Oracle database through ttLoadFromOracle
, OCI, Pro*C/C++, or ODP.NET) from the specified file into the tnsnames.ora
file for the latest version of the model. This will replace any previously imported TNS names entries.
ttGridAdmin TNSNamesImport filepath
Options
The TNSNamesImport
command has the option:
Option | Description |
---|---|
|
Path and name of the file containing TNS entries to import. |
Examples
% ttGridAdmin TNSNamesImport /tmp/tnsnames.ora TNSNames configuration file /tmp/tnsnames.ora imported
Notes
-
This is the only way to bring TNS names configuration into the grid. Do not manually add or manipulate configuration files.
-
The resulting
tnsnames.ora
file will be made available across all instances of the grid when you runmodelApply
. -
The
tnsnames.ora
file in the grid always contains entries for all connectables. You can add to that throughTNSNamesImport
, but you cannot remove entries other than any you have previously imported.