Procedure won't execute after sql loader
I have a procedure that uses DDE to call a bat file. The bat file uses sqlloader to load data from an excel sheet into Oracle. After the bat file is executed, I am doing a series of deletes and inserts.
After this is done, I am calling another procedure. Whe I run the form, the second procedure is not executing. I put a message box and it does not pop up.
When I comment the first procedure, only then the second procedure is called. Is this a sql loader issue or a DDE issue?
thanks
Thanks for the reply.
There are no messages. Using Windows.
As an example, C:\Program Files\Adobe\Adobe Lightroom 5.7.1 is the location for Lightroom 5.7.1. I have pinned it to the task bar. Click on the icon and 5.7.1 executes. If I double click on C:\Program Files\Adobe\Adobe Lightroom 5.7.1\lightroom.exe I can execute LR 5.7.1, just as I would expect.
However, if I try the same with LR 6, which is located in C:\Program Files\Adobe\Adobe Lightroom, nothing happens. It is also pinned to the task bar. Click on the icon on the task bar, or on the desk top, and nothing happens. No message, nothing.
Task Manager indicates the only program running is Firefox, my browser.
Similar Messages
-
Executing sqlldr (sql loader) from java and returning the error code
I'm wandering do sqlldr return any error code whenever it hit error while running in java.
For example, if i run in command prompt using the command below,
C:\ >sqlldr uid/pwd data=abc.dat control=abc.txt
It might give me some indicator that error occurs such as
SQL*Loader-601: For INSERT option, table must be empty. Error on table CURRENCY
or
SQL*Loader-500: Unable to open file (abc.txt)
SQL*Loader-553: file not found
SQL*Loader-509: System error: The system cannot find the file specified.
But when i run in java using the code below,
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("sqlldr uid/pwd data=abc.dat control=abc.txt");
int exitVal = proc.waitFor();
System.out.println("Process exitValue: " + exitVal);
it will only give me the same exitValue of 1(i presume its error) / 0 (i presume no error) instead of the details of the error.
How can i get the exact error code/message if i were to execute it using java?
Any solution?mg,
I don't think user576271 wants the exit code, I think [s]he wants the error message.
But wouldn't error messages from SQL*Loader be sent to the stderr stream, and not the stdout stream?
In which case user576271 would need method "getErrorStream()" of class java.lang.Process, no?
Good Luck,
Avi. -
Acrobat 8.0 won't activate after re-loading
I have two upgrade copies of 8, based on earlier versions of 6 and 7.
I have one loaded on the desktop at work, and the other on the desktop at home.
I am entitled to load also one on a mobile for each licence.
However, now I have come to load onto my shiny new Asus Eee PC 901, it refuses to activate.
I suspect this is because I did have a copy on my previous laptop, which I sold after wiping the disk and re-loading the factory software.
How do I manage the activations? I mean de-activate the one I sold and start again?
thanks!
RichardThat needed to be deactivated. But you can call customer services and
they should be able to sort you out.
Aandi Inston -
Can't figure out why tweener won't work after an loader is added to stage
Hey all, I am working on an imageHolder class that will let me load an image into and then when the image has finished loading I want the default graphic that is a placeholder to fade out. Everything is working except one thing when the image has finished loading an is added to the stage I can't seem to get tweener to fade out the placeholder graphic. The weird part is that tweener in the onLoadComplete handler works for resizing the placeholder (and alpha as I did do a test with this also). Hope someone can help me shed some light on what my issue is.
package com.jeremyseverson.display
import caurina.transitions.*;
import flash.display.Bitmap;
import flash.display.Loader;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLRequest;
public class ImageHolder extends Sprite
private var placeHolder:Shape;
private var loaderRef:Loader;
private var urlRequest:URLRequest;
private var _width:Number;
private var _height:Number;
private var _url:String;
public function ImageHolder(url:String,w:Number,h:Number,color:uint)
_url = url;
_width = w;
_height = h;
placeHolder = new Shape();
placeHolder.graphics.beginFill(0x000000);
placeHolder.graphics.drawRect(-w/2,-h/2,w,h);
placeHolder.graphics.endFill();
placeHolder.graphics.beginFill(color);
placeHolder.graphics.drawRect((-w/2)+10,(-h/2)+10,w-20,h-20);
placeHolder.graphics.endFill();
addChild(placeHolder);
load(_url);
private function load(url:String):void
loaderRef = new Loader();
urlRequest = new URLRequest(url);
loaderRef.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loaderRef.load(urlRequest);
private function onLoadComplete(evt:Event):void
var loaderRef:Loader = evt.target.loader as Loader;
loaderRef.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
var bmp:Bitmap = loaderRef.content as Bitmap;
bmp.x = -bmp.width/2;
bmp.y = -bmp.height/2;
bmp.smoothing = true;
var scaleVal:Number = loaderRef.width / loaderRef.height;
var dWidth:Number = _width;
var dHeight:Number = _height;
if (scaleVal > 1) dHeight /= scaleVal;
if (scaleVal < 1) dWidth *= scaleVal;
loaderRef.width = dWidth;
loaderRef.height = dHeight;
Tweener.addTween(placeHolder,{width:dWidth,height:dHeight,time:1,onComplete:onTweenComplete});
private function onTweenComplete():void
loaderRef.addEventListener(Event.ADDED_TO_STAGE, onLoaderAdded);
addChild(loaderRef);
private function onLoaderAdded(evt:Event):void
this.setChildIndex(loaderRef,0);
loaderRef.removeEventListener(Event.ADDED_TO_STAGE, onLoaderAdded);
Tweener.addTween(placeHolder,{alpha:0});I should also note that the fade out does happen but it is just a quick cut. Does not matter what I set the time value for in the tween.
-
Lightroom 6 won't execute after installation. Previous versions do.
I just installed LR 6 from CC. It might be a permission problem. Using Windows 8. Other versions of LR, Photoshop and Bridge are OK.
Thanks for the reply.
There are no messages. Using Windows.
As an example, C:\Program Files\Adobe\Adobe Lightroom 5.7.1 is the location for Lightroom 5.7.1. I have pinned it to the task bar. Click on the icon and 5.7.1 executes. If I double click on C:\Program Files\Adobe\Adobe Lightroom 5.7.1\lightroom.exe I can execute LR 5.7.1, just as I would expect.
However, if I try the same with LR 6, which is located in C:\Program Files\Adobe\Adobe Lightroom, nothing happens. It is also pinned to the task bar. Click on the icon on the task bar, or on the desk top, and nothing happens. No message, nothing.
Task Manager indicates the only program running is Firefox, my browser. -
Software licensing service won't start after sql server upgrade
having issues with windows server 2008 sp2 64 bit OS where the software license service do not start. and see the server as not genuine. when i run net start slsvc, I got a system error has occurred. system error 34 has occurred. the wrong diskette
is in the drive. insert *** (volume Serial Number: ***) into drive ***.
I try chkdsk and sfc/scannow. nothing seems to work.
thank you for your help
Hi,
Please try the steps below to resolve the issue:
1.net stop slsvc (select yes) in my case it was already stopped.
2.in command prompt type:
3.cd %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareLicensing
4.rename the tokens.dat file: ren tokens.dat tokens.old
5.still in the command prompt type cd %windir%\system32
6.type net start slsvc
7.type cscript slmgr.vbs -rilc (this may take a long time)
8.Then reboot the machine twice !!!
9.slmgr.vbs –ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (assuming you have a MAK key, not a KMS key)
10.To activate your OS, just type: slmgr.vbs –ato
If there any other error message? You could refer to the article below to troubleshoot the issue:
How to troubleshoot Volume Activation error codes in Windows 7, in Windows Server 2008, and in Windows Vista
http://support.microsoft.com/default.aspx?scid=kb;EN-US;938450
Best Regards,
Mandy
If you have any feedback on our support, please click
here .
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
SQL*Loader with Stored Procedure slow
I have a situation where if SQL*Loader is running then stored procedures returning cursors are excruciatingly slow (about 3 minutes) if the same stored procedure is run via SQL statements it runs fine. The stored procedures also run fine if SQL*Loader is not running. Has anyone seen this before, any thoughts?
Thanks,
edMy query was:
SELECT *
FROM scheme.table@as400 a
WHERE a.vlvalr = to_char(p_vlvalr)
and a.vlvals = to_char(p_vlvals);
Without the to_char! When I add the to_char, the problem is solved! -
Hello,
We r confirmed that to execute SQL Loader,
One need to write an External Routine.
So First Step itself need to create a
'C' file which executes our sql Loader or
Using Java.
How Can I execute the SQL Loader (.exe)
using Java?
How can I proceed? Waiting ASAP. Thankyou
Abhay
nullI have a nice piece of Java code that allows you to execute OS commands from within a PL/SQL block in Oracle. If you need the code send me an email. I know it works in Unix and it should work on most platforms.
-
Error while loading data using SQL*Loader
Hi All,
I am now in process of loading data from MS SQL to Oracle Database.
I am getting the data in excel format and i will convert them into csv.
Upto converting everything is working fine.
In MS SQL, table columns are case sensitive.
So i created those tables in oracle db as same.
There is one column "MaxNumber" which is of type float(49).
The column is case sensitive.
in the control file first i given as
"MaxNumber" "TO_NUMBER(:MaxNumber,'99,999.99')"
After executing the SQL*Loader i am getting the error
SQL*Loader-466: Column MAXNUMBER does not exist in table TABLEONE.
I changed the control file entry as
"MaxNumber" "TO_NUMBER(:"MaxNumber",'99,999.99')"
After the execution i got the error
SQL*Loader-350: Syntax error at line 13.
Expecting "," or ")", found "MaxDiscount".
"MaxNumber" "TO_NUMBER(:"MaxNumber",'99,999.99')"
Please Guide me in this issue.
Regards
Salih KMWhat I'm saying is, verify the column name. Dont post if not possible.
Example follows, with one table intentionally "hidden".
SQL> create table "tEsT" ("MaxNumber" float, "MaxnumbeR" number);
SQL> select table_name,column_name from user_tab_columns where table_name like 't%';
TABLE_NAME COLUMN_NAME
tEsT MaxNumber
tEsT MaxnumbeR
teST iD
teST MaxNumberHth,
Fredrik -
Hi,
I am trying to execute a sql loader script that populates many tables. The order of the tables in the script is very important because the table of the last table has a constraint with the first table of the script. So I need that sqlloader executes a commit after the filling of the first tables because if sql loader executes the script simply as it is written the last tables launches an error because the constraint is violated (the last table sees the first one empty).
How can I force a commit after a filling in sql loader?
The sctructure of the tables was not defined by me so I must not modify it (constraint included).
Thanks, bye bye.Hi,
If you have to enable/disable manually the constraints you can execute:
DECLARE
v_ds_action VARCHAR2(7);
BEGIN
v_ds_action := 'DISABLE';
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'R') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'C') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'U') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'P') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
END;
DECLARE
v_ds_action VARCHAR2(7);
BEGIN
v_ds_action := 'ENABLE';
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'P') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'U') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'C') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
FOR reg IN (SELECT * FROM user_constraints uc WHERE uc.constraint_type = 'R') LOOP
EXECUTE IMMEDIATE 'ALTER TABLE ' || reg.table_name || ' ' ||
v_ds_action || ' CONSTRAINT ' || reg.constraint_name;
END LOOP;
END;
/Regards, -
Hello,
Is it possible to forcefully abort the sql loader when a value is not present? I've the data file like this
1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|
5|XXX123|XXX|||
9|XXX123|XXX|||
Template:
record type|batch number|batch desc|date|detail line num|others
1,4,5,9 are the record types, if you see this line 5|XXX123|XXX||1| .. 1 represents a detail line number, My requirement is if the detail line number is null for record type 5 then I want to abort the sqlloader.
Is it possible?
Edited by: 940838 on Nov 21, 2012 11:54 PM940838 wrote:
I think i am not clear in my requirement...
The question was how to abort the loader if the detail line number is not present in record type 5. It is however normal that detail line num is not mandatory for other record types. any insights.Hi,
you have been clear and I have made a quick test. Unfortunately you cannot do such check in SQL*Loader as the WHEN clause in control file does not allow any OR.
Even if you add this check using a constraint in your table and specify the maximum number of errors to be 0, SQL*Loader will load the records up to that error.
Let me show you an example:
1) create the table with a constraint that for record_type 5 detail_line_number cannot be null.
CREATE TABLE test
record_type INTEGER
, batch_number VARCHAR2 (10)
, batch_desc VARCHAR2 (10)
, batch_date DATE
, detail_line_num INTEGER
, other VARCHAR2 (10)
ALTER TABLE test
ADD CONSTRAINT check_rec_5
CHECK ( record_type = 5 AND detail_line_num IS NOT NULL
OR record_type != 5) ENABLE;
In this table you will not be able to load rows having record_type=5 and detail_line_num NULL as this will be considered as an error.
Let's prepare your input file:
1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX|||
5|XXX123|XXX|||
9|XXX123|XXX|||
1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|
5|XXX123|XXX|||
9|XXX123|XXX|||1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|
5|XXX123|XXX|||
9|XXX123|XXX|||1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|As you can see the input file has the fourth line with record_type = 5 and detail_line_num NULL. This will be an error for the constraint.
Here the control file I have used:
--test.ctl
load data
INFILE 'test.dat'
APPEND
INTO TABLE test
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
record_type ,
batch_number ,
batch_desc ,
batch_date Date 'YYYYMMDD',
detail_line_num ,
other
)If I try to execute the SQL*Loader and ask to stop at first error in this way:
sqlldr userid=yourname/yourpass@yourdb control=test.ctl errors=0 rows=100SQL*Loader will load only 3 records because it encounters an error at line 4 and having specified errors=0 will not continue to load. Actually the process will continue until it reach the commit point (100 rows in this case) but it will not load any record after the error nor continue to read the file.
So if I check the table
SELECT * FROM test;
RECORD_TYPE BATCH_NUMBER BATCH_DESC BATCH_DATE DETAIL_LINE_NUM OTHER
1 XXX123 XXX 21-11-2012 00:00:00
4 XXX123 XXX
5 XXX123 XXX 1 You will see only records until you have reached the error.
This cannot be avoided as documented in SQL*Loader reference manual:
<h3>Load Discontinued Because Maximum Number of Errors Exceeded</h3>
If the maximum number of errors is exceeded, SQL*Loader stops loading records into any table and the work done to that point is committed. As you can see SQL*Loader abort the processing but it will anyway commit the records until that error.
One alternative solution is to create an external table in Oracle and do all the checks you want before copying your external table into a database table, as BluShadow suggested.
Regards.
Al -
How to force SQL*Loader to assign the same SYSDATE for all rows?
I want to use SQL*Loader to load some rows and a "SYSDATE" generated column, but making sure this date is THE SAME for all rows. I have seen that if I load HUNDREDS of rows there is a little difference between them (in terms of seconds). I guess it is "the moment each row entered the DB", but I need the same value for all rows (preferably, "the moment SQL*Loader was launched"). Is there any way to achieve this?
Thank you very much.Hello user2393320.
Given some thought, using a date value to identify all records from a single load isn't very wise.
Are you able to create a procedure on the database that could be executed during SQL*Loader's execution? If so, you could develop the procedure to take in the record number of the row being loaded as an input parameter and output this unique date value for all rows loaded. The procedure would need to store the date value in a table when the first row is being loaded and return the stored date value as its output. This obviously assumes that only one sqlldr session is running at any time.
I highly recommend using a numeric sequence in the control file instead of a date to identify each file load:
, file_load_seq SEQUENCE(MAX, 1)
Another approach would be to load the record number being loaded in addition to the sysdate:
, record_number RECNUM
Hope this helps,
Luke -
Sql loader special char loading in table
Hi all,
I am using oracle 10g with UNIX.
I have a .csv file transferred from windows to UNIX. I check the control M char and remove them
using dos2unix command.
The special char name are fine in UNIX for eg as below when check the .csv file after trnasfered
Oulu
Jääli
HaukipudasI use SQL LOADER to load into database a temp table. as below control file
OPTIONS (SKIP=1)
LOAD DATA CHARACTERSET UTF8
INSERT INTO TABLE temp_pa_load
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(id_id,
name)
{code}
The fields id is map to id and name is map to name in temp table
when check in temp table after sql loader is executed i get incorrect name
actual name in .csv file Jääli
temp table name J�i
the rest names and id are correct but only for special char there is problem
the size of name column in temp table is 100 varchar2
I also tried to specify char(100) in control file but it didn;t work
could some one pls advice me.
thanks in advance
Saaz EnaPl post the characterset of the database, along with a description of the table.
HTH
Srini -
Issues in calling Sql Loader through forms developer (10g)
Hi,
I am developing a form(in 10g) ,in which I am calling sql loader for loading data onto a oracle database table from external source (e.g. data file is a .CSV file).
But , somehow the sql loader is not getting executed.
Here , I am giving the environment settings , approach i am taking;
This is a distributed system , both the application server,and database server are mounted on two different servers.
The form is delpoyed on the application server.
The database table , and the sql loader are configured on the databse side.
I am using host(<sql loader command>) command to invoke the Operating System command through forms.
The sql loader is working ok , and the data is getting loaded successfully onto the required database table when I am executing the sql loader command on Unix prompt , but through the forms , it's not working.
Do I need to change some environmental setting to make this work...
Any quick help in this regard is highly appreciated.
Thanks.Hi Craig,
I have already tried out the option of calling sql loader through stored procedure,but this is not working ...
could you please share any examples to do so ...
code snippet i am using in forms:
declare
usid get_application_property(userid);
pwd get_application_property(password);
db get_application_property(host);
msqlldr varchar2(250);
begin
msqlldr:='/u01/oracle/formss/bin/sqlldr' username=<uid/pwd@db> control=<control file name> data=<data file name> log=<log file name>
hosts(msqlldr);
end;
Note that sqlldr command ,for that matter any unix shell command is not working through the hosts() command ...
could you please suggest any way out ...
Thanks. -
Hi,
First doubt:
When I execute the SQL*LOADER the following error occurs:
SQL*LOADER-350: Erro de sintaxe na linha 6.
Esperando especificagco de coluna valida, ", ou ")"; localizado "VARCHAR2".
(NAME POSITION(01:64) VARCHAR2,
^
The control file is like this:
ARQUIVO1.CTL
LOAD DATA
INFILE 'C:\testes\ARQUIVO1.TXT'
BADFILE 'C:\testes\ARQ1_ERRO.TXT'
TRUNCATE
INTO TABLE CARLA.TEMP_TESTE
(NAME POSITION(01:64) VARCHAR2,
ENDERECO POSITION(65:81) VARCHAR2,
TELEFONE POSITION(82:95) VARCHAR2)
Somebody, knows what happens?
Second doubt: How can I execute sqlldr in a procedure? Is there any command that simulates the DOS line command? Is there any example?
Thanks
CarlaHere are a couple of links to pages on Tom Kyte's site. The first one shows how to use java to enable execution of an operating system file from pl/sql. Just store your SQL*Loader commands in a .bat file and use Tom's code to enable execution of the .bat file from pl/sql. The second one uses utl_file that acts like a "mini sqlloader" in pl/sql and includes an example that demonstrates some data validation, checking for numeric values. I have used both methods succesfully. For large files, SQL*Loader is much faster than utl_file.
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:952229840241
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:464420312302
Maybe you are looking for
-
Issue while sending mails using classes
Hi Experts , i have one issue when i try to send mails using classes cl_document_bcs,cl_cam_address_bcs,cl_bcs etc ISSUE : i put some data in selection screen and i get some output ( say i got 5 records), i select 3 records and press some button to t
-
BAPI_ROUTING_PROCESS help needed
Hi Friends, One simple question: Has anyone been successful in using /SAPMP/BAPI_ROUTING_PROCESS, and how? My problem is that I have to change an existing routing (operations control key and others) but unfortunately the BAPI is not helping: it is re
-
Hi. I own an iPod Nano, and yesterday, I accidentally dropped it into a sink. It flashed a message about firewire connections and prompty shut off. Now, I tried to turn it on, about 5 times, and plugged it in once, so it's probably gone. But here's m
-
How to make materialized view fast refresh parallel
We have Oracle 11.2.0.1 on Redhat 5.2. We use a dozen of fast refresh materialized views in our application. From time to time MV refresh takes longer time than the refresh interval. One of way to improve performance of MV refresh is to make the refr
-
When we Start the DRM DRM Process Manager failed to start with following error [Process ID: 3948, Thread ID: 1, Process Manager] Error loading the NetJNIBridge host process on machine: EU9SC1WNW001 System.Exception: Error loading the NetJNIBridge ho