timsten -ttBulkCp
I need to insert million of records from flat file,
ttBulkCp -i C:\TimesTen\Database\test.txt
what cmd i need to give ?
i am having the txt file in C:\TimesTen\Database\test.txt
i need to import into my_ttdb database which is placed at C:\TimesTen\Database\my_ttdb.ds0/my_ttdb.ds1/my_ttdb.inval
Thanks
Re: Bulk insert -ttBulkCp
发布: 2012-6-14 上午3:30
回复: 933663
the documentation is here:
http://docs.oracle.com/cd/E21901_01/doc/timesten.1122/e21643/util.htm#autoId7
Your command line would look something like this:
ttBulkCp -i DSN=my_ttdb your_table_name C:\TimesTen\Database\test.txt -xp 1000
With a million rows you want to break the insert down with commits say every 1000 rows with the -xp option
Re: Bulk insert -ttBulkCp
发布: 2012-6-14 上午4:15
回复: Tim Vincent
I am getting below error
My table name is test and i am having test.txt file in C:\TimesTen\Database\
Command> ttBulkCp -i DSN=my_ttdb test C:\TimesTen\Database\test.txt;
1001: Syntax error in SQL statement before or at: "TTBULKCP", character positio
n: 1
ttBulkCp -i DSN=my_ttdb test C:\TimesTen\Database\test.txt
^^^^^^^^
Thanks!
Re: Bulk insert -ttBulkCp
发布: 2012-6-14 上午4:42
回复: 933663
Hi 933663,
ttBulkCp - it is not a ttisql command, it is a utility. You should run it on OS level.
For example, run the following in command line (in Windows)
ttBulkCp -i DSN=my_ttdb test C:\TimesTen\Database\test.txt
Regards,
Gennady
Re: Bulk insert -ttBulkCp
发布: 2012-6-18 下午10:10
回复: Gennady Sigalaev
Hi,
I am not able to insert the data i am getting the below error
TimesTen error code = 6220
TimesTen error code = 802
I have created setup of dsn as per the below path
C:\TimesTen\tt1122_32\quickstart\html\admin\dsn_setup_windows.html
Command> connect "dsn=my_ttdb";
Connection successful: DSN=my_ttdb;UID=********;DataStore=C:\TimesTen\Database\my_ttdb;
DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;
DRIVER=C:\TimesTen\TT1122~1\bin\ttdv1122.dll;
LogDir=D:\TimesTen\Log;PermSize=40;TempSize=32;TypeMode=0;OracleNetServiceName=orcl_db;(Default setting AutoCommit=1)
Insertion
1st time
C:\>ttBulkCp -i DSN=my_ttdb mytable C:\TimesTen\Database\test2.txt
C:\TimesTen\Database\test2.txt:
100000 rows inserted
100000 rows total
2nd time
C:\>ttBulkCp -i DSN=my_ttdb mytable C:\TimesTen\Database\test2.txt
ttBulkCp: Error received in file C:\TimesTen\Database\test2.txt, line 97280 -- S1000: [TimesTen][TimesTen 11.2.2.2.0 ODBC Driver][TimesTen]TT0802: Database permanent space exhausted -- file "blk.c", lineno 3450, procedure "sbBlkAlloc" (TimesTen error code = 802).
ttBulkCp: Error received in file C:\TimesTen\Database\test2.txt, line 97280 -- S1000: [TimesTen][TimesTen 11.2.2.2.0 ODBC Driver][TimesTen]TT6220: Permanent data partition free space insufficient to allocate 42440 bytes of memory -- file "blk.c", lineno 3450, procedure "sbBlkAlloc" (TimesTen error code = 6220).
how to resolve it
Thanks!
Re: Bulk insert -ttBulkCp
发布: 2012-6-19 上午6:53
回复: 933663
Dear 933663,
You should increase the permanent partition size (PermSize attribute).
Best regards,
Gennady

