1.Timesten端Oracle数据库服务定义配置
[timesten@XAG8 conf]$ cd $TIMESTEN_HOME/network/admin
[timesten@XAG8 admin]$ pwd
/u01/timesten/tt181/network/admin
[timesten@XAG8 admin]$ cat tnsnames.ora
PDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.40.182)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PDB1)
)
)
[timesten@XAG8 admin]$ sqlplus sys/123456@PDB1 as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Feb 25 16:37:11 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
- Oracle端创建ttuser用户(与Timesten中同名)
[timesten@XAG8 admin]$ sqlplus sys/123456@PDB1 as sysdba
SQL> create user ttuser identified by oracle;
SQL> grant create session,resource,create view to ttuser;
SQL> connect ttuser/oracle@PDB1
Connected.
- 配置字符集(两边一致)
[timesten@XAG8 admin]$ sqlplus sys/123456@PDB1 as sysdba
SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
VALUE
--------------------------------------------------------------------------------
AL32UTF8
[timesten@XAG8 admin]$ cd $TIMESTEN_HOME/conf
[timesten@XAG8 conf]$ pwd
/u01/timesten/tt181/conf
[timesten@XAG8 conf]$ sed -n '/\[TTDB\]/,/^$/p' sys.odbc.ini
[TTDB]
Driver=/u01/timesten/tt181/install/lib/libtten.so
DataStore=/u01/timesten/data/ttdb
LogDir=/u01/timesten/log
PermSize=128
TempSize=32
LogBufMB=64
LogBufParallelism=4
DatabaseCharacterSet=AL32UTF8
ConnectionCharacterSet=AL32UTF8
PLSQL=1
OracleNetServiceName=PDB1
- Tiemsten端创建 ttuser 用户
[timesten@XAG8 conf]$ ttisql -v1 ttdb
Command> create user ttuser identified by timesten;
Command> grant create session,create table,create view,create sequence to ttuser;
Command> disconnect;
Command> connect "DSN = ttdb; uid = ttuser;pwd = timesten";
Command> exit
- 连通性连接测试1
[timesten@XAG8 conf]$ ttisql "DSN=ttdb; uid = ttuser;pwd = timesten;oraclenetservicename=PDB1;oraclepwd=oracle";
Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
connect "DSN=ttdb;uid=ttuser;pwd=********;oraclenetservicename=PDB1;oraclepwd=********";
Command> call ttversion;
< 18, 1, 3, 2, 0 >
1 row found.
Command> passthrough 3;
Passthrough command has set autocommit off.
Command> select * from v$version;
< Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production, 0 >
< PL/SQL Release 12.2.0.1.0 - Production, 0 >
< CORE 12.2.0.1.0 Production, 0 >
< TNS for Linux: Version 12.2.0.1.0 - Production, 0 >
< NLSRTL Version 12.2.0.1.0 - Production, 0 >
5 rows found.
Command> exit
Rolling back active transaction...
Disconnecting...
Done.
- 连通性连接测试2
[timesten@XAG8 conf]$ ttisql -connstr "dsn=ttdb; uid = ttuser;pwd = timesten; oraclepwd=oracle" -e 'set prompt "TTUSER>"'
TTUSER>call ttversion;
< 18, 1, 3, 2, 0 >
1 row found.
TTUSER>passthrough 3;
Passthrough command has set autocommit off.
TTUSER>select * from v$version;
< Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production, 0 >
< PL/SQL Release 12.2.0.1.0 - Production, 0 >
< CORE 12.2.0.1.0 Production, 0 >
< TNS for Linux: Version 12.2.0.1.0 - Production, 0 >
< NLSRTL Version 12.2.0.1.0 - Production, 0 >
5 rows found.