Linux script call from PL/SQL does not work?
We are trying to run a simple Linux command using this PL/SQL 10.2 procedure:
PROCEDURE run_linux_script_from_oracle IS
BEGIN
dbms_scheduler.create_job
job_name=>'runtop',
job_type=>'executable',
job_action=>'/vol0/FileLoadDir/Bank/DATA_FILES/spell_check.sh',
enabled=>true,
auto_drop=>true
DBMS_OUTPUT.PUT_LINE('Successful');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error: ' || SQLERRM);
END;The .sh file has this command which works fine when we run in Linux.
spell /vol0/FileLoadDir/Bank/DATA_FILES/ebill2.fmt_form_strings_.txt > /vol0/FileLoadDir/Bank/DATA_FILES/abcd.txtI get a Successful when I run this command in my SQL*Navigator and a PLS-00225: subprogram or cursor 'ABS' reference is out of scope when I run it in the SQL*Nav in another machine???
Any help would be greatly appreciated.
Channa wrote:
We are trying to run a simple Linux command using this PL/SQL 10.2 procedure:NO, posted procedure below RUNS nothing,
post code simply CREATE JOB, but does NOT invoke it!
>
PROCEDURE run_linux_script_from_oracle IS
BEGIN
dbms_scheduler.create_job
job_name=>'runtop',
job_type=>'executable',
job_action=>'/vol0/FileLoadDir/Bank/DATA_FILES/spell_check.sh',
enabled=>true,
auto_drop=>true
DBMS_OUTPUT.PUT_LINE('Successful');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error: ' || SQLERRM);
END;EXCEPTION handler is BUG & should be removed, discarded & 100% eliminated.
>
The .sh file has this command which works fine when we run in Linux.
spell /vol0/FileLoadDir/Bank/DATA_FILES/ebill2.fmt_form_strings_.txt > /vol0/FileLoadDir/Bank/DATA_FILES/abcd.txtI get a Successful when I run this command in my SQL*Navigator and a PLS-00225: subprogram or cursor 'ABS' reference is out of scope when I run it in the SQL*Nav in another machine???What is "ABS" & why/how does it exist in error message?
Similar Messages
-
The "always match my default message font" option in the Signature preferences from Mac Mail does not work if e-mail is received in other Mail Software. How can I make it work?
I found this plugin which solved pretty much all of my mail font rendering problems. It is designed for Lion, so don't know whether it will work but thought I would offer it up.
http://noware-it.zxq.net/ -
Redemption code from Photoshop Elements 12 purchased from Best Buy does not work 'Oops! This code doesn't seem to be active. Please contact the retailer you purchased the card from, or use a different code.' I have an invoice and the pickup notice from Best Buy. What other information does Best Buy need? What will they do? Will I get a new box? What happened to the days of just typing in a simple s/n?
Redemption Code Help
http://helpx.adobe.com/x-productkb/global/redemption-code-help.html -
Windows 7 Defrag from command line does not work
We are running Windows 7 in a virtualized environment. When running windows defrag using schedule or from command line, it does not work. The command that I am executing as administrator is
C:\Windows\system32>defrag /c
Microsoft Disk Defragmenter
Copyright (c) 2007 Microsoft Corp.
It displays the above message and exits back to the command prompt. However if I run the command defrag C: it does work. Defragmenting from the GUI works as well as long as both the disks (C: and System Reserved) are selected and when I click on
Defragment disks, works fine.
I am concerned about defrag running from the task scheduler with the command "defrag /c" (auto scheduled using Configure Schedule... from Disk Defragmenter) does not work and the system never gets defragmented automatically.
This happens only with some of the windows 7 VM's that we have.
There are no entries in Event Log that point to the defrag (using task scheduler). Any ideas what may be going on?Hi,
Could you defrag as below method:
1. Open Disk Defragmenter by clicking the Start button. In the search box, type
Disk Defragmenter, and then, in the list of results, click
Disk Defragmenter.
2.Under Current status, select the disk you want to defragment.
3.To determine if the disk needs to be defragmented or not, click Analyze disk. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
Once Windows is finished analyzing the disk, you can check the percentage of fragmentation on the disk in the
Last Run column. If the number is above 10%, you should defragment the disk.
4.Click Defragment disk. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
For more information, please read this article:
Ways to improve your computer's performance
http://windows.microsoft.com/en-in/windows/improve-performance-defragmenting-hard-disk#1TC=windows-7
Meanwhile, read this article:
Defrag from the Command-Line for More Complete
Control
http://technet.microsoft.com/en-us/magazine/ff458356.aspx
Karen Hu
TechNet Community Support -
The manual mode to transfer music to my iTune from my iPhone does not work as described. When I click on Manually manage... it displays the warning message that all music on my iPhone will be erased and replaced by iTune music.
How can I transfer my music to a second computer iTune?
Thanks,See this user tip
Syncing iPhone to a "New" Computer or replacing a "crashed" Hard Drive -
I have a 2011 tahoe. My bluetooth functioned properly until I updated my iPhone. Now the iPhone connects to the Tahoe but when I try to call a number it does not work. Either it cals the number and has no outgoing or incoming sound or it just says it iis unable to complete the call.
I would check with the Auto dealer where the vehicle was purchased to check and see when the bluetooth software was last updated on your vehicle. With the vehicle being a 2011 and if the software has not been updated since the dropping of IOS 7 then obviously there will be software incompatibilities.
Good luck. -
NEW_FORM call from menu module does not close previous form window
We run Forms 9.0.4 and I just developed three new form screens. The problem is that when new screens are called with NEW_FORM call from menu module:
New_Form(p_form_to_open,TO_SAVEPOINT,NO_QUERY_ONLY,NO_SHARE_LIBRARY_DATA,Menu_Globals.v_form_parml);
the window from previous form is visible in the background.
Strangely enough same call from the same menu module using exactly same NEW_FORM call for old screens does not leave previous window visible. I've checked Form level properties, Window Level Properties, Different Menu Properties, and could not find anything that would fix it.
Any pointer would be appreciated.I've figured it out:
The old screens have main window named ROOT_WINDOW. As soon as I named the window on new screen to be ROOT_WINDOW the background window disappeared.
How stupid is that. Wasted my whole day on this. -
Unlocked iPhone from T-Mobile does not work in Switzerland
I'm extremely annoyed. I bought myself a *so called unlocked* iPhone in Germany for 999 Euro and now it does not work with a Swiss SIM card. When I try to make calls via dialing or when i try to read text messages (sms) the phone and the sms application will crash. Calling the different helplines ends up in the same resutls: Apple care blames either Swisscom or T-Mobile, T-Mobile blames either Swisscom or Apple and Swisscom blames Apple or T-Mobile...
In the end however, I can't get rid of the feeling that the problem could be solved by a very simple software update, because I've seen hacker reports on the internet claiming they were able to solve the problem by changing a few settings. I don't want to be forced to hack my legally bought so called unlocked iPhone. *When will Apple set the "unlocked" iPhone really free?*Hi Pete,
welcome to the club! A you can see from this thread
http://discussions.apple.com/thread.jspa?threadID=1260589&tstart=0
you are not the only one. It seems as if the T-Mobile unlocked phones work with any German SIM card, but with non from not-Apple supported countries (like CH).
Apple support is aware of the problem, as many of us have called them and submitted bug reports, but it remains to be seen, if Apple is interested enough in "us" to provide a solution. -
The scroll function from the pad/mouse does not work for the other tabs when a PDF file is opened.
Hi NSHS,
Have you checked to see if your PDF add-on is up to date? You should take a look at the [[Opening PDF files within Firefox]] Knowledge Base article. There is a lot of good information in there. You should try both of the suggested PDF add-ons to see if that fixes the issue.
Hopefully this helps! -
Thumbnail view for Library copied from Asset Library does not work
Hello ,
I created list definition based on Assed Library (I copied files from \15\TEMPLATE\FEATURES\AssetLibrary\AssetLibrary ) - I reused schema.xml and other files.
Then I added my new custom content type.
The problem is following: thumbnail view does not work now ( "/AssetLibraryDemo/Forms/Thumbnails.aspx" )
I don't have any javascript errors and any specific error in ULS log.
Can you give me advice, why thumbnail view has stopped working?I need to use "List teplates" gallery functionality for this task.
-
I called Verizon prior to travelling abroad and asked to turn roaming on. As of today, 4 days later, I have no service. I do not have a landline to call support. GlobalServices email does not work... Does anybody know how to reach customer support via email?
Hi Florence2014
I'm so sorry your having issues. Unfortunately there isn't an email for global support. The only way way to reach them while traveling is to call them at 908-559-4899.
JoeL_VZW
Follow us on Twitter @VZWSupport -
Getting input from mouse-wheel: does not work under windows/IE
Hi
I have built an applet that extends JApplet. To it I have added a class that extends JPanel implements MouseListener, MouseWheelListener, MouseMotionListener.
I collect input using the method
public void mouseWheelMoved(MouseWheelEvent e){
do stuff...
I have build this on a mac and tested it in firefox and it works fine. But on xp/vista internet explorer, the applet does not respond to mousewheel input. On mac osx /safari it does not work either.
Is there any solution to this problem?
Best regards, Carlis.Just for luck, try setting the JPanel focusable.panel.setFocusable(true);If that doesn't make a difference, you need to post a [_Short, Self Contained, Compilable and Executable, Example Program (SSCCE)_|http://mindprod.com/jgloss/sscce.html] that clearly demonstrates your problem.
db -
Insert SQL does not work properly when called using CALL
I have a stored procedure (TEST_SP) which is used to insert a record in this perticular case. The SQL statement is 2526 characters long. I'm using
dim Params : Params=chr(1) & "Insert query" & Chr(1) & "=300"
runsql=&"{call TEST_SP(?,?)}"&Params
dim db : db=dbSelect("",0,"","")
dbExecSQL db,runsqlto execute the stored procedure. I'm facing an issue when the 2000th character on the insert SQL (pUPDSQL) is a single quote, where the SQL is not getting executed (i.e. record is not getting created).
The same stored procedure and the same SQL when run as below
runsql=runsql&"DECLARE "
runsql=runsql&"PUPDSQL VARCHAR2(4000); "
runsql=runsql&"PRES VARCHAR2(300); "
runsql=runsql&"BEGIN "
runsql=runsql&"PUPDSQL := 'INSERT query..."
runsql=runsql&"PRES:=300; "
runsql=runsql&"MRT_LKIDFULUP(PUPDSQL => PUPDSQL,PRES => PRES); "
runsql=runsql&"END; "
dim db : db=dbSelect("",0,"","")
dbExecSQL db,runsqlis working fine. Does anyone know if there is a limitaion in ODBC Call function or any explanation to above behaviour? I'm connecting to a Oracle 11g database using Microsoft ODBC for Oracle driver on Window 7
The stored procedures:
create or replace procedure TEST_SP(pUPDSQL IN VARCHAR2,pRES OUT VARCHAR2)
AS
BEGIN
DECLARE
emsg VARCHAR2(100);
BEGIN
if pUPDSQL<>'-1' then
emsg:='Cant exec UPDATE';
EXECUTE IMMEDIATE pUPDSQL;
if SQL%RowCount=0 then
pRES:='ERR:No row updated';
return;
end if;
end if;
pRES:='OK:';
EXCEPTION
WHEN OTHERS THEN
pRES:='ERR:' || emsg;
END;
END;Edited by: BluShadow on 11-Dec-2012 15:47
added {noformat}{noformat} tags for readability. Please read {message:id=9360002} and learn to do this yourself in future.... I'm facing an issue when the 2000th character on the insert SQL (pUPDSQL) is a single quote, ...Perhaps you need two single quotes? like:
runsql=runsql&"PUPDSQL := 'INSERT query...Values(..,..,,,''This value in two single quotes'',..,...)' "
... I'm connecting to a Oracle 11g database using Microsoft ODBC ...Dump windoze ODBC and better use the Oracle client ODBC.
:p -
Downcasting In Object PL/SQL Does not Work in Oracle 10g 10.1.0.2
create type one_t as object (
x number, y date ) not final
create type two_t under one_t()
set serverout on
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := new two_t(1, sysdate);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
The Other Piece Does not Even Compile
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := treat(super as two_t);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
ORA-06502: PL/SQL: numeric or value error: cannot assign supertype instance to
subtype
ORA-06512: at line 6You need use correct type when you create object.
Don't forget object in reality is a memory pointer,
so what if you don't allocate correct memory in creation,
you can't treat object as subtype.
And meanwhile, it doesn't depend on Oracle version -
your example doesn't work in 9.2.0.1 for example.
SQL> declare
2 super one_t;
3 sub two_t := two_t(1, sysdate);
4 begin
5 super := two_t(1, sysdate);
6 sub := treat(super as two_t);
7 dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
8 select treat(super as two_t) into sub from dual;
9 dbms_output.put_line('super ' || super.x || ' ' || super.y );
10 if sub is null then
11 dbms_output.put_line('stupid');
12 end if;
13 if sub is of (two_t) then
14 dbms_output.put_line('stupid');
15 end if;
16 end;
17 /
sub 1 08.06.05
super 1 08.06.05
stupid
 
PL/SQL procedure successfully completed.Rgds. -
Downcasting in Object PL/SQL Does not Work in Oracle 10g Enterprise Edition
create type one_t as object (
x number, y date ) not final
create type two_t under one_t()
set serverout on
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := new two_t(1, sysdate);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
The Other Piece Does not Even Compile
declare
super one_t;
sub two_t := two_t(1, sysdate);
begin
super := one_t(1, sysdate);
sub := treat(super as two_t);
dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
select treat(super as two_t) into sub from dual;
dbms_output.put_line('super ' || super.x || ' ' || super.y );
if sub is null then
dbms_output.put_line('stupid');
end if;
if sub is of (two_t) then
dbms_output.put_line('stupid');
end if;
end;
ORA-06502: PL/SQL: numeric or value error: cannot assign supertype instance to
subtype
ORA-06512: at line 6You need use correct type when you create object.
Don't forget object in reality is a memory pointer,
so what if you don't allocate correct memory in creation,
you can't treat object as subtype.
And meanwhile, it doesn't depend on Oracle version -
your example doesn't work in 9.2.0.1 for example.
SQL> declare
2 super one_t;
3 sub two_t := two_t(1, sysdate);
4 begin
5 super := two_t(1, sysdate);
6 sub := treat(super as two_t);
7 dbms_output.put_line('sub ' || sub.x || ' ' || sub.y );
8 select treat(super as two_t) into sub from dual;
9 dbms_output.put_line('super ' || super.x || ' ' || super.y );
10 if sub is null then
11 dbms_output.put_line('stupid');
12 end if;
13 if sub is of (two_t) then
14 dbms_output.put_line('stupid');
15 end if;
16 end;
17 /
sub 1 08.06.05
super 1 08.06.05
stupid
 
PL/SQL procedure successfully completed.Rgds.
Maybe you are looking for
-
Rendering issue with 9.5 and 9.5.5
I have two PDF files that display a simple test image consisting of 3 colored rectangles. In one, the image is displayed with BlendMode Normal, in the other, BlendMode Multiply on a white background. The latter causes a color shift. The files are
-
Force modified style be applied to previously created docx files as well
Hi friends new to word. i have about 30 .docx documents. inside one of them, i selected a word which it's font is bold & is red & then i goto styles and right click on Heading1 and click on "update heading1 to match selection" then i right click on h
-
CL_HTTP_CLIENT, Content-Length in multipart segment are not part of RFC 186
Hi, we are generating http multipart request using class CL_HTTP_CLIENT, and multipart segments header are filled with Content-Type and Content-Length, by default. Both elements are not part od RFC 1867, and request is not working. We find a way to a
-
Hi, I authored my dvd on Studio Pro 4. I use the PSD file for the layered menu. When I played the dvd on my PC, I selected button A (it connects with the track A) and clicked it. During changing button color, I moved the cursor on the button B (it co
-
Hi I just bought an Apple TV device i have detected the 2WIRE and entered the Product Key Password. It takes that okay the screen goes to Connecting followed by Activating below in small print it says Setting date and time but nevr leaves that scree