Newbie: How to store/analyze data in a time critical path
Hi,
I monitor two CAN channels with LabView. To monitor I use a special PCMCIA card and a dll from the card manufacturer.
I get a lot of messages from each channel and I have to compare them.
To get all messages I have to use the dll in a while loop.
But to store the data in two 2d arrays and analyze it during one loop is to slow.
So how can I do it? Somehow a hash table, queue or parallel tasks - one for the data collecting and one for analyzing?
And how to handle the two CAN channels?
As you can see I'm new in LabView and I'm looking for a good program architecture...
Thanks,
Thomas
Hi Thomas,
You raise a good point, and I'm happy to see that you are wanting to make your LabVIEW code more efficient! In general, you want to avoid building up large arrays in a while loop (as you've already alluded to). I believe a queue is an appropriate data structure to offload the processing of the data to another loop. We usually call this a producer-consumer type architecture, the details of which you can find here:
Application Design Patterns: Producer/Consumer
http://zone.ni.com/devzone/conceptd.nsf/webmain/c54badadd8bbde4286256c5200533b80
You're producer loop will be the code acuiring from the CAN channels using your DLL. The queue will pass data from the producer to the consumer, where you will perform whatever analysis you need.
Have a good one!
Charlie S.
Visit ni.com/gettingstarted for step-by-step help in setting up your system
Similar Messages
-
How to store the datas in a .txt file in to a JTable in Java Swing
Hi sir,
Here i want to know how to store the data's of a .txt file
in to a JTable in java swing.
Where here the .txt file like for eg,spooler.txt is in the server and from there it will come to my client machine what i have to do is to take that .txt file and store the datas of the .txt file
in a JTable.This is what i want.So pls. do help and provide the code as well.I will be thankful.Since i am involved in a project which involves this it is Urgent.
Thanx,
m.ananthuYou can't just display data from a text file in a JTable. You have you understand the structure of the data so that you can parse the data and create a table model that can access the data in a row/column format. Here is an example of a simple program that does this:
http://forum.java.sun.com/thread.jsp?forum=57&thread=315172 -
How to store xml data into file in xml format through java program?
HI Friends,
Please let me know
How to store xml data into file in xml format through java program?
thanks......
can discuss further at messenger.....
Avanish Kumar Singh
Software Engineer,
Samsung India Development Center,
Bangalore--560001.
[email protected]Hi i need to write the data from an XML file to a Microsoft SQL SErver database!
i got a piece of code from the net which allows me to parse th file:
import java.io.IOException;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import org.apache.xerces.parsers.SAXParser;
import java.lang.*;
public class MySaxParser extends DefaultHandler
private static int INDENT = 4;
private static String attList = "";
public static void main(String[] argv)
if (argv.length != 1)
System.out.println("Usage: java MySaxParser [URI]");
System.exit(0);
String uri = argv[0];
try
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
MySaxParser MySaxParserInstance = new MySaxParser();
parser.setContentHandler(MySaxParserInstance);
parser.parse(uri);
catch(IOException ioe)
ioe.printStackTrace();
catch(SAXException saxe)
saxe.printStackTrace();
private int idx = 0;
public void characters(char[] ch, int start, int length)
throws SAXException
String s = new String(ch, start, length);
if (ch[0] == '\n')
return;
System.out.println(getIndent() + " Value: " + s);
public void endDocument() throws SAXException
idx -= INDENT;
public void endElement(String uri, String localName, String qName) throws SAXException
if (!attList.equals(""))
System.out.println(getIndent() + " Attributes: " + attList);
attList = "";
System.out.println(getIndent() + "end document");
idx -= INDENT;
public void startDocument() throws SAXException
idx += INDENT;
public void startElement(String uri,
String localName,
String qName,
Attributes attributes) throws SAXException
idx += INDENT;
System.out.println('\n' + getIndent() + "start element: " + localName);
if (localName.compareTo("Machine") == 0)
System.out.println("YES");
if (attributes.getLength() > 0)
idx += INDENT;
for (int i = 0; i < attributes.getLength(); i++)
attList = attList + attributes.getLocalName(i) + " = " + attributes.getValue(i);
if (i < (attributes.getLength() - 1))
attList = attList + ", ";
idx-= INDENT;
private String getIndent()
StringBuffer sb = new StringBuffer();
for (int i = 0; i < idx; i++)
sb.append(" ");
return sb.toString();
}// END PRGM
Now , am not a very good Java DEv. and i need to find a soln. to this prob within 1 week.
The next step is to write the data to the DB.
Am sending an example of my file:
<Start>
<Machine>
<Hostname> IPCServer </Hostname>
<HostID> 80c04499 </HostID>
<MachineType> sun4u [ID 466748 kern.info] Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz) </MachineType>
<CPU> UltraSPARC-IIi at 360 MHz </CPU>
<Memory> RAM : 512 MB </Memory>
<HostAdapter>
<HA> kern.info] </HA>
</HostAdapter>
<Harddisks>
<HD>
<HD1> c0t0d0 ctrl kern.info] target 0 lun 0 </HD1>
<HD2> ST38420A 8.2 GB </HD2>
</HD>
</Harddisks>
<GraphicCard> m64B : PCI PGX 8-bit +Accel. </GraphicCard>
<NetworkType> hme0 : Fast-Ethernet </NetworkType>
<EthernetAddress> 09:00:30:C1:34:90 </EthernetAddress>
<IPAddress> 149.51.23.140 </IPAddress>
</Machine>
</Start>
Note that i can have more than 1 machines (meaning that i have to loop thru the file to be able to write to the DB)
Cal u tellme what to do!
Even better- do u have a piece of code that will help me understand and implement the database writing portion?
I badly need help here.
THANX -
How can i browse data in my time capsule with my iPhone?
how can i browse data in my time capsule with my iPhone?
You might want to take a look at FileBrowser.
App Store - FileBrowser - Access files on remote computers -
How do I transfer data from one time capsule to new time capsule when TC backs up an iMac and MacBookPro
It is generally better to leave the old backups and start again.. unless there is something you particularly need.
But if you desperately want all the old backups you have to copy the sparse bundles.. this will take very long time as it must copy via the computer..
http://pondini.org/TM/18.html
Take particular note of the initial comments.. ie before you read how to do it.. don't do it. -
How can I retrieve data on a time machine if I have forgotten the password?
How can I retrieve data on a time machine if I have forgotten the password?
There are so many passwords.. which one do you mean?
TC password or disk password in the TC.. no problem.. soft reset.
Or recover the password.. via the Tesserax method.
https://discussions.apple.com/docs/DOC-3372
If you encrypted the backup in TM and have forgotten that password you are doomed.. there is no way to recover it I know of.. there is a warning.. very clear.. do not forget the password.
http://pondini.org/TM/31.html
Pink box at the bottom. -
How to store the data coming from network analyser into a text or excel file
Hii everyone
I'm using Agilent 8719ET network analyser and wish to store the data coming from netowrk analyser into a text file/ excel file.
Presently I'm able to get the data on Labview graph using GPIB . Can anyone suggest how to go ahead after collect data sub vi. How can the data be stored into a file apart from showing on the graph?
Attached is the vi for kind consideration...
Looking for help
Regards
Rohit
Attachments:
Agilent 87XX Series Exceed Max Meas.vi 43 KBFirst let me say that your code really looks pretty good. The data handling could be made more efficient by calculating the number of datapoints that are going to be in the completed dataset and preallocating the entire array -- but depending upon your answer to my questions, the logic in the lower shift register may be going away - so we won't worry about that right now.
The thing I need to know before addressing the data storage question is: Each time you call "Collect and Display Data.vi", how many element are in the array? Are you reading single data points, or a group of data? (BTW: if the answer to that question is obvious based on the way the other VIs are setup, I don't have the drivers so I can't tell what the setup values are.) Second, how fast does the loop iterate? Are we talking msec per loop?, seconds? fortnights?
The issues here are two-fold: how much data? and how fast is it coming? The answer to these will tell you how to save the data.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
How to store multiple data in one aray at one go?
Hi i am creating a Recipe Cooking Book and i have got a recipe class, ingredient class, equipment class and jFORM GUI. the gui form will have a list and it will contain couple of equipments. the user should be able to select more than 1 equipments which would use the pass- by - value to the recipe class and it will be passed to equipment class.
The problem that encounter is that when i have to select multiple values from list, it should store all selected equipments to array.
This is where i am stuck as i don't know how to store couple of equipment at one creation.
This is my recipe constructor in recipe class
public Recipe(int aRecipeID, String aRecipeName, String aCountryofOrigin,
String aType, String aPreparationTime, String aCookingTime,
String aRecipeDescription, String aProcedure,
ClsEquipment[] aequipment, String aImage1, String aImage2,
String aImage3) {
Create(aRecipeID, aRecipeName, aCountryofOrigin, aType,
aPreparationTime, aCookingTime, aRecipeDescription, aProcedure,
aequipment, aImage1, aImage2, aImage3);
public void Create(int aRecipeID, String aRecipeName,
String aCountryofOrigin, String aType,
String aPreparationTime, String aCookingTime,
String aRecipeDescription, String aProcedure,
ClsEquipment[] aequipment, String aImage1, String aImage2,
String aImage3) {
RecipeID = aRecipeID;
RecipeName = aRecipeName;
CountryofOrigin = aCountryofOrigin;
Type = aType;
PreparationTime = aPreparationTime;
CookingTime = aCookingTime;
RecipeDescription = aRecipeDescription;
Procedure = aProcedure;
*equipment[j] = aequipment[k];*
Image1 = aImage1;
Image2 = aImage2;
Image3 = aImage3;
this is The command that i have in Jform gui
public void jRcreateButton_actionPerformed(ActionEvent e) {
int i=0;
myRecipe.Create(Integer.parseInt(jRidTextField.getText()),jRnameTextField.getText(),jRcountryTextField.getText(),jRtypeTextField.getText(),jRptimeTextField.getText(),jRctimeTextField.getText(),jRdescriptionTextArea.getText(), jRprocedureTextArea.getText(),new ClsEquipment(jAEequipmentList.getSelectedValues()),jRimage1TextField.getText(),jRimage2TextField.getText(),jRimage3TextField.getText());
Let me conclude what i am trying to do. Basically i want the user to select more than 1 equipments from the List and the user should also input other recipe data. once this is done, the should click on create.
when creating one recipe, u need more than 1 equipment so that created recipe should store selected equipments, which i will later on retrieve and display on screen.
can u please guide me where i am goin wrong and how i could fix it.
thank you in advance
Edited by: JAVABABY on Feb 18, 2008 8:40 AM*equipment[j] = aequipment[k];*JList's getSelectedValues() method returns an array of Objects, so if you wanted to store it into another Object[] reference, you'd just use
equipment = aequipment;But, you are storing it as an Equipment array, so you'll need to loop over the Object array and cast each element to an Equipment reference, and store it into the Equipment array. Something like this:
equipment = new Equipment[aequipment.length];
for (each element x in aequipment) {
equipment[x] = (Equipment)aequipment[x];
} -
How to store the data of a file into an ArrayList?
Hi! everyone.
I want to know
if I have a File, and the data in the file are type int, type String...
And I have a ArrayList which is of type Question
How do I store the data of that file into the ArrayList
I tried to use the while loop(use the hasNextLine() to read the data line by line)
But I cannot add data which are not of type Question to the ArrayList.
Can you tell me what I should do, please?
I also wonder that
The data of the file are of many types, but when I try to read it with the nextLine(), the data all turn out to be of type String. Why?
Thank you.
Edited by: Terry001 on Apr 30, 2008 1:13 PMNo, a line in the file is just part of a question
The format of the file is like this:
*<question type code> : String*
*<question point value> : int*
*<question category> : String*
*<question difficulty level> : int*
*<question text> : String*
*<question correct answer> : String*
*<optional question-specific data> : String*
*<question terminator> : String*
And here is an example
TF //TrueFalseQuestion
5 //points value
None //category
3 //difficulty level
The capital of the United States is Washington, D.C. //question text
True // answer
*** //quetion terminator
I created an ArrayList in the Test class:
private ArrayList<Question> questions; // Create inside constructor
public Test (String name, String instr)
testName = name;
scoreEarned = 0;
scorePossible = 0;
instructions = instr;
questions = new ArrayList<Question>(); //[MAX_NUMBER_OF_QUESTIONS];
}And I tried to use the following method to store the data of the file to the ArrayList
// This method loads a set of questions from a plain text file
public void loadQuestionsFromFile(String fileName) throws FileNotFoundException
try
File fileReader = new File("input.txt");
Scanner sc = new Scanner(fileReader);
while (sc.hasNextLine())
// I don't know how to pass the data I got from the nextLine() method to the ArrayList because they are of different type
catch (FileNotFoundException a)
System.out.println(a);
} As all you said, I should create an Question object in the while loop
Question temp = new Question ();But I have no idea how to pass the int and String to the Question object.
Thank you -
How to store bit data in VARCHAR(4000) field?
Hi.
Please help!
We are porting some C/C++ software with embedded SQLs from NT/DB2 to Linux/Oracle.
On NT/DB2 we have some table to store file data in a VARCHAR(4000) blocks.
Table looks like this
CREATE TABLE FileData (filetime as timestamp not null, idx int not null, datablock varchar(4000) FOR BIT DATA not null, primary key (filetime, idx) );
As you can see DB2 has appropriate field modifier - "FOR BIT DATA" which makes DB2 storing data as-is, not converting characters.
I need to know - if it is possible to do the same in Oracle like in DB2?
If Oracle has some kind of field modifier like "FOR BIT DATA" in DB2?
If not, how can I do the same in Oracle?
The current problems are:
1) when application imports the file with some national chars the Oracle stores "?" in a database in place of national chars.
2) another piece of a problem - if file is more than 4000 bytes length, it reports the ORA-01461 error (see it is trying to expand some chars to UTF8 char which is not fit a single char, so finally - not fit the field size).
So, it seems that it cannot proceed national chars at all. :-\
For details please see enclosed [C code|http://dmitry-bond.spaces.live.com/blog/cns!D4095215C101CECE!1606.entry] , there is example how data written to a table.
In other places we also need to read data from FIELDATA table and store back to file (other filename, other location).
Here is summary on a field-datatype variants I have tried for the "datablock" field:
1) VARCHAR2, RAW, LONG RAW, BLOB - does not work! All reports the same error - ORA-01461.
2) CLOB, LONG - both working fine but(!) both still returns "?" instead of national chars on data reading.
Hint: how I did try these field types - I just drop the "FileData" table, created it using different type for "datablock" field and run the same application to test it.
I think I need to explain what the problem - we do not provide direct access to Oracle database, we use a some middle-ware. Middle-ware is a C/C++ software which also has a interface for dynamic SQLs execution. So, exactly this middle-ware (which is typically running on the same server with Oracle) receives the "?" instead of national chars! But we need it to return all data AS-IS(!) without any changes!!! That is wjhy I did ask - if Oracle has any options to store byte-data as-is?
The BIG QUESTION - HOW CAN WE DO THIS?!
Another thing I need to explain - it is ok to use Oracle-specific SQL ONLY IF THERE IS REALLY NO WAY TO ACHIEVE THIS WITH STANDARD SQL! Please.
So, please look on a C code (by link I have posted above) and tell - if it is possible to make working in Oracle the VARCHAR approach we using at the moment?
If not - please describe what options do we have for Oracle?
Regards,
Dmitry.
PS. it is Oracle 11gR2 on CentOS 5.4, all stuff installed with default settings, so Oracle db encoding is "AL32UTF8".
C/C++ application is built as ANSI/ASCII application (non-unicode), so sizeof(char)=1.
The target Oracle db (I mean - the one which will be used on customer site) is Oracle 10g. So, solution need to be working on Oracle 10g.P. Forstmann wrote:
There is some contradiction in your requirements:
- if you want to store data as is without any translation use RAW or BLOB
- if you want to store national character data try to use NVARCHAR2 or NCLOB.Seems you did not understand the problem. Ok, I'll try to explain. Please look on the code sample I provided in original question
(I just added expanded data structures there, sorry I forgot to publish them when post original question):
EXEC SQL BEGIN DECLARE SECTION;
struct {
char timestamp[27];
char station[17];
char filename[33];
char task[17];
char orderno[17];
long filelen;
gFilehead;
struct {
char timestamp[27];
long idx;
struct {
short len;
char arr[4001];
} datablock;
gFiledata;
EXEC SQL END DECLARE SECTION;
#define DATABLOCKSIZE 4000
#ifdef __ORACLE
#define VARCHAR_VAL(vch) vch.arr
#elif __DB2
#endif
short dbWriteFile( char *databytes, long datalen )
short nRc;
long movecount;
long offset = 0;
gFilehead.filelen = gFilehead.filelen + datalen;
while ((datalen + gFiledata.datablock.len) >= DATABLOCKSIZE)
movecount = DATABLOCKSIZE - gFiledata.datablock.len;
memcpy(&VARCHAR_VAL(gFiledata.datablock)[gFiledata.datablock.len], databytes, movecount);
gFiledata.datablock.len = (short)(gFiledata.datablock.len + movecount);
exec sql insert into filedata (recvtime, idx, datablock)
values(
:gFiledata.recvtime type as timestamp,
:gFiledata.idx,
:gFiledata.datablock /* <--- ORA-01461 appears here */
nRc = sqlcode;
switch (nRc)
case SQLERR_OK: break;
default:
LogError(ERR_INSERT, "filedata", IntToStr(nRc), LOG_END);
exit(EXIT_FAILURE);
offset = offset + movecount;
datalen = datalen - movecount;
gFiledata.idx = gFiledata.idx + 1;
memset(&gFiledata.datablock, 0, sizeof(gFiledata.datablock));
databytes = databytes + movecount;
gFiledata.datablock.len = 0;
if (datalen + gFiledata.datablock.len)
memcpy(&VARCHAR_VAL(gFiledata.datablock)[gFiledata.datablock.len], databytes, datalen);
gFiledata.datablock.len = (short)(gFiledata.datablock.len + datalen);
return 0;
}So, the thing we need is - to put some data into the "datablock" field of following structure:
struct {
char timestamp[27];
long idx;
struct {
short len;
char arr[4001];
} datablock;
gFiledata;Then insert it into a database table using static SQL like this:
exec sql insert into filedata (recvtime, idx, datablock)
values(
:gFiledata.recvtime type as timestamp,
:gFiledata.idx,
:gFiledata.datablock /* <--- ORA-01461 appears here */
); And then expect to read exactly the same data back!
The problems are:
1) Oracle make decision to convert the data we are inserting (why? and how to disable converting?!)
2) even if it inserts the data (CLOB and LONG field datatypes are working fine when inserting data with such static SQL + such host variable) then it became not readable! (why?! how to make it readable?!)
P. Forstmann wrote:
ORA-01461 could mean that you have a wrong data type for bind variable variable in your client code:Not me decided that host variable is the "LONG datatype value" - the Oracle make that decision instead of me. And that is the problem!
Looks like Oracle react on any char code >= 0x80.
So, assume if I run the code:
// if Tab1 was created as "CREATE TABLE Tab1 (value VARCHAR(5))" then
char szData[10] = "\x41\x81\x82\x83\x84";
EXEC SQL INSERT INTO Tab1 (value) VALUES (:szData);
Oracle will report the ORA-01461 error!
EXACTLY THIS IS THE PROBLEM I HAVE DESCRIBED IN MY ORIGINAL QUESTION.
So, problem - why Oracle make such decision instead of me?! How we can make Oracle insert data into a table AS-IS?
What other type of host variable we should use to make Oracle think that data is a binary?
void*? unsigned char? Could you please provide any examples?
Ok, you did recommend - "use the RAW datatype". But RAW datatype is limited to size 2000 bytes only - we need 4000! So, it is not match our needs at all.
Also you have mentioned "use BLOB" - but testing shows that Oracle reports the same ORA-01461 error on inserting data into a BLOB field from such host variable! (see the code I posted)
What also we can do?
Change type of host variables? BUT HOW?! -
How to store the data instead of memoryengine to database when use XML file
Hi Experts,
I have doubt which is into XML to database data transfer.
While transferring the data from XML to database the tables will be store in memory for the xml files, my aim is instead of storing this in memory engine
is there any way to store the data in to the data base itself..
I am assuming when the data size increases say for example huge amount data, storing this much of data is big issue here right, so to avoid this is there any way to store
this data directly in the database level.
Please understand my requirement or else I have the good explanation about my requirement and please assist me how do this job....
Thx,
Sahadeva.Hi Experts,
For this job I have applied the
jdbc:snps:xmll?f=/mydata/xml/file.xml&s=wrk_admin&dp_driver=oracle.jdbc.driver.OracleDriver&dp_url=jdbc:oracle:thin:@localhost:1521:xel&dp_user=wrk_admin&dp_password=bPyXS2eRXw8fWnKEmTYSEf&dp_schema=wrk_admin&dp_doc=Y
my schema name is wrk_admin
xml file name is mydata
jdbc driver: localhost:1521:xe
Encoded password: I have encoded the pwd from cmd:c:oracle\oracle_odi1\oracledi\agent\bin\encode wrk_admin
The above are the details I have applied to my ODI studio for creating the dataserver.
After applying this I got the following error.
Could you please correct me here if I am wrong...
jdbc:snps:xml?param1=value1¶m2=value2&...
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1118)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:420)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.localConnect(SnpsDialogTestConnet.java:860)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:806)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:165)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:161)
Thx,
Sahadeva. -
How to store the data captured from oscillosco​pe into the MS Access database table
Hi All,
In my application, I tried to save the data captured from SCOPE, but could store only 200 bytes. I've taken the Memo data type for the field in database. I want to store all data ( 4 channels) in one field & retrieve back and display on the XY Graph.
Thanks in advance.
Regards,
Shrinikramish wrote:
Im pretty sure that Access does support JDBCNo it does not. It supports ODBC.
just doing a quick Google came up with some pages:
http://blog.taragana.com/index.php/archive/access-microsoft-access-database-from-java-using-jdbc-odbc-bridge-sample-code/
http://www.javaworld.com/javaworld/javaqa/2000-09/03-qa-0922-access.html
Both articles explains how to use the jdbc-odbc bridge. I think I've seen a pure jdbc driver for access but it wasn't from Microsoft and it wasn't free.
Kaj -
How to store spry data in php array
I am trying to store spry data in php array like this:
<? $foo= array();?>
<div spry:region="dsCALC">
<div spry:repeat="dsCALC">
<?php
$foo[]='{dsCALC::DataPrice}';
?>
</div>
</div>
<?var_dump($foo);?>
Outputs:
Array ( [0] => {dsCALC::DataPrice} )
If I tried a variable, it works ok... The array, not... Any ideas?Outputs:
Array ( [0] => {dsCALC::DataPrice} )
And so it should, because that is what you told the PHP-script to do in the following line of code.
$foo[]='{dsCALC::DataPrice}';
Please remember that PHP code is handled on the server, whereas JavaScript (Spry) is handeld on the client (browser) end. JavaScript cannot be handeld by PHP nor can JavaScript handel PHP.
My question to you is, why do you want to store the data in a PHP-array and how is the Spry data obtained?
Ben -
How to store ASO dat file in different location
Hello Everyone,
i have a requirement where I need to store the .dat(ASO) file in a location other than the folder where the application artifcats are stored. In BSO, We can right click the database, edit, properties and in Storage tab we can choose where Data and Index files have to be stored. Do we have similar option for ASO too? because, the space we have for the application folders are limited and we have a separate SAN drive for storing data and index file and thats where BSO .pag files are stored. Since our ASO cube is growing I want to move the data to a location where BSO data is stored, i mean to the designated drive for data. Any suggestions will be much appreciated.
Thanks.Yes, ASO has the concept of 'tablespaces'. There are four (default, temp, log and metadata) but you probably just want to move the 'default' and 'temp' tablespaces to your SAN location. Temp will look really small (i.e. empty) until you run a restructure or aggregation and then it'll explode to the size of the default tablespace so it's important not to miss.
See the section on 'Managing Storage for ASO Databases' here http://docs.oracle.com/cd/E17236_01/epm.1112/esb_dbag/asysadmn.html, or the 'alter tablespace' MaxL command here http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/maxl_alttabl.html.
EDIT: Actually, looking at the documentation, I see that you can't move the metadata or log tablespaces. But you're probably only going to care about 'default' and 'temp' anyway. -
How to store xml data fragments, that will not be queried?
Hello,
Delphi Client application communicates with Java Server application via XML messages. Client sends XML message over HTTP Post method. Java Servlet gets XML message, parses it, performs requested action (select/insert/update/delete), generates resulting response and sends it back to the Client.
I use Oracle DB XE 10.2.
For example: Client sends a request to the server, to append certain Order with new Product info:
Request:
<?xml version="1.0" encoding="UTF-8" ?>
- <Request OrderID="123123123" Action="NewProduct">
- <Product TempProdID="2" ProdName="L01" VisualID="1" Amount="1" TechClass="1" TechSubject="1" TechVersion="0" TechName="TestTech" ElemOk="0">
<Modified UserID="XXX" UserGroup="XXX" GroupLevel="0" />
- <QuickInfo>
<ProdIcon Format="PNG"
Encoding="Base64">iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAA
lC+aJAAAAA3RSTlP////6yOLMAAAAvElEQVR42u3aQQ6EIAwAQP7/afe0
mo1mBVur0emJgwGmRDFNWwvH9I153OpjyoisefqXW3afm4WypP+MgomvT
z8AAAAAAAAAAAAAAMAzAClzAWQAdvexfqATEKmA/Fm0rYs5ozvoAWyWj4
ZqJ9efQKR8BJAHOPEdKAAc/lLdAhC/K68EBG+JWwAixfABgF8Jf6MAAAA
AAAAAAAAAAAAALwRUGgAAAAAAsgGJ3cfVrcfFl2jiIZzV+V7Zd/8BOtNi
0MnJ58oAAAAASUVORK5CYII=
</ProdIcon>
<Parameters />
</QuickInfo>
- <TechProduct CurVer="1" MinVer="1" TotalItems="330" ItemNodeSize="55074">
- <SubItem Class="TPlGraph" BindID="00B9C004">
<PropList />
- <SubItem Ident="Profiles" Class="TProfileList" Child="1" BindID="0188598C">
<PropList />
- <SubItem Class="TPlProfile" Child="1" BindID="018CA6CC">
- <PropList>
<Property PropIdent="ProfBaze0X" ValText="0" />
<Property PropIdent="ProfBaze0Y" ValText="990" />
<Property PropIdent="ProfBaze1X" ValText="990" />
<Property PropIdent="ProfHier0" ValText="0" />
- <Property PropIdent="InBorder" ValIdent="None" ValText="Nėra">
<ExtValue ColIdent="ItemCode" Value="None" />
<ExtValue ColIdent="Type" Value="" />
<ExtValue ColIdent="Filter" Value="" />
<ExtValue ColIdent="Width" Value="0" />
<ExtValue ColIdent="TechCall" Value="" />
</Property>
</PropList>
</SubItem>
</SubItem>
</SubItem>
</TechProduct>
</Product>
</Request>
I use DOM parsers to parse the received requests, extract certain info and insert it into relational tables using standart SQL queries.
My question is: what is the best way to store XML data fragments, that are not required to be saved relationally? I need to save the content of node <TechProduct> from the above example to relational table's column. There will be no need to query this column, no need to use relational views. I will use it only when Client application will request to modify certain order's product. Then I will have to send back the same <TechProduct> node via XML response.
So what column type do I have to use? CLOB? XMLType? Is it better to use object types? Do I have to register XML Schema for better performance? The size of the fragment can be ~2MB.
Thanks for your help
Message was edited by:
KichasThank you for reply,
As you suggested, I will use XMLType storage as CLOB (without XML Schema).
As I mentioned before, I use Java Servlet, deployed on Tomcat WebServer, to receive XML messages from Client application via HTTP POST method.
I use these libs to get the XML payload and parse it into a Document:
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
And here is the code:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
// get the XML payload and parse it into a Document
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document dom;
InputSource input = new InputSource(request.getInputStream());
dom = docBuilder.parse(input);
catch(Exception ex) {
System.out.println("Exception thrown in XmlService");
ex.printStackTrace();
throw new ServletException(ex);
I create a relational table, that contains XMLType column:
CREATE TABLE xwarehouses (
warehouse_id NUMBER,
warehouse_spec XMLTYPE)
XMLTYPE warehouse_spec STORE AS CLOB;
Now I want to insert all DOM Document into XMLType column. So I do like this:
import oracle.xdb.XMLType;
String SQLTEXT = "INSERT INTO XWAREHOUSES (WAREHOUSE_ID, WAREHOUSE_SPEC) VALUES (?, ?)";
XMLType xml = XMLType.createXML(con,dom);
PreparedStatement sqlStatement = con.prepareStatement(SQLTEXT);
sqlStatement.setInt(1,2);
sqlStatement.setObject(2,xml);
sqlStatement.execute();
sqlStatement.close();
dom is the Document, that I got from HTTP Request input stream.
My servlet throws an exception:
java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException
at XmlService.GetMatListServiceHandler.processRequest(GetMatListServiceHandler.java:111)
at XmlService.XmlServiceHandler.handleRequest(XmlServiceHandler.java:43)
at XmlService.XmlServiceServlet.doPost(XmlServiceServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
why does he needs oracle.xml.parser.v2.XMLParseException? I don't use Oracle parser? Does this code line throws the exception (I am not able to debug my code, because I have not configured JDeveloper to be able to use Remote Debuging):
XMLType xml = XMLType.createXML(con,dom);
Does it reparses the given dom Document or what?. When I deploy xmlparserv2.jar to Tomcat, everything is ok, application inserts XML data into XMLType column.
Is there another way to insert the whole org.w3c.dom Document or Document fragment (that is already parsed) into XMLType column. Can you provide any sample code?
The Document may contain national symbols, so they should be correctly stored and then later retrieved.
Many thanks.
Maybe you are looking for
-
I have tried several times to test my fire wire port on this mac mini. I tnever does anything differently than boot up. I am hooking up an audio interface and cant seem to get it to recognize the unit. I have tried testing the port, different cables
-
How to get the page break preview in java
I have an in house report building utility using gridbaglayouts. My reports are coming pretty good but i am unable switch the grids page wise. I tried using the graphics but failed as it cuts the grid in between. The grid bag layout does not return a
-
Sync fails in iTunes 9.0 & 9.01: "too many files open" and error -6999
I've been trying to synch my iPod (Touch, g1) for the last couple weeks but have been getting errors ever since going to iTunes 9.0. First it blew my library and now says "Previous iTunes Libraries" at the top. Can live with that (after going through
-
Hi, I've got me a 4k pc screen and when I open up photoshop CC the tools and panels very small. Can I change the size of these?
-
How i can create tables(database) in ms-access using jsp
i want to create tables by using jsp in ms-access .user can only enter table name ,how many table fields ,constraints etc