How to use the LOB data type?
I can't create a table with the LOB data type.
Do I need an additional parameter in sys.odbc.ini?
My dsn information is
[tpch]
Driver=/home/TimesTen/TimesTen/tt1121/lib/libtten.so
Data store = / home/timesten/TimesTen/tt1121/tpch/tpch
LogDir = / home/timesten/TimesTen/tt1121/tpch/logs
PermSize = 4096
TempSize = 2048
PLSQL = 1
LOB = 1
DatabaseCharacterSet = US7ASCII
-bash-4, $ 1 ttdaemonadmin-version
TimesTen Release 11.2.1.2.0
There is no LOB = 1 attribute; Please, delete it from your definition ODBC to avoid potential errors.
LOB support has been added in the major version 11.2.2 TimesTen. So you use 11.2.1 LOB is not available. If you want to use LOB data, then you must upgrade to 11.2.2.
Chris
Tags: Database
Similar Questions
-
How to extract data using the xml data type
Hello
I tried the following example using the xml data type, but not the desired output.
could you please correct the query in order to obtain the necessary
CREATE TABLE TEST.EMP_DETAIL ( EMPNO NUMBER, ENAME VARCHAR2(32 BYTE), EMPDETAILS SYS.XMLTYPE )
I need to get the record for Empid = '2'Insert into EMP_DETAIL (EMPNO, ENAME, EMPDETAILS) Values (7, 'Martin', XMLTYPE('<Dept> <Emp Empid="1"> <EmpName>Kevin</EmpName> <Empno>50</Empno> <DOJ>20092008</DOJ> <Grade>E3</Grade> <Sal>3000</Sal> </Emp> <Emp Empid="2"> <EmpName>Coster</EmpName> <Empno>60</Empno> <DOJ>01092008</DOJ> <Grade>E1</Grade> <Sal>1000</Sal> </Emp> <Emp Empid="3"> <EmpName>Samuel</EmpName> <Empno>70</Empno> <DOJ>10052008</DOJ> <Grade>E2</Grade> <Sal>2530</Sal> </Emp> <Emp Empid="4"> <EmpName>Dev</EmpName> <Empno>80</Empno> <DOJ>10032007</DOJ> <Grade>E2</Grade> <Sal>1200</Sal> </Emp> </Dept> '));
Then tried the following query with no expected o/p
Thank you...SELECT a.empno,a.ename,a.empdetails.extract('//Dept/Emp/EmpName/text()').getStringVal() AS "EmpNAME", a.empdetails.extract('//Dept/Emp/Empno/text()').getStringVal() AS "EMPNumber", a.empdetails.extract('//Dept/Emp/DOJ/text()').getStringVal() AS "DOJ", a.empdetails.extract('//Dept/Emp/Grade/text()').getStringVal() AS "Grade", a.empdetails.extract('//Dept/Emp/Sal/text()').getStringVal() AS "Salary", a.empdetails.extract('//Dept/Emp[@Empid="2"]').getStringVal() AS "ID", a.empdetails.extract('//Dept/Emp[EmpName="Coster"]').getStringVal() AS "CHK" FROM emp_detail a where empno=7 AND a.empdetails.existsNode('//Dept/Emp[@Empid="2"]') =1
Karthick_Arp wrote:
I'm not very good at that... But if your XML code should not be more like thisSQL> Insert into EMP_DETAIL 2 (EMPNO, ENAME, EMPDETAILS) 3 Values 4 (7, 'Martin', XMLTYPE('
5 6 .. cut ..1 7Kevin 850 920092008 10E3 113000 12Why? It is perfectly valid to data as attributes rather than elements and also quite common for key values.
-
Y at - it a paper on how to use the map data the lookup value?
I'm looking for a documentation where I could find information about the game of card data and how to use the map data configured according to look.
Any help is very appreciated.
I found a few threads on data cards:
http://topliners.Eloqua.com/docs/doc-2434
http://topliners.Eloqua.com/docs/doc-2817
http://topliners.Eloqua.com/message/14058#14058
Maybe that can help you get started
-
ORA-02327: cannot create indexes on the LOB data type expression
DB 10.2.0.4
DB 5.2
I am not able to move lobindex and lobsegment. While try occurs below error
SQL > ALTER INDEX dev. "" SYS_IL0000718396C00002$ $"REBUILD THE TABLESPACE DATA_TEMP;
ALTER INDEX dev. "" SYS_IL0000718396C00002$ $"REBUILD TABLESPACE DATA_TEMP
*
ERROR on line 1:
ORA-02327: cannot create indexes on the LOB data type expression
Thank you
Published by: user13382934 on October 16, 2012 14:05correct syntax is
ALTER TABLE.MOVE the LOB (
)
STORE AS (tablespace); Where
is a name of the / columns LOB, not the name of the segment. Moving type LOB data will move its indexes as well. -
Impact on performance when you use the LONG data type
Hi all
Only I have a doubt about the use of LONG data type
I use the data type LONG for some columns in a table and I created indexes on the columns separately, but these column values can be easily fit into the varchar data type.
(Just to see the performance on this issue)
Suppose that a common select query with WHERE condition on any of the column which has LONG data type will affect the performance of the query?
Please explain.
Thank you(1) the LONG (and LONG RAW) data types have been depricated for quite a while. Oracle has been strongly recommends that you move to 8.1.5 CLOB and BLOB data types. Why you use the LONG data type? You're still on Oracle 7?
(2) have you tried to write a query that has a WHERE condition that refers to a LONG column? In general, you can not because it does not support the type of data LONG. For example
SQL> ed Wrote file afiedt.buf 1 create table a ( 2 col1 varchar2(30), 3 col2 long 4* ) SQL> / Table created. SQL> select * from a where col2='abc'; select * from a where col2='abc' * ERROR at line 1: ORA-00997: illegal use of LONG datatype
LONG data types are a royal pain to work with. They also have implications on the performance of wicked on the client.
Justin
-
How to use the queue data Structures stack?
Hi all, you can tell me how to use the queue, stack, the link in the list... Structures of data in the project of BlackBerry? Thanks for any suggestions!
BlackBerry devices are not java desktop running. you are limited to the blackberry api, basically j2me + rim extensions, based on java 1.3/1.4 (no enums, no generic, many collections not impl etc.).
Remove your JRE6 and change your code until there is no more error.
-
How to use the default connection type?
Hi all
Someone knows how can I make my app use the internet connection which has been set for the browser?
For example, if the browser has been configured to use the WiFi, use it instead of GPRS, EDGE or 3 G. Otherwise, if WiFi is not available, it allows the best data connection?
According to BlackBerry, there are 5 connections to choose.
I found good article solved my problem
http://blog.accelgolf.com/2009/05/22/BlackBerry-cross-carrier-and-cross-network-HTTP-connection
I used the code in this article and the work demands right now
Thanks a lot for all
-
How to use the tracking data?
I created a Web page, add the tracking inside scripts. Based on the history tour of the visitor I want to perform certain actions or to put ads on the PURL page accordingly. But I can't find the data that has been the subject of a follow-up or where does the tracked data is stored?
Hi assani
Case of use which you are referring. Theoretically speaking, we could accomplish this type then:
-Decision program rule evaluates the membership contact filter. Contact filter uses the comparison of capture all contacts who have visited the Web site activity-based x.
-If the contact is rated as 'Yes', run an update rule to force a specific value in a field of contact (for example, if the contact has visited the site, then leave the field "has visited the website?" = "yes")
-Insert the dynamic content on the PURL page that displays according to the value in this field of specific contact (for example, if 'yes' then display ad, if you see 'no' then ad Z)
Note: the 'extra' step to push the value in a field of contact is necessary because the contained substitution works based on contact (or company or prospect) field values
I don't know that too, there are other ideas out there. Would love to hear them.
-Zainab
-
convert the varchar2 data type to the data number type
How to convert the varchar2 data type to the data type number.
It looks like my data
create table one)
col1 varchar2 (50)
col2 varchar2 (500);
Insert in a (col1, col2) values ('1234 ', ' 2345');
Select Column1 of number (19)) cast (to_number (col1);
IAM getting error invalid number
I need to create a table with the same columns with data like number types (19)
can someone help me
Thank youYou have changed your original post, so now I see that you get the invalid number.
This is why you should always avoid the varchar columns to store numbers or dates...
Since your table source contains a nonnumeric value, you can write a pl/sql to convert data and see what records are false:
SQL> insert into a (col1,col2) values ('xxxx','2345'); 1 row created. SQL> select * from a; COL1 COL2 -------- -------- 1234 2345 xxxx 2345 2 rows selected. SQL> create table b (col1 number(19), col2 number(19)); Table created. SQL> set serverout on SQL> declare 2 cursor c is 3 select * from a; 4 begin 5 for r in c loop 6 begin 7 insert into b values (to_number(r.col1), to_number(r.col2)); 8 exception 9 when invalid_number then 10 dbms_output.put_line('Row rejected: col1='||r.col1||' col2='||r.col2); 11 end; 12 end loop; 13 end; 14 / Row rejected: col1=xxxx col2=2345 PL/SQL procedure successfully completed. SQL> select * from b; COL1 COL2 ---------- ---------- 1234 2345 1 row selected.
Max
Published by: Massimo Ruocchio, June 14, 2011 20:00
Added the first query in the example -
What the best data type for storing jpeg/gif images?
Hello
What the best data type for storing jpeg/gif images?
Idon't want to use the blob data type
Ordimage is the best?
Thank you.VDH says:
What the best data type for storing jpeg/gif images?
Idon't want to use the blob data type
Ordimage is the best?Don't be stupid.
If you do not want to use BLOBs then, or you can use the ordimage.
It uses ordsys.ordsource for the storage of the image data type. This is a user defined Type of data in advance and has a property called LocalData that stores the actual image. And what is its data type? BLOB OBJECT.
-
How to use the node function call library for a function in the dll with the data SUB type
Hi all
I would ask for your kind help
I am facing a problem with the call library node.
I have a C++ (stdcall) function, which has Sub as data type
XXXX error code (hwnd, lid, getValue, * Sub data1, * Sub data2)
data1 and data2 types are constantly changing based on the value of 'getValue '.
Mainly I can use the call library node several times and adapt each node according to the types of data data1, data2 and extract the values and use in the code. Here is no question. Real question is:
My question:
How can I use a node of library time call and make a case according to the 'getvalue', who will control the data1, data2 data type. Here I really seeking solutions.
My tests:
I used varaints as entry to the libray call node of the data1, data2 and selected parameters in the call libraby node as "Adapt to type. Here labview just crashed.
I appreciate your suggestions to feedbackand.
Thank you
Karine
You must allocate enough space for data1 and data2, and then pass a pointer to this space. An easy way to do this is the function to initialize table. Set the U8 type and size for the number of bytes required. Pass this array to the function as a pointer of table data.
After the function call returns, you need to extract the data in the table. You can do it manually, but a simple approach is to use the array of bytes to a string. Then, in a housing structure, use Unflatten chain to convert the string to the correct data type. This method also converts the "endianness" which will be probably necessary; Be sure to only set all entries for unflatten correctly.
-
ORA-00997: illegal use of the LONG data type
Hi all
11.2.0.1
ALTER TABLE SAFDB MOVE TABLESPACE DATA_TS_ENC
*
ERROR on line 1:
ORA-00997: illegal use of the LONG data type
Why illegal? How can I move this table?
Thank you very much
pK
Take a look who
http://aprakash.WordPress.com/2011/01/06/how-to-move-table-containing-long-or-LOB-columns/
Concerning
-
Hello
I used the Labview FPGA module to develop test equipment. Now, I need to write a driver that is to be a Dll with compatible interface to C/C++ for this equipment. So that my client who is familiar with C/C++ can call the driver without any study on labview. But I had a few problem on how to convert labview for C/C++ data complex data type. To clearly explain to my question, I have attached a simple example. (see attachment) I try to generate a Dll for the attached example VI and get the the function prototype at the head of the files as below:
' void OpenFpgaReference (LStrHandle * RIODevice, TD1 * errorIn, LVRefNum * FPGAVIReferenceOut, TD1 * errorOut).
As you have known, the type of data "LStrHandle * RIODevice" and "LVRefNum * FPGAVIReferenceOut" Labview data format are. C/C++ do not have this kind of data type and can not reconige it. As a result, I can't call the Dll of C/C++ programming language. How to convert these two data type of labview for the C/C++ compatible data format, and then build the Dll? Anyone know about this?
The answer is really apprecaited! Thank you in advanced.
Ivan.Chen wrote:
As I found in the following article:
http://digital.NI.com/public.nsf/WebSearch/FB001AA027C8998386256AAD006C142D?OpenDocument
LVRefNum is the name of resource of LabVIEW VISA or refnum, and "it is impossible to convert LabVIEW VISA name of resource or refnum VISession valid ID."
This means that external code modules can not access & control the session VISA which is open by labview. But for my purposes, I will not attempt to access this VISA extenal code(C/C++) session. I just hope that save this session VISA in the external code once I opened it in Labview dll; and pass it to the labview dll when needed. While I have not need to login again when I need to control the device. Is it possible to do?A LVRefNum is really just a single int32 value. Its meaning is useless for other environments than those who created it so that you Michael not any what in C/C++ caller but pass it back to other functions in your DLL, but this often isn't a problem at all.
You can take the following statement of the LabVIEW extcode.h headers and add them to your delabviewed header files to make it work in such a way.
#define Private (T) typedef struct T # _t {void * p ;} * T}
Private (LVRefNum);
The LStrHandle you must set a standard C string instead in your export DLL and document what is the size of the string buffer should have if it is an output parameter.
TD1 error clusters should also be divided into their parameters (C compatible) separate for all items or just to the left of suite entirely.
Rolf Kalbermatter
-
How to post JSON using the Oracle Data Service remains
I use the regular (not NoSQL or something) oracle database with oracle rest data service. Now I need to post data / put wrote in the body of the request using some json/xml format, how to consume them using the rest data service, searching inside the express application? important: using pl/sql block
Also, I am on,
Data service Oracle rest 3.0
Oracle Application Express 4.2
Post edited by: Jacynthe
OK, I got the answer. At the express request, there is a link called body variable (: body in BLOB). but the BLOB data type. So, we have to convert that in other data, type what we in pl/sql. I've converted data type witch CLOB supports json.
-
Dear gurus
the code below works fine, he sends a good fixation to the first user, but to the 2nd user, it send blank (empty) file.
What I want, I have read the data from the source and enter the temporary BLOB and use the same data to send several users in the loop.
create or replace
PROCEDURE dba_ho.emailattacheulhr is
/ * LOB related operation varriables * /.
v_src_loc BFILE.
l_buffer RAW (54);
l_amount directory: = 54;
l_pos INTEGER: = 1;
l_blob BLOB: = EMPTY_BLOB;
l_blob_len INTEGER.
v_amount INTEGER.
/ * Related UTL_SMTP varriavles. */
v_connection_handle UTL_SMTP. CONNECTION;
v_from_email_address VARCHAR2 (200);
v_to_email_address VARCHAR2 (200);
v_cc VARCHAR2 (200);
v_smtp_host VARCHAR2 (50);
v_subject VARCHAR2 (500);
l_message VARCHAR2 (30000);
l_filename VARCHAR2 (4000);
CustNo number (8);
CNAME varchar2 (50);
cst slider is
Select a.EMAIL_ADDR, a.CARDHOLDER_NAME
Cust a
ORDER BY a.cust_no;
/ * This procedure of send_header is mentioned in the documentation * /.
PROCEDURE send_header (pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
BEGIN
UTL_SMTP. WRITE_DATA (v_connection_handle,
pi_name | ': ' || pi_header | UTL_TCP. CRLF);
END;
BEGIN
v_src_loc: = BFILENAME ('DIR_MMAIL', 'MAKPROM.pdf');
v_from_email_address: = '[email protected] ';
v_cc: = '[email protected] ';
v_smtp_host: = 'mailhost.mak.com ';
v_subject: = 'list of Promotion of Mak;
-l_blob BLOB: = EMPTY_BLOB;
/ * Prepare the LOB of attachment file. */
DBMS_LOB. OPEN (v_src_loc, DBMS_LOB. LOB_READONLY); -Read the file
DBMS_LOB. CREATETEMPORARY (l_blob, TRUE); -Create a temporary LOB to store the file.
v_amount: = DBMS_LOB. GETLENGTH (v_src_loc); -Amount to be stored.
DBMS_LOB. LOADFROMFILE (l_blob, v_src_loc, v_amount); -A temporary file in LOB loading
l_blob_len: = DBMS_LOB.getlength (l_blob);
Begin
CSE opened;
loop
extract the CSE in custno, v_to_email_address, cname;
When the output cst % notfound;
l_message: = 'Dear customer ' | UTL_TCP. CRLF;
l_message: = l_message | CNAME | UTL_TCP. CRLF;
l_message: = l_message | UTL_TCP. CRLF;
l_message: = l_message | "Thanks for choosing. Enclosed please find our current list of promotion for your review. '||
UTL_TCP. CRLF;
l_message: = l_message | UTL_TCP. CRLF;
l_message: = l_message | "Sincere friendships. UTL_TCP. CRLF;
l_message: = l_message | UTL_TCP. CRLF;
l_message: = l_message | UTL_TCP. CRLF;
l_message: = l_message | "To Mak' | UTL_TCP. CRLF;
l_message: = l_message | ' www.mak.com' | UTL_TCP. CRLF;
/ * Associated with coding UTL_SMTP. */
v_connection_handle: = UTL_SMTP. OPEN_CONNECTION (v_smtp_host, 25);
UTL_SMTP. HELO (v_connection_handle, v_smtp_host);
UTL_SMTP. MAIL (v_connection_handle, v_from_email_address);
UTL_SMTP. RCPT (v_connection_handle, v_to_email_address);
UTL_SMTP. RCPT (v_connection_handle, v_cc);
UTL_SMTP. OPEN_DATA (v_connection_handle);
send_header ("", v_from_email_address) ;--|| ("<>'");
send_header ("TO", v_to_email_address) ;--|| ("<>'");
send_header ('CC', v_cc);
send_header ('Subject', v_subject);
-MIME header.
UTL_SMTP. WRITE_DATA (v_connection_handle,
"MIME-Version: 1.0 ' |" UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
' Content-Type: multipart/mixed; ' || UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
"boundary =" ' | "'" Sample.SECBOUND' | '"' ||
UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);
-Body of the message
UTL_SMTP. WRITE_DATA (v_connection_handle,
'--' || "Sample.SECBOUND" | UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
' Content-Type: text/plain; "|| UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
'charset = US-ASCII' | UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle, l_message |) UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);
-Attachment of e-mail
UTL_SMTP. WRITE_DATA (v_connection_handle,
'--' || "Sample.SECBOUND" | UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
' Content-Type: application/octet-stream' |
UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
' Content-Disposition: attachment; ' || UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
"filename =" ' | "MakMail.pdf" | '"' || UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
' Content-Transfer-Encoding: base64' | UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);
/ * Write the BLOB into pieces * /.
While l_pos < l_blob_len LOOP
DBMS_LOB. READ (l_blob, l_amount, l_pos, l_buffer);
UTL_SMTP.write_raw_data (v_connection_handle,
UTL_ENCODE. Base64_encode (l_buffer));
UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);
l_buffer: = NULL;
l_pos: = l_pos + l_amount;
END LOOP;
UTL_SMTP. WRITE_DATA (v_connection_handle, UTL_TCP. CRLF);
-E-mail nearby
UTL_SMTP. WRITE_DATA (v_connection_handle,
'--' || "Sample.SECBOUND" | '--' || UTL_TCP. CRLF);
UTL_SMTP. WRITE_DATA (v_connection_handle,
UTL_TCP. CRLF. '.' || UTL_TCP. CRLF);
UTL_SMTP. CLOSE_DATA (v_connection_handle);
UTL_SMTP. Quit (v_connection_handle);
-DBMS_LOB. FREETEMPORARY (l_blob);
-DBMS_LOB. FileClose (v_src_loc);
End loop;
EXCEPTION
WHILE OTHERS THEN
UTL_SMTP. Quit (v_connection_handle);
DBMS_LOB. FREETEMPORARY (l_blob);
DBMS_LOB. FILECLOSE (V_SRC_LOC);
dbms_output.put_line (SQLERRM); -try to print the error message.
END;
DBMS_LOB. FREETEMPORARY (l_blob);
DBMS_LOB. FileClose (v_src_loc);
End;
-end of code
Help, please.
Concerning
S.GarewalThis is what happens when you copy a code without understanding.
Take a look at the code here/* Writing the BLOB in chunks */ WHILE l_pos < l_blob_len LOOP DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer); UTL_SMTP.write_raw_data(v_connection_handle, UTL_ENCODE.BASE64_ENCODE(l_buffer)); UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF); l_buffer := NULL; l_pos := l_pos + l_amount; END LOOP;
Discover the parameters of DBMS_LOB. READ.
For the first time it's good reading but your position and the quantity is not initialized when you loop and read again and is not read correctly.
Maybe you are looking for
-
userChrome.css works on XP but not on Windows 7
Hello. I modified userChrome.css which mainly plays with widths tab in function if it is enabled or not. This works fine on XP but does absolutely nothing on Windows 7. No idea where to start looking for the reason for this? What is different in Win7
-
C50 - A satellite 19 t - no sound - need to win 10 drivers
No sound from my laptop Satellite 19 C50 - A t and now I want to download the driver for Windows 10 How can it help me?
-
How can I get the Boot Camp utility to install entirely in Win 10 Pro? After winning 10 Pro was finished installing, the installation of Boot Camp process began but eventually got stuck at halfway through (for 20 minutes) on stage 'Realtek Audio.
-
Motorola Widget settings updated
I'm having a hard time to modify the Widgets Motorola once they are in place. For example, if I want to delete one number for a contact in the contact widget or update the syndicated news feed. I guess I'm missing something obvious and it's my first
-
A security update for Windows XP Media Center Edition 2005 Update Rollup 2 X 86 Edition (KB2502898)Update of security for Microsoft .NET Framework 4 on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008 x 86 (KB2446708)Upd