[OracleTimesTen] Use ttisql to map tables from oracle to timesten

Source: Internet
Author: User
I think timesten is a bit more powerful. You can directly load the entire table to the timesten cache database through ttisql. The following is an example. 1. Create a table "test" in oracle ".

I think timesten is a bit more powerful. You can directly load the entire table to the timesten cache database through ttisql. The following is an example. 1. Create a table "test" in oracle ".

I think timesten is a bit more powerful. You can directly load the entire table to the timesten cache database through ttisql. The following is an example of the Hong Kong Space.

1. Create a table "test" in oracle ".

Create table "LION ". "TEST" ("ID" number primary key not null, "NAME" varchar2 (20 byte), "NOTE" varchar2 (20 byte ), "MARK" varchar2 (20 byte ));

2. Insert 500000 data entries in this table.

3. Map To timesten.

(1) connection timesten:

C: \ Users \ lion> ttisql "DSN = mytt; UID = lion; PWD =; OraclePWD = orcl"; Copyright (c) 1996-2011, Oracle. all rights reserved. type? Or "help" for help, type "exit" to quit ttIsql. connect "DSN = mytt; UID = lion; PWD =; OraclePWD = orcl;"; Connection successful: DSN = mytt; UID = lion; DataStore = D: \ oracle \ timesten \ odbc; DatabaseCharacterSet = ZHS16GBK; ConnectionCharacterSet = ZHS16GBK; Temporary = 1; DRIVER = D: \ oracle \ timesten \ bin \ ttdv1_2.dll; LogDir = D: \ oracle \ timesten \ log; TypeMode = 0; PLSCOPE_SETTINGS = IDENTIFIERS: NONE; DDLReplicationLevel = 1; (Default setting AutoCommit = 1)

(2) Use the createandloadfromoraquery command of the ttisql statement to load the root. test Table in oracle.

Command> createandloadfromoraquery test 2 select * from root. test;

(3) wait a few seconds to prompt that the loading is successful:

Command> createandloadfromoraquery test 2 select * from root. test; Mapping query to this table: create table "LION ". "TEST" ("ID" number not null, "NAME" varchar2 (20 byte), "NOTE" varchar2 (20 byte), "MARK" varchar2 (20 byte )) table test created500000 rows loaded from oracle.

Note: If the message "success" is not displayed on the Hong Kong server, but the following message is displayed, refer to my other blog: "Exception Handling".

Command> createandloadfromoraquery test 2 select * from root. test; Mapping query to this table: create table "LION ". "TEST" ("ID" number not null, "NAME" varchar2 (20 byte), "NOTE" varchar2 (20 byte), "MARK" varchar2 (20 byte )) table test created 802: Database permanent space exhausted 6220: Permanent data partition free space insufficient to allocate 33296 bytesof memoryThe command failed.

(4) use ttisql to query the test table data imported to timesten:

Command> select count (*) from test; <500000> 1 row found. command> select * from test where id <20; <1, Haha, I am a description, I am an introduction> <3, Haha, I am a description, I am an introduction> <5, haha, I am the description, I am the introduction> <6, Haha, I am the description, I am the introduction> <8, Haha, I am the description, I am the introduction> <10, haha, I am the description, I am the introduction> <12, Haha, I am the description, I am the introduction> <14, Haha, I am the description, I am the introduction> <15, haha, I am the description, I am the introduction> <17, Haha, I am the description, I am the introduction> <19, Haha, I am the description, I am the introduction> <0, haha, I am the description, I am the introduction> <2, Haha, I am the description, I am the introduction> <4, Haha, I am the description, I am the introduction> <7, haha, I am the description, I am the introduction> <9, Haha, I am the description, I am the introduction> <11, Haha, I am the description, I am the introduction> <13, haha, I am the description, I am the introduction> <16, Haha, I am the description, I am the introduction> <18, Haha, I am the description, I am the introduction> 20 rows found.

(5) use java to call timesten to query the imported test table (if you are interested in viewing the source code, Hong Kong server, you can refer to my other blog: Java connection Times Ten)


This article is from the "java path" blog. Please keep this source

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.