标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,716)
- DB2 (22)
- MySQL (74)
- Oracle (1,576)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (160)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (68)
- Oracle Bug (8)
- Oracle RAC (54)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (575)
- Oracle安装升级 (94)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (81)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (28)
- SQL Server恢复 (9)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- 不当使用_allow_resetlogs_corruption参数引起ORA-600 2662错误
- CSSD signal 11 in thread clssnmRcfgMgrThread故障处理
- 使用sid方式直接访问pdb(USE_SID_AS_SERVICE_LISTENER)
- ORA-00069: cannot acquire lock — table locks disabled for xxxx
- ORA-600 [4000] [a]相关bug
- sql server数据库“正在恢复”故障处理
- 如何判断数据文件是否处于begin backup状态
- CDM备份缺少归档打开数据库报ORA-600 kcbzib_kcrsds_1故障处理
- ORA-07445: exception encountered: core dump [expgod()+43] [IN_PAGE_ERROR]
- 2025年第一起ORA-600 16703故障恢复
- _gc_undo_affinity=FALSE触发ORA-01558
- public授权语句
- 中文环境显示AR8MSWIN1256(阿拉伯语字符集)
- 处理 Oracle 块损坏
- Oracle各种类型坏块说明和处理
- fio测试io,导致磁盘文件系统损坏故障恢复
- ORA-742 写丢失常见bug记录
- Oracle 19c 202501补丁(RUs+OJVM)-19.26
- 避免 19c 数据库性能问题需要考虑的事项 (Doc ID 3050476.1)
- Bug 21915719 Database hang or may fail to OPEN in 12c IBM AIX or HPUX Itanium – ORA-742, DEADLOCK or ORA-600 [kcrfrgv_nextlwn_scn] ORA-600 [krr_process_read_error_2]
分类目录归档:TimesTen
TimesTen c/s模式配置
一、linux/unix环境配置
1.相关IP配置
客户端:192.168.1.105
服务端:192.168.1.10
2.服务端ODBC配置
$ more sys.odbc.ini [ODBC Data Sources] TT_1122=TimesTen 11.2.2 Driver [TT_1122] Driver=/u01/TimesTen/tt1122/lib/libtten.so DataStore=/u01/TimesTen/tt1122/info/TT_1122 DatabaseCharacterSet=ZHS16GBK PermSize=64 OracleNetServiceName=XFF
3.服务端timesten监听端口
$ ttstatus|grep "TimesTen server" TimesTen server pid 3792 started on port 53393
4.客户端配置
$ more sys.ttconnect.ini [tt_xifenfei_c_s] Network_Address=192.168.1.10 TCP_PORT=53393 $ more sys.odbc.ini [ODBC Data Sources] tt_xifenfei_c=TimesTen 11.2.2 Client Driver [tt_xifenfei_c] TTC_SERVER=tt_xifenfei_c_s TTC_SERVER_DSN=tt_1122 UID=chf PWD=xifenfei
参考:在另一节点配置TT客户端的简明方法
二、win环境配置
1.在odbc中选择增加timesten client
2.点击services,增加ip和端口配置
3.配置关闭services,配置其他选项
三、补充说明
这里的配置,基本上都是最基础配置,在实际生产环境中,需要考虑其他相关环境变量
Multiple-table cache group配置
1.准备测试表和数据
SQL> CREATE TABLE customer 2 (cust_num NUMBER(6) NOT NULL PRIMARY KEY, 3 name VARCHAR2(50) 4 ); Table created. SQL> CREATE TABLE orders 2 (ord_num NUMBER(10) NOT NULL PRIMARY KEY, 3 cust_num NUMBER(6) NOT NULL 4 ); Table created. SQL> insert into customer values(1,'wwww.xifenfei.com1'); 1 row created. SQL> insert into customer values(2,'wwww.xifenfei.com2'); 1 row created. SQL> insert into customer values(3,'wwww.xifenfei.com3'); 1 row created. SQL> insert into customer values(4,'wwww.xifenfei.com4'); 1 row created. SQL> insert into orders(cust_num,ord_num) values(1,1); 1 row created. SQL> insert into orders (cust_num,ord_num) values(1,2); 1 row created. SQL> insert into orders (cust_num,ord_num) values(3,5); 1 row created. SQL> insert into orders (cust_num,ord_num) values(3,6); 1 row created. SQL> commit; Commit complete. SQL> select * from customer; CUST_NUM NAME ---------- -------------------------------------------------- 1 wwww.xifenfei.com1 2 wwww.xifenfei.com2 3 wwww.xifenfei.com3 4 wwww.xifenfei.com4 SQL> select * from orders; ORD_NUM CUST_NUM ---------- ---------- 1 1 2 1 5 3 6 3 SQL> grant select on oratt.customer to cacheuser; Grant succeeded. SQL> grant select on oratt.orders to cacheuser; Grant succeeded.
2.创建cache group
[oracle@xifenfei ~]$ ttIsql "DSN=tt_1122;UID=cacheuser;PWD=timesten;OraclePWD=oracle" Command> drop cache group cacheuser.customer_orders; Command> CREATE READONLY CACHE GROUP customer_orders > AUTOREFRESH INTERVAL 5 SECONDS > STATE ON > FROM oratt.customer > (cust_num NUMBER(6) NOT NULL, > name VARCHAR2(50), > PRIMARY KEY(cust_num)), > oratt.orders > (ord_num NUMBER(10) NOT NULL, > cust_num NUMBER(6) NOT NULL, > PRIMARY KEY(ord_num), > FOREIGN KEY(cust_num) REFERENCES oratt.customer(cust_num)); Command> cachegroups; Cache Group CACHEUSER.CUSTOMER_ORDERS: Cache Group Type: Read Only Autorefresh: Yes Autorefresh Mode: Incremental Autorefresh State: On Autorefresh Interval: 5 Seconds Autorefresh Status: ok Aging: No aging defined Root Table: ORATT.CUSTOMER Table Type: Read Only Child Table: ORATT.ORDERS Table Type: Read Only 1 cache groups found.
3.TT中表访问授权
[oracle@xifenfei ~]$ ttisql tt_1122 Command> grant select on oratt.customer to cacheuser; Command> grant select on oratt.orders to cacheuser;
4.测试数据初始化
[oracle@xifenfei ~]$ ttIsql "DSN=tt_1122;UID=cacheuser;PWD=timesten;OraclePWD=oracle" Command> select * from oratt.customer; < 1, wwww.xifenfei.com1 > < 2, wwww.xifenfei.com2 > < 3, wwww.xifenfei.com3 > < 4, wwww.xifenfei.com4 > 4 rows found. Command> select * from oratt.orders; < 1, 1 > < 2, 1 > < 5, 3 > < 6, 3 > 4 rows found.
5.ORACLE修改数据
SQL> update customer set name='xifenfei' where cust_num=2; 1 row updated. SQL> insert into customer values(5,'wwww.xifenfei.com5'); 1 row created. SQL> delete from customer where cust_num=1; 1 row deleted. SQL> commit; Commit complete.
6.TT中验证数据
Command> select * from oratt.customer; < 2, xifenfei > < 3, wwww.xifenfei.com3 > < 4, wwww.xifenfei.com4 > < 5, wwww.xifenfei.com5 > 4 rows found. Command> select * from oratt.orders; < 5, 3 > < 6, 3 > 2 rows found.
7.补充说明
7.1)在oracle中需要授权cacheuser有访问oratt中相关表权限,不然创建cache group失败
7.2)自动刷新数据需要设置AUTOREFRESH STATE ON,其他方法初始化关联表的数据暂未知
7.3)在TT中,关联表删除是级联的
发表在 TimesTen
评论关闭
Configuring an active standby pair with one subscriber
Step 1: Create the DSNs for the master and the subscriber databases
[master1] DRIVER=/u01/TimesTen/tt1122/lib/libtten.so DataStore=/u01/TimesTen/replicate//master1 DatabaseCharacterSet=ZHS16GBK ConnectionCharacterSet=ZHS16GBK PermSize=64 [master2] DRIVER=/u01/TimesTen/tt1122/lib/libtten.so DataStore=/u01/TimesTen/replicate//master2 DatabaseCharacterSet=ZHS16GBK ConnectionCharacterSet=ZHS16GBK PermSize=64 [subscriber1] DRIVER=/u01/TimesTen/tt1122/lib/libtten.so DataStore=/u01/TimesTen/replicate/subscriber1 DatabaseCharacterSet=ZHS16GBK ConnectionCharacterSet=ZHS16GBK PermSize=64
Step 2: Create a table in one of the master databases
[oracle@xifenfei info]$ ttIsql master1 Copyright (c) 1996-2011, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=master1"; Connection successful: DSN=master1;UID=oracle;DataStore=/u01/TimesTen/replicate//master1;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/u01/TimesTen/tt1122/lib/libtten.so;PermSize=64;TypeMode=0; (Default setting AutoCommit=1) Command> CREATE TABLE tab (a NUMBER NOT NULL, > b CHAR(18), > PRIMARY KEY (a));
Step 3: Define the active standby pair
Command> CREATE ACTIVE STANDBY PAIR master1, master2 > SUBSCRIBER subscriber1;
Step 4: Start the replication agent on a master database
Command> CALL ttRepStart;
Step 5: Set the state of a master database to ‘ACTIVE’
Command> CALL ttRepStateSet('ACTIVE');
Step 6. Create a user on the active database
Command> CREATE USER terry IDENTIFIED BY terry; User created. Command> GRANT admin TO terry;
Step 7: Duplicate the active database to the standby database
[oracle@xifenfei info]$ ttRepAdmin -duplicate -from master1 -host xifenfei -uid terry -pwd terry "dsn=master2"
Step 8: Start the replication agent on the standby database
[oracle@xifenfei info]$ ttIsql master2 Copyright (c) 1996-2011, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=master2"; Connection successful: DSN=master2;UID=oracle;DataStore=/u01/TimesTen/replicate//master2;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/u01/TimesTen/tt1122/lib/libtten.so;PermSize=64;TypeMode=0; (Default setting AutoCommit=1) Command> CALL ttRepStart;
Step 9. Duplicate the standby database to the subscriber
[oracle@xifenfei info]$ ttRepAdmin -duplicate -from master2 -host xifenfei -uid terry -pwd terry "dsn=subscriber1"
Step 10: Start the replication agent on the subscriber
[oracle@xifenfei info]$ ttIsql subscriber1 Copyright (c) 1996-2011, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=subscriber1"; Connection successful: DSN=subscriber1;UID=oracle;DataStore=/u01/TimesTen/replicate/subscriber1;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/u01/TimesTen/tt1122/lib/libtten.so;PermSize=64;TypeMode=0; (Default setting AutoCommit=1) Command> CALL ttRepStart;
Step 11: Insert data into the table on the active database
[oracle@xifenfei info]$ ttIsql master1 Copyright (c) 1996-2011, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=master1"; Connection successful: DSN=master1;UID=oracle;DataStore=/u01/TimesTen/replicate//master1;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/u01/TimesTen/tt1122/lib/libtten.so;PermSize=64;TypeMode=0; (Default setting AutoCommit=1) Command> INSERT INTO tab VALUES (1,'Hello'); 1 row inserted. Command> commit;
Setp 12:Verify that the insert is replicated to master2 and subscriber1
[oracle@xifenfei info]$ ttIsql master2 Copyright (c) 1996-2011, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=master2"; Connection successful: DSN=master2;UID=oracle;DataStore=/u01/TimesTen/replicate//master2;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/u01/TimesTen/tt1122/lib/libtten.so;PermSize=64;TypeMode=0; (Default setting AutoCommit=1) Command> select * from tab; < 1, Hello > 1 row found. Command> exit Disconnecting... Done. [oracle@xifenfei info]$ ttIsql subscriber1 Copyright (c) 1996-2011, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=subscriber1"; Connection successful: DSN=subscriber1;UID=oracle;DataStore=/u01/TimesTen/replicate/subscriber1;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/u01/TimesTen/tt1122/lib/libtten.so;PermSize=64;TypeMode=0; (Default setting AutoCommit=1) Command> select * from tab; < 1, Hello > 1 row found.