Problem in dbms_datapump execution
hello ...
I want to create one procedure that export my database using DBMS_DATAPUMP, But I got Error in DBMS_DATAPUMP.ADD_FILE method.
The procedure is as below:
CREATE OR REPLACE PROCEDURE sp_export AS
idx NUMBER; -- Loop index
JobHandle NUMBER; -- Data Pump job handle
PctComplete NUMBER; -- Percentage of job complete
JobState VARCHAR2(30); -- To keep track of job state
LogEntry ku$_LogEntry; -- For WIP and error messages
JobStatus ku$_JobStatus; -- The job status from get_status
Status ku$_Status; -- The status object returned by get_status
BEGIN
-- Build a handle for the export job
JobHandle :=
DBMS_DATAPUMP.OPEN(
operation => 'EXPORT'
,job_mode => 'SCHEMA'
,remote_link => NULL
,job_name => 'PratikTABLES'
,version => 'LATEST'
-- Using the job handle value obtained, specify multiple dump files for the job
-- and the directory to which the dump files should be written. Note that the
-- directory object must already exist and the user account running the job must
-- have WRITE access permissions to the directory
DBMS_DATAPUMP.ADD_FILE(
handle => JobHandle
,filename => 'PratikTABLES.DMP'
,directory => 'testdir'
,filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE
,filesize => '100M'
DBMS_DATAPUMP.ADD_FILE(
handle => JobHandle
,filename => 'pratikTABLES.log'
,directory => 'testdir'
,filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE
-- Apply a metadata filter to restrict the DataPump Export job to only return
-- selected tables and their dependent objects from the SH schema
DBMS_DATAPUMP.METADATA_FILTER(
handle => JobHandle
,NAME => 'SCHEMA_EXPR'
,VALUE => 'IN (''pratik'')'
,object_type => 'TABLE'
-- Initiate the DataPump Export job
DBMS_DATAPUMP.START_JOB(JobHandle);
-- If no exception has been returned when the job was initiated, this loop will
-- keep track of the job and return progress information until the job is done
PctComplete := 0;
JobState := 'UNDEFINED';
WHILE(JobState != 'COMPLETED') and (JobState != 'STOPPED')
LOOP
DBMS_DATAPUMP.GET_STATUS(
handle => JobHandle
,mask => 15 --DBMS_DATAPUMP.ku$_status_job_error+DBMS_DATAPUMP.ku$_status_job_status + DBMS_DATAPUMP.ku$_status_wip
,timeout => NULL
,job_state => JobState
,status => Status
JobStatus := Status.job_status;
-- Whenever the PctComplete value has changed, display it
IF JobStatus.percent_done != PctComplete THEN
DBMS_OUTPUT.PUT_LINE('*** Job percent done = ' || TO_CHAR(JobStatus.percent_done));
PctComplete := JobStatus.percent_done;
END IF;
-- Whenever a work-in progress message or error message arises, display it
IF (BITAND(Status.mask,DBMS_DATAPUMP.ku$_status_wip) != 0) THEN
LogEntry := Status.wip;
ELSE
IF (BITAND(Status.mask,DBMS_DATAPUMP.ku$_status_job_error) != 0) THEN
LogEntry := Status.error;
ELSE
LogEntry := NULL;
END IF;
END IF;
IF LogEntry IS NOT NULL THEN
idx := LogEntry.FIRST;
WHILE idx IS NOT NULL
LOOP
DBMS_OUTPUT.PUT_LINE(LogEntry(idx).LogText);
idx := LogEntry.NEXT(idx);
END LOOP;
END IF;
END LOOP;
-- Successful DataPump Export job completion, so detach from the job
DBMS_OUTPUT.PUT_LINE('Job has completed');
DBMS_OUTPUT.PUT_LINE('Final job state = ' || JobState);
DBMS_DATAPUMP.DETACH(JobHandle);
END sp_export;
Error is:-
ERROR at line 1:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 2926
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3162
ORA-06512: at "SYS.SP_EXPORT", line 29
ORA-06512: at line 1
here is the annonymous block that i tried but now i got the error of "job does not exist"
here is the block
declare
jobhandle number;
begin
JobHandle :=
DBMS_DATAPUMP.OPEN(
operation => 'EXPORT'
,job_mode => 'SCHEMA'
,remote_link => NULL
,job_name => 'PratikTABLES10'
,version => 'LATEST'
DBMS_DATAPUMP.ADD_FILE(
JOBHANDLE,
'18MAY',
'WORKDIR',
NULL,
1) ;
DBMS_DATAPUMP.ADD_FILE(
JOBHANDLE,
'18MAYLOG',
'TESTDIR',
NULL,
3) ;
DBMS_DATAPUMP.METADATA_FILTER(
handle => JobHandle
,NAME => 'SCHEMA_FILTER'
,VALUE => 'IN (''pratik'')'
,object_type => 'TABLE'
DBMS_DATAPUMP.START_JOB(JobHandle);
end;
Thanks...
Message was edited by:
Pratik Brahmbhatt
Similar Messages
-
Apex 4 , problem with collection executions
Hi ,
I am having the following problem with the execution of one collection :
Reference thread : Re: APEX 4 , executing a remote procedure and populating data using collection
DBNAME ---> list item which I build from the DB links which I built ( as dynamic query in the shared components from a local table which holds entries of dblink names )
USERLIST --> list item of users which should display dynamicaly the users of that db link I choose in DBNAME ( based on a collection )
buttons CANCEL and SUBMIT
4- Initial COLLECTION page process which is calculated before Header :
DECLARE
q varchar2(4000);
BEGIN
IF APEX_COLLECTION.COLLECTION_EXISTS(P_COLLECTION_NAME => 'QRY1') THEN
APEX_COLLECTION.DELETE_COLLECTION(P_COLLECTION_NAME => 'QRY1');
END IF;
q := 'SELECT username , username FROM sys.dba_users@'||:P23_DBNAME ;
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
P_COLLECTION_NAME => 'QRY1',
P_QUERY => Q);
END;
For USERLIST list item I am using the following in LIST OF VALUES DEFINITION :
SELECT C001, C002 FROM APEX_COLLECTIONS WHERE COLLECTION_NAME='QRY1'
5 - to submit the values from the screen to the remote database procedure I am using the following submit process ON SUBMIT AFTER CALCULATIONS:
DECLARE
v_statement varchar2(255);
BEGIN
v_statement := 'begin
Lock_User@&P24_DBNAME.(''&P24_USERLIST.'');
insert into log values (1,''user locked'') ;
commit ;
end;';
EXECUTE IMMEDIATE v_statement;
END;
The problem :
The form runs sucessfully , where I the USERLIST changes dynamicaly when I change the DBNAME values , but as soon as I logout and login with another user1 , the collection does not execute and i get "ORA-01729: database link name expected".
I login with user1 in edit mode and recreate the collection , run again , the collection executes successfuly .
If I create a new user2 ( using the sample application pages ) and login with the new user2 , i have the same problem , thus I ho login with user2 in edit mode and try to run the collection .
How can I control the collection to execute regardless of the application user logged in ??
thanks in advance
yousefHi ,
I am having the following problem with the execution of one collection :
Reference thread : Re: APEX 4 , executing a remote procedure and populating data using collection
DBNAME ---> list item which I build from the DB links which I built ( as dynamic query in the shared components from a local table which holds entries of dblink names )
USERLIST --> list item of users which should display dynamicaly the users of that db link I choose in DBNAME ( based on a collection )
buttons CANCEL and SUBMIT
4- Initial COLLECTION page process which is calculated before Header :
DECLARE
q varchar2(4000);
BEGIN
IF APEX_COLLECTION.COLLECTION_EXISTS(P_COLLECTION_NAME => 'QRY1') THEN
APEX_COLLECTION.DELETE_COLLECTION(P_COLLECTION_NAME => 'QRY1');
END IF;
q := 'SELECT username , username FROM sys.dba_users@'||:P23_DBNAME ;
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
P_COLLECTION_NAME => 'QRY1',
P_QUERY => Q);
END;
For USERLIST list item I am using the following in LIST OF VALUES DEFINITION :
SELECT C001, C002 FROM APEX_COLLECTIONS WHERE COLLECTION_NAME='QRY1'
5 - to submit the values from the screen to the remote database procedure I am using the following submit process ON SUBMIT AFTER CALCULATIONS:
DECLARE
v_statement varchar2(255);
BEGIN
v_statement := 'begin
Lock_User@&P24_DBNAME.(''&P24_USERLIST.'');
insert into log values (1,''user locked'') ;
commit ;
end;';
EXECUTE IMMEDIATE v_statement;
END;
The problem :
The form runs sucessfully , where I the USERLIST changes dynamicaly when I change the DBNAME values , but as soon as I logout and login with another user1 , the collection does not execute and i get "ORA-01729: database link name expected".
I login with user1 in edit mode and recreate the collection , run again , the collection executes successfuly .
If I create a new user2 ( using the sample application pages ) and login with the new user2 , i have the same problem , thus I ho login with user2 in edit mode and try to run the collection .
How can I control the collection to execute regardless of the application user logged in ??
thanks in advance
yousef -
Problem with slow execution on a cFP-2120
I have an application that runs on a cFP-2120, using web interface for the user to interact with the program.
I have noticed that in order to get the web interface to get updated I have to use property nodes and write to the value property, see this article:
http://digital.ni.com/public.nsf/allkb/FC5024A5DD6344C886256C8C0054689B?OpenDocument
However, this seems to give me a serious performance hit, as described here:
http://forums.ni.com/ni/board/message?board.id=170&thread.id=153531&view=by_date_ascending&page=1
I have tested with this code, and with my LV 8.2 a loop that uses 277ms to complete when writing directly to a indicator will use 203159ms when using a property node.
So, I need to update several front panel objects using the value property, but can't afford the cpu time. Does anyone have a suggestion how to do this as efficiently as possible? The problem is apparantly that using the value property requires the front panel to be loaded - can I for instance avoid doing this once for each variable?I've changed the vi now so it only writes to value property when a value has changed. This has cut execution time in half, from 500ms to 250ms. I still think this is quite a lot...
To give you an indication of "size", the executeable is 1210kb with 2 dll's of 872 and 168kb.
I've not tried deploying a smaller (cut down?) version - what exactly do you mean?
With regards to writing to value instead of locals or directly - I've had problems with the values not updating - but not always - and the first link does suggest a bugfix. I'd like to know why wiring to value property is sometimes needed and sometimes not. -
Strange problem in report Execution in test system
Hi,
As something strange going on my program in test system.
1) Executing the program in Development system using SE38->program name->F8. the program executes and display selection screen fraction of seconds.
issue:
When i am doing same process in TEST System(using SE38->program name->F8) the execution process is min 1 or 2 min , then i am gettign the Selection screen.
I have checked other programs in TEST System but it doesnu2019t happen to any other programs on TEST system.
Program functionality--
i am using 2 table and MARA and Z table, Using Selection screen i am extracting the data into output screen and excel download
Dispaly
1)if user select the Radio button output to screen in selection screen
Display data into screen using some color formatted
2)if user select the Radio button output to file in selection screen
I am using OLE Automation Controller to get the Output excel download some color formatted data
please let me know how to rsolve this type of isssue in Test system...
plz respond when you find the time.
Regards,
AS
Moderator Message: Urgency downgraded.
Edited by: kishan P on Apr 13, 2011 11:59 AMYes ..
INITIALIZATION. Event i have written code like free the objects ans clear Work Area and Refresh the Internal tables
And
*-to highlight the comments on selection-screen
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'RM1'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Add entries to get the search help values
PERFORM SEARCHELP_REGION.
PERFORM SEARCHELP_COUNTRY.
At selection screen event i am getting the search help for the region and country
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_REGN-LOW.
*Search help for Region
PERFORM SEARCHHELP_REGN_F4.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CTRY-LOW.
*Search help for Country
PERFORM SEARCHHELP_CTRY_F4.
using FM :*FM for F4 help for returning the value to be displayed
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
Please let me know is it couse problem in TEST System....
so how to resolve the issue...
Regards,
SR -
Business Rule - Problem with Validation Execution
I'm running into an issue where conditional Validation Execution is not working as expected. The background is that i have an Entity Object containing a few string attributes on which i must apply Regular Expression business rules to make sure only characters in a certain range is set. I am using a Not Matches regex on the following:
.*[^\u0020-\uD7FF].*1 attribute is required, 2 are optional. The problem I am experiencing is with the 2 optional attributes.
Since these are optional, I intended to use the Validation Execution tab so that the Rule is executed only when the attribute is not null. For example, here is what i tried for an attribute named Comments:
Comments != nullNo validation occurred when I entered an invalid value, such as a string containing line breaks, in a corresponding ADF Faces page. For the heck of it, i experimented by setting the validation execution to the opposite of what i should be - in other words, trigger validation if the attribute is null, such as:
Comments == nullWith this, the validation occurred as expected.
Is this a bug, or am I misunderstanding something? I'm not particularly good with RegEx - is it possible this is due to some nuance of the expression?
Version: JDeveloper 11.1.1.6.
Thanks-
-georgei'm not sure if this is the correct answer or a workaround to the issue i had asked about. Given that caveat, if anyone else ever runs across this thread, what i found worked was to not use the attribute name in the Validation Execution tab's expression, but instead to just newValue as in the following:
newValue != null -
Problem with different execution paths in hierarchical query
Hello,
I have problems with the following query:
SELECT DISTINCT P.ID FROM PRODUCTELEMENTIMPL P WHERE ( ( LABEL = 'SomeLabel' AND PRODUCTELEMENTTYPE = 'SomeText' AND ( STATE = 'created' OR STATE = 'stored' OR STATE = 'archived' OR STATE = 'archivedRestored' ) ) ) START WITH P.ID = 42 CONNECT BY PRIOR P.ID = P.PARENT
We have two databases (an Oracle 10g XE and Oracle10g Enterprise). In the XE Database the query is executed very fast, but in the main installation it takes minutes. If I "explain" the query I get two different execution paths:
The fast:
ID PARENT_ID LEVEL SQL Kosten Anzahl Zeilen
0 - 1 SELECT STATEMENT 20 49
1 0 2 HASH UNIQUE 20 49
2 1 3 FILTER - -
3 2 4 CONNECT BY WITH FILTERING - -
4 3 5 TABLE ACCESS BY INDEX ROWID PRODUCTELEMENTIMPL (TABLE) - -
5 4 6 INDEX UNIQUE SCAN SYS_C0072201 (INDEX (UNIQUE)) 2 1
6 3 5 NESTED LOOPS - -
7 6 6 BUFFER SORT - -
8 7 7 CONNECT BY PUMP - -
9 6 6 TABLE ACCESS BY INDEX ROWID PRODUCTELEMENTIMPL (TABLE) 19 49
10 9 7 INDEX RANGE SCAN PRODUCTELEMENTIMPL_IDX1 (INDEX) 3 49
11 3 5 TABLE ACCESS FULL PRODUCTELEMENTIMPL (TABLE) 19 49
Slow:
ID PARENT_ID LEVEL SQL Kosten Anzahl Zeilen
0 1 SELECT STATEMENT 1 1
1 0 2 HASH UNIQUE 1 1
2 1 3 FILTER
3 2 4 CONNECT BY WITHOUT FILTERING
4 3 5 TABLE ACCESS BY INDEX ROW 3 1
ID PRODUCTELEMENTIMPL (TABLE)
5 4 6 INDEX UNIQUE SCAN SYS_C0 2 1
020528 (INDEX (UNIQUE))
6 3 5 TABLE ACCESS FULL PRODUCT 6628 1100613
ELEMENTIMPL (TABLE)
Any ideas how to avoid this full table scan?
bye
Roland SpatzeneggerHello,
thank you for your replies. The indices and table schemas are the "same", but only the content for the tables was mirrored.
We made some tests with dropping and/or analyzing the tables, but it didn't change anything.
The main problem is that the query takes 33s in the productive environment for searching in a couple of rows. At the moment it's faster to make
SELECT DISTINCT P.ID, P.STATE FROM PRODUCTELEMENTIMPL P WHERE ( ( LABEL = 'SomeLabel' AND PRODUCTELEMENTTYPE = 'SomeText' ) ) START WITH P.ID = 42 CONNECT BY PRIOR P.ID = P.PARENT
and to test in the application if the state-values match ;-)
If I add the hint /*+ no_filtering */ in the test environment, I get the same "slow" execution path as in the production environment. So the question is, what prevents the filtering in "connect by"?
(I think in the fast version it filters only the results of the hierarchical query, in the slow version it first filters the whole table and joins/merge it with the hierachical result).
bye
Roland Spatzenegger -
Problems with dbms_datapump.get_status
Hi Forum,
i try to build a tool for extracting a subset of our ERP - DB via dbms_datapump.
We use Oracle 11gR2 on Linux.
Works fine, but there is one thing, which is annoying.
The subset is defined by the number of a branch. One can configure, which branch is getting exported. This configuration triggers dbms_datapump.data_filter with the SUBQUERY Parameter for the different tables where branch is a column.
Because of the configurable branches, each export dump can be a dump with different branches, so i wish to put the where clauses into some logging files or to the prompt or whereever.
The dbms_datapump.get_status should give me a proper job description with the following call:
DBMS_DATAPUMP.GET_STATUS (
handle => v_handle,
mask => DBMS_DATAPUMP.KU$_STATUS_JOB_DESC,
TIMEOUT => 60,
job_state => v_job_status,
status => t_o_status
);The documentation says, DBMS_DATAPUMP.KU$_STATUS_JOB_DESC is a constant which put the job description into t_o_status, my variable based on ku$_status.
So, i declared the following:
--Table-Objects
t_o_status ku$_status;
t_o_description ku$_jobdesc;
t_o_job_status ku$_jobstatus;
t_o_logentry ku$_logentry;
t_o_param_values ku$_paramvalues;
--Record-Objects
r_o_param ku$_paramvalue;So, the following piece of Code should put the values from the above call of get_status into my variables.
if t_o_status is not null then
t_o_description := t_o_status.job_description;
IF t_o_description IS NOT NULL THEN
--Debug Output
dbms_output.put_line(t_o_description.job_name);
dbms_output.put_line(t_o_description.log_file);
t_o_param_values := t_o_description.params;
IF t_o_description.params IS NOT NULL THEN
--Debug Output
dbms_output.put_line('param_values is not null');
FOR i IN t_o_param_values.FIRST .. t_o_param_values.LAST
loop
dbms_output.put_line(t_o_param_values(i).param_name||' '||t_o_param_values(i).param_value_t);
END loop;
ELSE
--Debug Output
dbms_output.put_line('param_values is null');
END IF;
END IF;
end if;All i got is
HAUS_EXPORT
/tmp/HAUS_export.log
param_values is nullSo, ku$_paramvalues.params seems to be null, but ku$_paramvalues.job_name is filled with a proper value.
Is this normal behavior? Or do i something wrong?
Here is the link to the documentation of the different types coming with dbms_datapump: http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_datpmp.htm#BABCAJEB
Thx in advance.
JoergAdding the following before the BAPI call seems to have fixed the problem.
CALL FUNCTION 'BAPI_PS_INITIALIZATION' .
Regards,
Steve -
Problem in VO execution----Please help me urgent
Hi,
I have One region(ASNOpptyReviewRN).this region is a tab in the main page(OpptyPG).For the region i am using one VO(OppReviewVO).
When i came to this page i am writing the code in the process request to execute the VO based on the condition..so i can get the data on the page.
First time VO is getting executed and data is coming in the page.if there is no data then i have the requirement to insert or update the fields in the region.
So everything is working fine first time..or if i not insert anything new row...it is working fine all the time.
But the problem is...after insert a new row and if i come to home page(not OpptyPG) and if i go to the ASNOpptyReviewRN the vo is getting executed but it is not showing the data on the page..
This is happenig only when i insert a new row and i come back to that page..
Please Help me..its urgent.. i am pasting the Processrequest and Amimpl code here...
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am=pageContext.getApplicationModule(webBean);
String BidNumber=(String)pageContext.getTransactionTransientValue("ASNOpptyDetNbr");
String reviewdBy=pageContext.getParameter("ReviewedBy");
String reviewdDate=pageContext.getParameter("ReviewedDate");
String versionNum=pageContext.getParameter("VersionNumber");
String effortWithoutCont=pageContext.getParameter("EffortWithoutContingency");
String contEffort=pageContext.getParameter("ContingencyEffort");
String reviewFlag=pageContext.getParameter("ReviewFlag");
String expiryDate=pageContext.getParameter("ExpiryDate");
String comments=pageContext.getParameter("Comments");
Serializable[] parameters={BidNumber,reviewdBy,reviewdDate,versionNum,effortWithoutCont,contEffort,reviewFlag,expiryDate,comments};
pageContext.writeDiagnostics(this, "Inside ifff Bharat", 1);
am.invokeMethod("insertBidReviewRow",parameters);
and the method in the am is
public void insertBidReviewRow(String BidNumber,String reviewdBy,String reviewdDate,String versionNum,String effortWithoutCont,String contEffort,String reviewFlag,String expiryDate,String comments) throws SQLException,
ParseException
String msg1="Hi i am inside bidreview"+BidNumber+reviewdBy+reviewdDate+versionNum+effortWithoutCont+contEffort+reviewFlag+expiryDate+comments;
logMessages(msg1);
Number bidnum=new Number(BidNumber);
OpportunityBidReviewVOImpl vo;
vo = getOpportunityBidReviewVO1();
vo.setWhereClause(null);
vo.setWhereClauseParams(null);
vo.setWhereClause("BID_ID=:1");
vo.setWhereClauseParam(0,bidnum);
vo.executeQuery();
int rowCount=vo.getRowCount();
String msg8="Hi no of row count:-.."+":-- "+rowCount;
logMessages(msg8);
if(rowCount==0)
String msg2="Hi iam inside bidreview:- Before fetch...";
logMessages(msg2);
vo.setMaxFetchSize(0);
Row row=vo.createRow();
String msg3="Hi iam inside bidreview:- After create....";
logMessages(msg3);
vo.insertRow(row);
String msg4="Hi iam inside bidreview:- insert row....";
logMessages(msg4);
row.setNewRowState(Row.STATUS_INITIALIZED);
vo.setCurrentRow(row);
String msg5="Hi iam inside bidreview:- insert row....";
logMessages(msg5);
OpportunityBidReviewVORowImpl opptybidreviewVo = (OpportunityBidReviewVORowImpl)vo.getCurrentRow();
opptybidreviewVo.setBidId(bidnum);
opptybidreviewVo.setReviewedBy(reviewdBy);
//opptybidreviewVo.setReviewedDate(reviewdate);
opptybidreviewVo.setVersionNumber(versionNum);
opptybidreviewVo.setEffortWithoutContingency(effortWithoutCont);
opptybidreviewVo.setContingencyEffort(contEffort);
opptybidreviewVo.setReviewFlag(reviewFlag);
//opptybidreviewVo.setExpiryDate(expirydate);
opptybidreviewVo.setComments(comments);
String msg6="Hi iam inside bidreview:- after all....";
logMessages(msg6);
String msg7="vo is cleared";
logMessages(msg7);
else
String msg7="Hi iam inside bidreview:- already existing.....";
logMessages(msg7);
Thanks in advance
Edited by: 842238 on Jul 1, 2011 7:07 AMHi Kristoper,
No..that Vo is based on some EO..why i am using the row.setAttribute() is...the bid number is coming from some other page...and i need to insert it in table..
and except the bid number..other values are coming from the page...
Thank you -
I am using batch execution for inserting records in a table.
My code is as follows
// set Batch size to 1
for (i = 0; i < 23; i++) {
// set first & second columns to some value
ps.setInt(1,j);
ps.setString(2,"cat");
// execute batch
rowsInserted = ps.executeUpdate();
// send last batch (if any)
rowsInserted = ((OraclePreparedStatement)ps).sendBatch ();
// set first & second columns to some value
ps.setInt(1,100);
ps.setString(2,"dog");
// execute batch
rowsInserted = ps.executeUpdate();
Here total 25 rows were inserted.
23 rows from the loop.
remaining two rows has the same value (100,"dog")
I was expecting 24 rows in the table
23 rows from loop
no row from sendbatch since no record accumulated. (batch is of size 1)
one record from last insert statement. (100,"dog")
does anyone know why this happened?
nullMore code to figure this out may help.
Also, the term "Batch execution" doesn't apply here... you're simply adding records, near as I can tell. -
Problem with DBMS_DATAPUMP package ,need help urgently!!
Hi everyone
I'm trying to export data with PL/SQL DBMS_DATAPUMP package.
But I can't export data properly so far.
If anybody know slutions these case and errors what I explained,
pls help me.
1. when I use ADD_FILE Procedure, and set parameter of file type as logfile
then execute ORA-26535 error code returned as error.
but if I didn't set on filetype that error didn't returned.
2. when I execute package what I made, I could make DMP file but
strange named tables also made on Database which I use.
I don'(t why these table made it.
table name-----SYS_EXPORT_TABLE_01,SYS_EXPORT_TABLE_06
I attach my command under the below,
CREATE OR REPLACE PACKAGE BODY ETL.PACK_KHJ006_filemake IS
PROCEDURE Filemakeprocess IS
dir_name VARCHAR2(50);
dfile_name VARCHAR2(50);
dlog_name VARCHAR2(50);
file_handle NUMBER;
BEGIN
dir_name := 'PLSQL_DIR';
dfile_name := 'KHJT001_backup' || TO_CHAR
(sysdate,'yyyymmdd') || '.dmp';
dlog_name := 'KHJT001_backup.log';
--file_handle := DBMS_DATAPUMP.attach
('KHJT001_BACKUP');'KHJT001_BACKUP'
file_handle := DBMS_DATAPUMP.OPEN
('EXPORT','TABLE',NULL,'backup');
DBMS_OUTPUT.PUT_LINE(dfile_name);
DBMS_DATAPUMP.ADD_FILE
(file_handle,dfile_name,dir_name);
- DBMS_DATAPUMP.ADD_FILE
(file_handle,dlog_name,dir_name,DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
DBMS_DATAPUMP.METADATA_FILTER(file_handle,'INCLUDE_NAME_EXPR','= ''ETL.KHJW001_changep");
DBMS_DATAPUMP.SET_PARALLEL(file_handle,2);
DBMS_DATAPUMP.START_JOB(file_handle);
END;
END;
Thank you for your helpWhat version of the database are you running? It seems to be working as expected for me (9.2.0.3).
1 declare
2 jobno binary_integer;
3 begin
4 dbms_job.submit( jobno, 'foo_proc();', sysdate, 'sysdate + (1/24)' );
5 commit;
6* end;
scott@jcave > /
scott@jcave > column last_date format a20;
scott@jcave > column next_date format a20;
scott@jcave > select job, to_char(last_date,'dd-MON-yy hh:mi:ss') Last_Date, to_char(next_date,'dd-M
ON-yy hh:mi:ss') Next_Date from user_jobs;
JOB LAST_DATE NEXT_DATE
1 25-NOV-03 05:06:39 25-NOV-03 06:06:39
Elapsed: 00:00:00.00As an aside, are you really rebuilding your indexes every hour? On most systems, index rebuilds are completely unnecessary. On those systems where they are necessary, I can't imagine that it would be useful more than monthly.
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC -
What's the problem(about MIDlet execution on windows platform)?
I port MIDP to win32, and it can install MIDlet and can use midp -list to check all midlets it installed.
But when I run MIDlet, midp -run 1 -heapsize 1M, it prompts me "Bad dynamic heap objects found".
Is anybody encounter this kind problem? could you give me sone suggestion?
thanks.Hi Leslie,
After you have installed your SAPGUI Client on ure host, try accessing this object and running this object from you SAPClient.Please send the snippet of your code and also let us know what exactly are you trying to execute.
Regards,
Uma. -
Dear All, When i execute the Payroll for the month December, 2011, i get an error message in log that "Date specification 01 does not exist for 99 00 99 2011 07". Kindly mentioned the solution of this issue.
Hi Hassan,
Check infotype 41 for that employee...
Please go through the following links for more information apart from the one mentioned by above, which will help you in resolving this issue....
http://help.sap.com/saphelp_40b/helpdata/de/7e/8a6327545711d1891c0000e8322f96/content.htm
Re: Payrol simulation Error
Re: Payroll error
Best Regards,
Venkat. -
Response time problems, slow excel execution with new ibook
Hello: I'm a first time ibook user (long time pc user). I have had my ibook for less than 1 month. It's sometimes very slow. I can understand a slow response when I'm accessing a website, but I don't understand why I often experience a 5-15 second delay when I'm in excel and I click on "file" or "format". (I very often get the whirly multicolored pinwheel.)
I have also had to do a "force quit" a number of times to stop an unresponsive excel model or firefox application.
I'm also very disappointed in the excel performance. I run very large excel models some of which take a minute or more to recalc on our hp pavillion pc. My new ibook, however, doesn't run these modes any faster than my 2-3 year old pc. I haven't upgraded from the standard memory and I don't know how much that would help.
Anyone have any suggestions to offer?
MikecupertinoWelcome to the Apple Discussions!
I have had my ibook for less than 1 month.
If this is the case, then you qualify to get the next version of Microsoft Office, version 2008 for free (besides shipping). Check out this Microsoft site:
http://www.microsoft.com/mac/go/promotions/supersuitedeal/
Next week there are bound to be several new announcements from all sorts of Mac-related companies at the Macworld Expo in San Francisco. Microsoft is releasing their next version of Office for the Mac next week too. This version will run natively on an Intel-based Mac. Right now, Office is running in Apple's "Rosetta" technology which emulates the older, PowerPC processors. This allows you to run applications that haven't been updated yet, but it does slow down performance and increase hardware requirements. I think you should see better performance with the updated version. (Although, there may be a few bugs to work out with the brand new version, so keep check on updates!)
-Doug -
Package execution problem with SQLSERVERAGENT
Hello,
I'm having a problem with the execution of SSIS packages: I created locally a package with SQL Server Data Tools, then I deployed it on my server in the SSISDB database. Then I created a job to execute periodically this package with SQL Server Agent. The
package works fine and does everything I want, but I always get a failed notification. In the global view of the execution I can see:
Result: "failed"
Package name: "Package.dtsx"
Task name: "Package"
Execution access path: "\Package"
Every other task returns a success and their execution access path is a subfolder of "\Package". I tried everything I found on the web, check the "Runtime 32bits" box, create a "Job Account" user to execute the package via a
"Job Account Proxy", modify the ProtectionLevel of the package to "DontSaveSensitive", give the "Job Account" user full rights on everything, nothing works.
Do you have an idea of what my problem is and how to solve it?
I must precise that all my packages do the same thing: I have a loop on all the csv files in a folder that for each file loads the contents of the file in my database and the delete the file. I observed that the error message do not appear when there is
no file in the folder when the package executes.
Thanks in advance.Not sure what error message, is the one "est introuvable.
Cette erreur est retournée par la collection Connections lorsque l'élément de connexion spécifique est introuvable"?
So, here is in short: the ForEach Loop once in its beginning of operation "senses" the files currently present in the working folder. If a new file arrives after this stage, it will not see it.
In your case it seems that the ForEach "saw" a file at the beginning, but it was gone at the time the processing wanted it for execution.
Like many above indicated, the common practice, call
it elegant or not is to indeed move the files to a different directory (working folder). This is done to avoid collisions with some other activity in that folder.
Furthermore, you can have all the files deleted using a ForEach against the working folder as say in
http://beyondrelational.com/modules/2/blogs/88/posts/10178/ssis-delete-files-from-specified-folder-using-file-system-task-in-sql-server.aspx And there is no need to delete the working folder
itself.
The job is run in SQL Server's Agent
need to be set to run using a domain proxy account as it needs write access to the file system.
Arthur My Blog -
dear sir
i got a problem with script execution. i have successfully activate the form painter in ABAP editor. but i am getting the error like "Form ZLASRISUD language EN is not active and has no errors". please give me the solution for above as soon as possible.dear sir
i got a problem with script execution. i have successfully activate the form painter in ABAP editor. but i am getting the error like "Form ZLASRISUD language EN is not active and has no errors". please give me the solution for above as soon as possible.
Maybe you are looking for
-
When I plugged my iPod into my macbook, a window for an iPod Touch software update popped up, so I clicked update, then it said that my iPod was over capacity or something similar to that, so basically I didn't have enough room for the update, which
-
How to reference a class without using the new keyword
I need to access some information from a class using the getter, but I don't want to use the new keyword because it will erase the information in the class. How can I reference the class without using the new keyword. ContactInfo c = new ContactInfo(
-
Hi all, how to find a .txt file in a particular folder. My text file comes with following name <fixed_name>.<mmddyy><hhmmss>, e.g., fn_fnprod.102806015605 so how to get this file name. nd also tell me if there are multiple files then how to retrieve
-
Hi mates, I've a scenario that complains a RFC call to XI and then, XI makes a HTTPS Post on a specific server. I've created a HTTP Destination (type G) on SM59, set it to use SSL at Logon & Security tab, using the DFAULT ssl client(that i've created
-
Cast Documented Behaviour?
Take a look at the following sample. In the last statement, I use a CAST and understand why it only shows the first letter. But why does it do the same for the other column in which I don't use the CAST? SQL> select * 2 from v$version 3 / BAN