How to load a BDB file into memory?
The entire BDB database needs to reside in memory for performance reasons, it needs to be in memory all the time, not paged in on demand. The physical memory and virtual process address space are large enough to hold this file. How can I load it into memory just before accessing the first entry? I've read the C++ API reference, and it seems that I can do the following:
1, Create a DB environment;
2, Call DB_ENV->set_cachesize() to set a memory pool large enough to hold the BDB file;
3, Call DB_MPOOLFILE->open() to open the BDB file in memory pool of that DB environment;
4, Create a DB handle in that DB environment and open the BDB file (again) via this DB handle.
My questions are:
1, Is there a more elegant way instead of using that DB environment? If the DB environment is a must, then:
2, Does step 3 above load the BDB file into memory pool or just reserve enough space for that file?
Thanks in advance,
Feng
Hello,
Does the documentation on "Memory-only or Flash configurations" at:
http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/program_ram.html
answer the question?
From there we have:
By default, databases are periodically flushed from the Berkeley DB memory cache to backing physical files in the filesystem. To keep databases from being written to backing physical files, pass the DB_MPOOL_NOFILE flag to the DB_MPOOLFILE->set_flags() method. This flag implies the application's databases must fit entirely in the Berkeley DB cache, of course. To avoid a database file growing to consume the entire cache, applications can limit the size of individual databases in the cache by calling the DB_MPOOLFILE->set_maxsize() method.
Thanks,
Sandra
Similar Messages
-
How to load a XML file into a table
Hi,
I've been working on Oracle for many years but for the first time I was asked to load a XML file into a table.
As an example, I've found this on the web, but it doesn't work
Can someone tell me why? I hoped this example could help me.
the file acct.xml is this:
<?xml version="1.0"?>
<ACCOUNT_HEADER_ACK>
<HEADER>
<STATUS_CODE>100</STATUS_CODE>
<STATUS_REMARKS>check</STATUS_REMARKS>
</HEADER>
<DETAILS>
<DETAIL>
<SEGMENT_NUMBER>2</SEGMENT_NUMBER>
<REMARKS>rp polytechnic</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>3</SEGMENT_NUMBER>
<REMARKS>rp polytechnic administration</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>4</SEGMENT_NUMBER>
<REMARKS>rp polytechnic finance</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>5</SEGMENT_NUMBER>
<REMARKS>rp polytechnic logistics</REMARKS>
</DETAIL>
</DETAILS>
<HEADER>
<STATUS_CODE>500</STATUS_CODE>
<STATUS_REMARKS>process exception</STATUS_REMARKS>
</HEADER>
<DETAILS>
<DETAIL>
<SEGMENT_NUMBER>20</SEGMENT_NUMBER>
<REMARKS> base polytechnic</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>30</SEGMENT_NUMBER>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>40</SEGMENT_NUMBER>
<REMARKS> base polytechnic finance</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>50</SEGMENT_NUMBER>
<REMARKS> base polytechnic logistics</REMARKS>
</DETAIL>
</DETAILS>
</ACCOUNT_HEADER_ACK>
For the two tags HEADER and DETAILS I have the table:
create table xxrp_acct_details(
status_code number,
status_remarks varchar2(100),
segment_number number,
remarks varchar2(100)
before I've created a
create directory test_dir as 'c:\esterno'; -- where I have my acct.xml
and after, can you give me a script for loading data by using XMLTABLE?
I've tried this but it doesn't work:
DECLARE
acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
BEGIN
insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
select x1.status_code,
x1.status_remarks,
x2.segment_number,
x2.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns header_no for ordinality,
status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'$d/ACCOUNT_HEADER_ACK/DETAILS[$hn]/DETAIL'
passing acct_doc as "d",
x1.header_no as "hn"
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS'
) x2
END;
This should allow me to get something like this:
select * from xxrp_acct_details;
Statuscode status remarks segement remarks
100 check 2 rp polytechnic
100 check 3 rp polytechnic administration
100 check 4 rp polytechnic finance
100 check 5 rp polytechnic logistics
500 process exception 20 base polytechnic
500 process exception 30
500 process exception 40 base polytechnic finance
500 process exception 50 base polytechnic logistics
but I get:
Error report:
ORA-06550: line 19, column 11:
PL/SQL: ORA-00932: inconsistent datatypes: expected - got NUMBER
ORA-06550: line 4, column 2:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
and if I try to change the script without using the column HEADER_NO to keep track of the header rank inside the document:
DECLARE
acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
BEGIN
insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
select x1.status_code,
x1.status_remarks,
x2.segment_number,
x2.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'/ACCOUNT_HEADER_ACK/DETAILS'
passing acct_doc
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS'
) x2
END;
I get this message:
Error report:
ORA-19114: error during parsing the XQuery expression:
ORA-06550: line 1, column 13:
PLS-00201: identifier 'SYS.DBMS_XQUERYINT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
ORA-06512: at line 4
19114. 00000 - "error during parsing the XQuery expression: %s"
*Cause: An error occurred during the parsing of the XQuery expression.
*Action: Check the detailed error message for the possible causes.
My oracle version is 10gR2 Express Edition
I do need a script for loading xml files into a table as soon as possible, Give me please a simple example for understanding and that works on 10gR2 Express Edition
Thanks in advance!The reason your first SQL statement
select x1.status_code,
x1.status_remarks,
x2.segment_number,
x2.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns header_no for ordinality,
status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'$d/ACCOUNT_HEADER_ACK/DETAILS[$hn]/DETAIL'
passing acct_doc as "d",
x1.header_no as "hn"
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS'
) x2
returns the error you noticed
PL/SQL: ORA-00932: inconsistent datatypes: expected - got NUMBER
is because Oracle is expecting XML to be passed in. At the moment I forget if it requires a certain format or not, but it is simply expecting the value to be wrapped in simple XML.
Your query actually runs as is on 11.1 as Oracle changed how that functionality worked when 11.1 was released. Your query runs slowly, but it does run.
As you are dealing with groups, is there any way the input XML can be modified to be like
<ACCOUNT_HEADER_ACK>
<ACCOUNT_GROUP>
<HEADER>....</HEADER>
<DETAILS>....</DETAILS>
</ACCOUNT_GROUP>
<ACCOUNT_GROUP>
<HEADER>....</HEADER>
<DETAILS>....</DETAILS>
</ACCOUNT_GROUP>
</ACCOUNT_HEADER_ACK>
so that it is easier to associate a HEADER/DETAILS combination? If so, it would make parsing the XML much easier.
Assuming the answer is no, here is one hack to accomplish your goal
select x1.status_code,
x1.status_remarks,
x3.segment_number,
x3.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns header_no for ordinality,
status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'$d/ACCOUNT_HEADER_ACK/DETAILS'
passing acct_doc as "d",
columns detail_no for ordinality,
detail_xml xmltype path 'DETAIL'
) x2,
xmltable(
'DETAIL'
passing x2.detail_xml
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS') x3
WHERE x1.header_no = x2.detail_no;
This follows the approach you started with. Table x1 creates a row for each HEADER node and table x2 creates a row for each DETAILS node. It assumes there is always a one and only one association between the two. I use table x3, which is joined to x2, to parse the many DETAIL nodes. The WHERE clause then joins each header row to the corresponding details row and produces the eight rows you are seeking.
There is another approach that I know of, and that would be using XQuery within the XMLTable. It should require using only one XMLTable but I would have to spend some time coming up with that solution and I can't recall whether restrictions exist in 10gR2 Express Edition compared to what can run in 10.2 Enterprise Edition for XQuery. -
How to load a java file into Oracle?
Hello,
I have some problem in loading a java file into Oracle 8i. I used "loadjava -user <userName/Password> -resolve <javaClassName>" command.
JAVA Version used JDK 1.5
When calling this class file from a trigger gives this error
ORA-29541: class ANTONY1.DBTrigger could not be resolved.
Can anyone help me to resolve this problem?Hello,
Which username did you use to load the class, and which user is running the trigger?
The default resolver searches only the current user's schema and PUBLIC so the java class needs to be loaded into one of these.
cheers,
Anthony -
How to load a XML file into a table using PL/SQL
Hi Guru,
I have a requirement, that i have to create a procedure or a package in PL/SQL to load XML file into a table.
How we can achive this.ODI_NewUser wrote:
Hi Guru,
I have a requirement, that i have to create a procedure or a package in PL/SQL to load XML file into a table.
How we can achive this.
Not a perfectly framed question. How do you want to load the XML file? Hoping you want to parse the xml file and load it into a table you can do this.
This is the xml file
karthick% cat emp_details.xml
<?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>09-JUN-1981</HIREDATE>
<SAL>2450</SAL>
<COM>0</COM>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<HIREDATE>17-NOV-1981</HIREDATE>
<SAL>5000</SAL>
<COM>0</COM>
<DEPTNO>10</DEPTNO>
</ROW>
</ROWSET>
You can write a query like this.
SQL> select *
2 from xmltable
3 (
4 '/ROWSET/ROW' passing xmltype
5 (
6 bfilename('SDAARBORDIRLOG', 'emp_details.xml')
7 , nls_charset_id('AL32UTF8')
8 )
9 columns empno number path 'EMPNO'
10 , ename varchar2(6) path 'ENAME'
11 , job varchar2(9) path 'JOB'
12 , mgr number path 'MGR'
13 , hiredate varchar2(20)path 'HIREDATE'
14 , sal number path 'SAL'
15 , com number path 'COM'
16 , deptno number path 'DEPTNO'
17 );
EMPNO ENAME JOB MGR HIREDATE SAL COM DEPTNO
7782 CLARK MANAGER 7839 09-JUN-1981 2450 0 10
7839 KING PRESIDENT 17-NOV-1981 5000 0 10
SQL> -
How to load a XML file into the database
Hi,
I've always only loaded data into the database by using SQL-Loader and the data format was Excel or ASCII
Now I have to load a XML.
How can I do?
The company where I work has Oracle vers. 8i (don't laugh, please)
Thanks in advance!Hi,
Tough job especially if the XML data is complex. The have been some similar question in the forum:
Using SQL Loader to load an XML File -- use 1 field's data for many records
SQL Loader to upload XML file
Hope they help.
Regards,
Sujoy -
How to load excel-csv file into oracle database
Hi
I wanted to load excel file with csv extension(named as trial.csv) into
oracle database table(named as dept),I have given below my experiment here.
I am getting the following error,how should I rectify this?
For ID column I have defined as number(5) datatype, in my control file I have defined as interger external(5),where as in the Error log file why the datatype for ID column is comming as character?
1)my oracle database table is
SQL> desc dept;
Name Null? Type
ID NUMBER(5)
DNAME CHAR(20)
2)my data file is(trial.csv)
ID DNAME
11 production
22 purchase
33 inspection
3)my control file is(trial.ctl)
LOAD DATA
INFILE 'trial.csv'
BADFILE 'trial.bad'
DISCARDFILE 'trial.dsc'
APPEND
INTO TABLE dept
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(ID POSITION(1:5) INTEGER EXTERNAL(5)
NULLIF ID=BLANKS,
DNAME POSITION(6:25) CHAR
NULLIF DNAME=BLANKS
3)my syntax on cmd prompt is
c:\>sqlldr scott/tiger@xxx control=trial.ctl direct=true;
Load completed - logical record count 21.
4)my log file error message is
Column Name Position Len Term Encl Datatype
ID 1:5 5 , O(") CHARACTER
NULL if ID = BLANKS
DNAME 6:25 20 , O(") CHARACTER
NULL if DNAME = BLANKS
Record 1: Rejected - Error on table DEPT, column ID.
ORA-01722: invalid number
Record 21: Rejected - Error on table DEPT, column ID.
ORA-01722: invalid number
Table DEPT:
0 Rows successfully loaded.
21 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Bind array size not used in direct path.
Column array rows : 5000
Stream buffer bytes: 256000
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 21
Total logical records rejected: 21
Total logical records discarded: 0
Total stream buffers loaded by SQL*Loader main thread: 0
Total stream buffers loaded by SQL*Loader load thread: 0
5)Result
SQL> select * from dept;
no rows selected
by
balamuralikrishnan.sHi everyone!
The following are the steps to load a excell sheet to oracle table.i tried to be as simple as possible.
thanks
Step # 1
Prapare a data file (excel sheet) that would be uploaded to oracle table.
"Save As" a excel sheet to ".csv" (comma seperated values) format.
Then save as to " .dat " file.
e.g datafile.bat
1,Category Wise Consumption Summary,Expected Receipts Report
2,Category Wise Receipts Summary,Forecast Detail Report
3,Current Stock List Category Wise,Forecast rule listing
4,Daily Production Report,Freight carrier listing
5,Daily Transactions Report,Inventory Value Report
Step # 2
Prapare a control file that define the data file to be loaded ,columns seperation value,name and type of the table columns to which data is to be loaded.The control file extension should be " .ctl " !
e.g i want to load the data into tasks table ,from the datafile.dat file and having controlfile.ctl control file.
SQL> desc tasks;
Name Null? Type
TASK_ID NOT NULL NUMBER(14)
TASK_NAME VARCHAR2(120)
TASK_CODE VARCHAR2(120)
: controlfile.ctl
LOAD DATA
INFILE 'e:\datafile.dat'
INTO TABLE tasks
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(TASK_ID INTEGER EXTERNAL,
TASK_NAME CHAR,
TASK_CODE CHAR)
The above is the structure for a control file.
Step # 3
the final step is to give the sqlldr command to execute the process.
sqlldr userid=scott/tiger@abc control=e:\controlfile.ctl log=e:\logfile.log
Message was edited by:
user578762 -
How to load hierarchy from file into InfoObject with compounding Attr & LN
Hi,
I have created an InfoObject called YCOSTC0 which has a compounding attribute 0CO_AREA. and Text is Lanugage dependent, hence the key is YCOSTC0, 0CO_AREA and LANGUAGE, now when i load hierarchy from flat file as mentioned below, it creates duplicate blank rows in master data table, becuase the flat file contains only the YCOSTC0 Info Object and this data gets loaded into 0CO_AREA column in master data table which is the first column. how can i load hierarchies from flat file into an InfoObject that has a compounding attribute and Language dependent. please provide me a sample file structure with data.
NodeID InfoObject Node Name Link Name Parent ID Language Short Text Medium Text Long Text
1 0HIER_NODE CC_HIER EN Cost Center Heirarchy Cost Center Heirarchy Cost Center Heirarchy
2 YCOSTC0 C001 1 EN CC 1 Cost Center 1 Cost Center 1
3 YCOSTC0 C002 2 EN CC 2 Cost Center 2 Cost Center 2
4 YCOSTC0 C003 2 EN CC 3 Cost Center 3 Cost Center 3
5 YCOSTC0 C004 3 EN CC 4 Cost Center 4 Cost Center 4
6 YCOSTC0 C005 3 EN CC 7 Cost Center 7 Cost Center 7
7 YCOSTC0 C006 4 EN CC 5 Cost Center 5 Cost Center 5
8 YCOSTC0 C007 4 EN CC 8 Cost Center 8 Cost Center 8
9 YCOSTC0 C008 4 EN CC 10 Cost Center 10 Cost Center 10
10 YCOSTC0 C009 7 EN CC 6 Cost Center 6 Cost Center 6
11 YCOSTC0 C010 6 EN CC 9 Cost Center 9 Cost Center 9
Thanks
Akila RHi -
Check the following link.
Hierarchy Upload from Flat files
Anesh B -
How to load a txt file into a table
Hi,
I have a txt file
3 sample records:
25 fff fff 2012-03-08 13:42:31.0 2012-03-15 14:58:31.0
26 ooo ooo null null
27 ooo ooo 2012-03-22 10:39:49.0 null
I have problems with the nulls:
my ctl is like that:
load data
append
into table table_name
fields terminated by '\t'
OPTIONALLY ENCLOSED BY '"' AND '"'
trailing nullcols
( ID CHAR(4000),
LITERAL CHAR(4000),
DESCRIPTION_WEB CHAR(4000),
FECHAALTA TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF1",
FECHAMODIFICACION TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF1"
I get the following error because of the null:
Record 2: Rejected - Error on table MKT_WEB, column FECHAALTA.
ORA-26041: DATETIME/INTERVAL datatype conversion error
The table in the database:
ID NUMBER(10,0)
LITERAL VARCHAR2(40 CHAR)
DESCRIPTION VARCHAR2(255 CHAR)
FECHAALTA TIMESTAMP(0)
FECHAMODIFICACION TIMESTAMP(0)
How can I say to the CTL about the nulls?
Thanks in advanceTry external table
-
How to Load a wav file into a JFrame
Ok, I have a JFrame with a JPanel and JButtons, play, pause, stop....etc...I have a menu with items load song and exit. Now when you click file load song, it pops up a JFileChooser.....that all works fine. Now I want to be able to select a wav file from that file chooser and have it load into the JFrame, displaying the name of the song in the JPanel...as a JLabel or whatever. Also how can I make the buttons, play pause stop, etc. work with the song. I.E. when i press play, the song plays, stop the song stops...any ideas?
Create a JLabel with the filename as its text. Add the JLabel onto your JPanel. Add the JPanel
onto the JFrame. Call setVisible(true) on the JFrame. For Java GUI basics, study:
http://java.sun.com/docs/books/tutorial/uiswing/index.html
For wav file playing:
String filename = "foo.wav";
java.applet.AudioClip clip
= java.applet.Applet.newAudioClip(new File(filename).toURI().toURL());
clip.play(); -
How to Load a Flat File into BW-BPS Using a Web Browser
Hello,
I'm using the upload functionality described in the how to guide.
When we want to have this functionality available for 12 different Planning levels. Do I have to create the Web Interface (as described in the how to guide) for each Planning Level separately, or can i pass a parameter in the URL (wenn calling the File Upload functionality) to determine which Planning level and Function it is.
This pice of coding i want to have a bit more flexible
*Execute planning function
CALL FUNCTION 'API_SEMBPS_FUNCTION_EXECUTE'
EXPORTING
i_area = 'ZIPM0001' " <<<< ADJUST
i_plevel = 'ZCAPB006' " <<<< ADJUST
i_package = '0-ADHOC' " <<<< ADJUST
i_function = 'ZEX00001' " <<<< ADJUST
i_param = 'Z0000001' " <<<< ADJUST
IMPORTING
e_subrc = l_subrc
TABLES
etk_return = lt_bapiret.
Does someone have an idea ?
Thank you
DieterHi Dieter,
you should be able to grab the variable value by the following statement (e.g. in this case 'area' is being passed along, works for whatever you want to send) is:
data: l_area type upc_y_area.
l_area = request->get_form_field( 'area' ).
in this case the calling URL looks like:
<normal URL>?area=example_area
example_area will then contain your value.
Then depending on the value execute your different SEM functions
Note that if you want to load different flatfile formats, more has to change in the functions as indicated in the white paper,
Hope it helps,
Regards,
MArc
I got it from the following document I found on SAPNet or SDN (forgot..) some time back:
How To Call a BPS Web Interface with Predefined Selections -
How to load a flat file into BW-BPS using Web Browser
Hello, i have a problem with the "How to do Paper". I want to upload a Excel CSV file , but the paper only describes a txt file Uplaod. Does anybody can help me ?Thanks !
You need to parse the line coming in from the flat file...
You can do this with generic types in your flat file structure (string).
Then you loop through the table of strings that is your flat file and parse the string so that it breaks up the line for each comma. There is an ABAP command called: SPLIT - syntax is as follows:
SPLIT dobj AT sep INTO
{ {result1 result2 ...} | {TABLE result_tab} }
[IN {BYTE|CHARACTER} MODE].
Regards,
Zane -
How to load multiple CSV files into oracle in one go.
Hi,
I have project requirement like: I'll be getting one csv file as one record for the source table.
So i need to know is there any way by which I can load multiple csv in one go. I have searched a lot on net about external table.(but problem is I can only use one consolidate csv at a time)
and UTL_FILE same thing consolidate file is required here to load.
but in my scenario I'll have (1000+) csv files(as records) for the table and it'd be hectic thing to open each csv file,copy the record in it and paste in other file to make consolidate one.
Please help me ..it's very new thing for me...I have used external table for , one csv file in past but here I have to user many file.
Table description given below.
desc td_region_position
POSITION_KEY NUMBER Primary key
POSITION_NAME VARCHAR2(20)
CHANNEL VARCHAR2(20)
LEVEL VARCHAR2(20)
IS_PARTNER CHAR(1)
MARKET_CODE VARCHAR2(20)
CSV file example:
POSITION_KEY|POSITION_NAME|CHANNEL|LEVEL|IS_PARTNER|MARKET_CODE
123002$$FLSM$$Sales$$Middle$$Y$$MDM2203
delimeter is -- $$my database version as follows:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
"CORE 10.2.0.5.0 Production"
TNS for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Productio
NLSRTL Version 10.2.0.5.0 - ProductionEdited by: 974253 on Dec 10, 2012 9:58 AMif your csv files have some mask, say "mask*.csv" or by file "mask1.csv" and "mask2.csv" and ...
you can create this.bat file
FOR %%c in (C:\tmp\loader\mask*.csv) DO (
c:\oracle\db\dbhome_1\BIN\sqlldr <user>@<sid>l/<password> control=C:\tmp\loader\loader.ctl data=%%c
)and C:\tmp\loader\loader.ctl is
OPTIONS (ERRORS=0,SKIP=1)
LOAD DATA
APPEND
INTO TABLE scott.td_region_position
FIELDS TERMINATED BY '$$' TRAILING NULLCOLS
( POSITION_KEY,
POSITION_NAME ,
CHANNEL,
LVL,
IS_PARTNER,
MARKET_CODE
)test
C:\Documents and Settings\and>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 10 11:03:47 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from td_region_position;
no rows selected
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:\Documents and Settings\and>cd C:\tmp\loader
C:\tmp\loader>dir
Volume in drive C has no label.
Volume Serial Number is F87F-9154
Directory of C:\tmp\loader
12/10/2012 10:51 AM <DIR> .
12/10/2012 10:51 AM <DIR> ..
12/10/2012 10:55 AM 226 loader.ctl
12/10/2012 10:38 AM 104 mask1.csv
12/10/2012 10:39 AM 108 mask2.csv
12/10/2012 10:57 AM 151 this.bat
4 File(s) 589 bytes
2 Dir(s) 4,523,450,368 bytes free
C:\tmp\loader>this.bat
C:\tmp\loader>FOR %c in (C:\tmp\loader\mask*.csv) DO (c:\oracle\db\dbhome_1\BIN\
sqlldr user@orcl/password control=C:\tmp\loader\loader.ctl data=%c )
C:\tmp\loader>(c:\oracle\db\dbhome_1\BIN\sqlldr user@orcl/password control=C
:\tmp\loader\loader.ctl data=C:\tmp\loader\mask1.csv )
SQL*Loader: Release 11.2.0.1.0 - Production on Mon Dec 10 11:04:27 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
C:\tmp\loader>(c:\oracle\db\dbhome_1\BIN\sqlldr user@orcl/password control=C
:\tmp\loader\loader.ctl data=C:\tmp\loader\mask2.csv )
SQL*Loader: Release 11.2.0.1.0 - Production on Mon Dec 10 11:04:28 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
C:\tmp\loader>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 10 11:04:46 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from td_region_position;
POSITION_KEY POSITION_NAME CHANNEL LVL I
MARKET_CODE
123002 FLSM Sales Middle Y
MDM2203
123003 FLSM1 Sa2les M2iddle Y
MDM22203
SQL> -
How to load external text file into a Form?
Hi,
I made a menu with 1-5 in a Form and 5 external text files. I want the user who is able to view the text content of the text file when he chooses one of them from the menu. And the text file screen has a "Back" command button to let him go back.
How can I do it and can it support other languages such as Chinese and Japanese?
Thanks for help.
gogoSorry, I made the mistake about the subject, it should be loading local file, not external file through http.
I wrote a method but it throwed an exception when the midlet was run.
private void loadText()
try {
InputStream is = this.getClass().getResourceAsStream("/text.txt");
StringBuffer sb = new StringBuffer();
int chr;
while ((chr = is.read()) != -1)
sb.append((char) chr);
is.close();
catch (Exception e)
System.out.println("Error occurs while reading file");
I put the text.txt file in the same folder with the main file (extends midlet). How can I load the text content and display it on StringItem?
Thanks for any help.
gogo -
How to load word .doc-files into java applications?
Hi,
I want to load a word .doc-file (or any other type of document) into a java application, as part of the application.
Is there any java special library to do it?
Any solution or hint?
Thank you.No, there is no existing Java library to do it that I am aware of. You could write your own, however, as the Word 97 binary file format is published. I am not sure that the Word 2000, or XP formats are as well, but since they put out the 97 presumably they'd do the same with the rest -- although I am suprised that Micro$$$oft even published the 97 format.
A library such as this would take quite some time write, due to the extensive format, but here's a link to a copy of it just so you can see what it'd take: http://www.redbrick.dcu.ie/~bob/Tech/wword8.html
Also keep in mind that Micro$$$oft has never remained binary compatable between versions. In short, this means that you'd have to parse each version's documents differently. Not a fun task.
If a Java library to read Micro$$$oft file formats already does exist, I'm willing to bet that it costs $$$ mucho dinero $$$.
Hey, aren't proprietary file formats just wonderful? -
How to load local html-file into webBrowser tool? [SDK 6.5]
The webbroser tool lets you load an external html by inputting the adress in its "Url"-property.
But how do you load a local html-file that is added to your project? Lets say the path is: Folder1/Subfolder1/Webpage1.html. What would I put in the Url-property to make this work?
While on this subject, what is the support for css and javascript when using locally loaded webpages in the webbrowser?Thanks for the answer Malleswar, but I have now played around with all variations of that code-line that I can think of, but still I can not locate the html-file that is located within the project. Since Im planning to distribute the html-files with the executable (as one file) it should read it directly from wherever the application is installed.
The html-file is included within the project. Solution Explorer -> Solution 'myProject' -> myProject -> Webpage1.html
Which is (as usual) also where the Form1.cs (which contains the webBrowser-component) is located.
Any ideas of how the Uri should be constructed in this case?
Thanks,
Daniel
Maybe you are looking for
-
How to create a new facebook account in iphoto?
How to create a new facebook account in iphoto?
-
How do i load the music from my ipod onto a new computer without the old computer
my ipod has music on it from another computer that died and i just downloaded itunes on my new computer, how do i put new songs on my ipod without erasing all the music already on it?
-
Hi I have configured alerts for a BPM Scenario. I have enabled the dynamic text . I am able to see the alert in the Alert inbox, But in the long text it shows only one character. I am working in XI 7.0 SP level 8. What could be the problem. With r
-
Has anyone tried iUsers for sharing an iPad?
Trying to figure out the best way for my wife and I to share an iPad. There is a free download called iUsers that seems to have the right functionality, but the user reviews are from mid-2011 when it was still in Beta. Has anyone tried this more rec
-
No communication between applet - servlet
hi my applet and my servlet is not at all communicating in the browser. any body knows how to solve this problem? in my applet code:Jus i am pasing as name string to invoke the serlvet via URL String location = "http://c