Timesten匯入資料到Cache Group
1.load cache group語句來匯入read only的cache group
使用者必須有CACHE_MANAGER或 LOAD CACHE GROUP的許可權
下面的語句會匯入cacheadm.ro cache group,HR.DEPARTMENTS有27條資料
Command> load cache group ro commit every 256 rows;
27 cache instances affected.
也可以用load cache group來匯入可update的cache group
Command> load cache group g_awt where employees.employee_id > 200 commit every 0 rows;
6 cache instances affected.
2.用select 語句匯入可update的cache group
用hr帳戶登入,查詢之前用load cache group匯入的6筆資料
Command> connect "dsn=ljg_tt1122;uid=hr;pwd=hr;orclepwd=hr";
Warning 01S00: Undefined connection attribute "orclepwd" in connection string
Connection successful: DSN=ljg_tt1122;UID=hr;DataStore=/home/timesten/TimesTen/tt1122/info/ljg;DatabaseCharacterSet=WE8MSWIN1252;ConnectionCharacterSet=US7ASCII;DRIVER=/home/timesten/TimesTen/tt1122/lib/libtten.so;LogDir=/home/timesten/TimesTen/tt1122/info/ljg/logs;PermSize=64;TempSize=32;TypeMode=0;OracleNetServiceName=orcl131;
(Default setting AutoCommit=1)
con1: Command> select employee_id, first_name from employees;
< 201, Michael >
< 202, Pat >
< 203, Susan >
< 204, Hermann >
< 205, Shelley >
< 206, William >
6 rows found.
用select匯入一筆資料
con4: Command> connect "dsn=ljg_tt1122;uid=hr;pwd=hr;oraclepwd=hr";
Connection successful: DSN=ljg_tt1122;UID=hr;DataStore=/home/timesten/TimesTen/tt1122/info/ljg;DatabaseCharacterSet=WE8MSWIN1252;ConnectionCharacterSet=US7ASCII;DRIVER=/home/timesten/TimesTen/tt1122/lib/libtten.so;LogDir=/home/timesten/TimesTen/tt1122/info/ljg/logs;PermSize=64;TempSize=32;TypeMode=0;OracleNetServiceName=orcl131;
(Default setting AutoCommit=1)
con5: Command> select first_name, last_name from employees where employee_id=100;
< Steven, King >
1 row found.
con5: Command>
con5: Command> select count(*) from employees;
< 7 >
1 row found.
如果匯入的子表的資料,則主表的資料會自動被匯入,job_history是employees的子表。
con5: Command> select employee_id, start_date, end_date from job_history where employee_id=200;
< 200, 1995-09-17 00:00:00, 2001-06-17 00:00:00 >
< 200, 2002-07-01 00:00:00, 2006-12-31 00:00:00 >
2 rows found.
con5: Command> select count(*) from employees;
< 8 >
1 row found.
最後把cachr group "g_awt"的資料全部導進來
con5: Command> connect "dsn=ljg_tt1122;uid=cacheadm;pwd=cacheadm;oraclepwd=cacheadm";
Connection successful: DSN=ljg_tt1122;UID=cacheadm;DataStore=/home/timesten/TimesTen/tt1122/info/ljg;DatabaseCharacterSet=WE8MSWIN1252;ConnectionCharacterSet=US7ASCII;DRIVER=/home/timesten/TimesTen/tt1122/lib/libtten.so;LogDir=/home/timesten/TimesTen/tt1122/info/ljg/logs;PermSize=64;TempSize=32;TypeMode=0;OracleNetServiceName=orcl131;
(Default setting AutoCommit=1)
con6: Command> load cache group g_awt commit every 256 rows;
99 cache instances affected.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271283/viewspace-1057743/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Timesten cache group aging 功能的實現
- SQLServer匯出匯入資料到MySQLServerMySql
- 使用mysqlimport匯入資料到mysqlMySqlImport
- TimesTen中配置只讀Cache Group to Oracle的基本步驟Oracle
- 匯入網頁資料到 Google Sheet網頁Go
- 從EXCEL匯入資料到SQL SERVERExcelSQLServer
- 使用sqlldr匯入文字資料到oracleSQLOracle
- [pb]從excel匯入資料到datawindowExcel
- Linux下TimesTen主備搭建、重建cache group、重建備機操作[TimesTen運維]Linux運維
- Oracle與TimesTen記憶體資料庫Cache Group同步效率與TimesTen主備資料同步機制研究Oracle記憶體資料庫
- Python批量匯入Excel資料到MySQLPythonExcelMySql
- 使用load data匯入資料到mysqlMySql
- 採用importtsv匯入外部資料到hbase中ImportTTS
- 利用Excel匯入資料到SAP C4CExcel
- 匯入表的部分資料到測試環境
- 資料庫SQL Server DAC 匯入匯出資料到SQL Azure問題資料庫SQLServer
- Timesten新增Cache Groups到 Cache DatabaseDatabase
- Oracle imp 匯入資料到另一個表空間Oracle
- spark sql與mysql 資料載入與匯出資料到mysqlSparkMySql
- 利用NPOI匯出資料到Execl
- 使用Excel匯入資料到SAP Cloud for Customer系統ExcelCloud
- Java 匯入資料到Excel並提供檔案下載介面JavaExcel
- Timesten cache database的準備Database
- Sqoop匯出ClickHouse資料到HiveOOPHive
- PHP匯出大量資料到excel表格PHPExcel
- Vue匯出資料到Excel電子表格VueExcel
- 【Mysql】匯出資料到excel檔案中MySqlExcel
- 從CSV檔案匯入資料到Analytics Cloud裡建立模型和StoryCloud模型
- oracle技術_使用exp/imp 匯入11g資料到9iOracle
- 如何從網頁中匯入外部資料到Excel2003網頁Excel
- SSIS中匯入Excel資料到資料庫的一個常見小問題Excel資料庫
- 使用Logstash工具匯入sqlserver資料到elasticSearch及elk分散式日誌中心SQLServerElasticsearch分散式
- 利用跳板機連線mysql,匯出資料到csvMySql
- waterdrop匯出hdfs資料到clickhouse(text,csv,json)JSON
- C#快速匯出百萬級資料到Excel方法C#Excel
- SQL通過bcp匯出資料到excel檔案SQLExcel
- 用Perl從oracle匯出百萬級資料到excelOracleExcel
- Oracle_TimesTen_and_In-Memory_Database_Cache_11g_Ed_1OracleDatabase