Step by Step TimesTen --- ttIsql
ttIsql是TimesTen的一個互動工具,相當於oracle的sqlplus.
ttIsql有兩種模式,一種是命令列互動,一種是批處理模式。
a. 命令列模式
1, 連線DataStore
$ ttisql -connStr fxdsn
Copyright (c) 1996-2007, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
connect "fxdsn";
Connection successful: DSN=fxdsn;UID=times;DataStore=/ora/TimesTen/datastore/fxdsn;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;PermSize=8;TempSize=8;TypeMode=0;
(Default setting AutoCommit=1)
Command>
2,察看資料庫中有哪些表
Command> select TBLNAME,TBLOWNER from sys.tables;
< TABLES , SYS >
< COLUMNS , SYS >
< INDEXES , SYS >
< TBL_STATS , SYS >
< COL_STATS , SYS >
< PLAN , SYS >
< MONITOR , SYS >
< CACHE_GROUP , SYS >
< TRANSACTION_LOG_API , SYS >
< VIEWS , SYS >
< SEQUENCES , SYS >
< TTABLES , SYS >
< TINDEXES , SYS >
< TTBL_STATS , SYS >
< TCOL_STATS , SYS >
< DUAL , SYS >
< TABLE_HISTORY , SYS >
< COLUMN_HISTORY , SYS >
< SYNONYMS , SYS >
< SYS_ACC_RIGHT , SYS >
< OBJ_ACC_RIGHT , SYS >
< USERS , SYS >
< REPELEMENTS , TTREP >
< REPLICATIONS , TTREP >
< REPPEERS , TTREP >
< REPSTORES , TTREP >
< REPSUBSCRIPTIONS , TTREP >
< REPTABLES , TTREP >
< TTSTORES , TTREP >
< REPNETWORK , TTREP >
< XLASUBSCRIPTIONS , SYS >
< TEST , TIMES >
32 rows found.
3,檢視錶結構
Command> desc test;
Table TIMES.TEST:
Columns:
A NUMBER (38)
1 table found.
(primary key columns are indicated with *)
4, 執行SQL語句
Command> select * from test;
0 rows found.
Command> insert into test values(1);
1 row inserted.
Command> insert into test values(2);
1 row inserted.
Command> select * from test;
< 1 >
< 2 >
2 rows found.
5,執行一個SQL檔案
Command> run test.sql
insert into test values(3);
1 row inserted.
insert into test values(4);
1 row inserted.
b. 批處理模式
$ ttisql -f test.sql fxdsn
Copyright (c) 1996-2007, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
connect "DSN=fxdsn";
Connection successful: DSN=fxdsn;UID=times;DataStore=/ora/TimesTen/datastore/fxdsn;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;PermSize=8;TempSize=8;TypeMode=0;
(Default setting AutoCommit=1)
run "test.sql";
insert into test values(3);
1 row inserted.
insert into test values(4);
1 row inserted.
exit;
Disconnecting...
Done.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81/viewspace-205093/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- React Step by StepReact
- Command 模式 Step by Step模式
- Shell Step by Step (4) —— Cron & Echo
- Promise的實現(step by step)Promise
- Step by Step Data Replication Using Oracle GoldenGateOracleGo
- TIDB DM資料同步step by stepTiDB
- Step by Step 安裝 BizTalk Server 2009Server
- 單步除錯 step into/step out/step over 區別詳解除錯
- ABP應用開發(Step by Step)-下篇
- ABP應用開發(Step by Step)-上篇
- 實時 Linux 抖動分析 Step by stepLinux
- Linkerd 2.10(Step by Step)—多叢集通訊
- Sql Server Linux(Redhat) Distributed Availability Group Setup — step by stepSQLServerLinuxRedhatAI
- 10GR2下建立物理standby STEP BY STEP
- Step-by-step,打造屬於自己的vue ssrVue
- Adaboost Algorithm StepGo
- 深度學習之step by step搭建神經網路深度學習神經網路
- Linkerd 2.10(Step by Step)—使用 Kustomize 自定義 Linkerd 的配置
- Linkerd 2.10(Step by Step)—設定服務配置檔案
- Linkerd 2.10(Step by Step)—4. 如何配置外部 Prometheus 例項Prometheus
- 使用Eclipse 安裝 構建Maven專案 (step-by-step)EclipseMaven
- HTML step 屬性HTML
- 【Step-By-Step】高頻面試題深入解析 / 週刊06面試題
- 【Step-By-Step】高頻面試題深入解析 / 週刊07面試題
- 【Step-By-Step】高頻面試題深入解析 / 週刊04面試題
- 【Step-By-Step】高頻面試題深入解析 / 週刊05面試題
- 【Step-By-Step】高頻面試題深入解析 / 週刊03面試題
- 【Step-By-Step】高頻面試題深入解析 / 週刊01面試題
- 【Step-By-Step】高頻面試題深入解析 / 週刊02面試題
- 阿里雲數倉Dataworks資料匯出到檔案step by step阿里
- Linkerd 2.10(Step by Step)—將 GitOps 與 Linkerd 和 Argo CD 結合使用GitGo
- Linkerd 2.10(Step by Step)—1. 將您的服務新增到 Linkerd
- step1 補充
- 2.4.8 Step 7: 建立spfile
- [完結] Learn Vue 2: Step By Step [Laracasts 免費視訊中文語音]VueAST
- [完結] Learn Vue 2: Step By Step [Laracasts 免費影片中文語音]VueAST
- Linkerd 2.10(Step by Step)—2. 自動化的金絲雀釋出
- Vue.js SSR Step by Step (2) – 一個簡單的同構DEMOVue.js
- 機器學習之step by step實戰及知識積累筆記機器學習筆記