PROCEDURE runs, but when included in a JOB it fails.
Hi allWe create a WORK on behalf of a list of users (who have some access to the DB only) locking at 09:00 every day. (Another job will unlock the accounts at 14:00). Here is the code
Running as a SYSTEM
CREATE OR REPLACE procedure tradenet_lock_users authid current_user is
begin
for rec in (select sid sid1,serial#,username
from v$session s
where s.username in (select username from coreadmin.tradenet_users p where p.status = 1)) loop
execute immediate 'alter system kill session '''||rec.sid1||','||rec.serial#||'''';
end loop;
for rec in (select username from coreadmin.tradenet_users where status = 1) loop
execute immediate 'alter user '||rec.username||' account lock';
end loop;
end;
/
Procedure works well.WORK is created success entirely using code below
declare
n number;
begin
dbms_job.submit(n,'tradenet_lock_users;',trunc(sysdate)+9/24,'trunc(sysdate)+9/24');
dbms_job.submit(n,'tradenet_unlock_users;',trunc(sysdate)+14/24,'trunc(sysdate)+14/24');
commit;
end;
But when try to run it it gives an error:SQL>exec dbms_job.run(392);
ORA-12011: execution of 1 jobs failed
ORA-06512: at "SYS.DBMS_IJOB", line 406
ORA-06512: at "SYS.DBMS_JOB", line 272
ORA-06512: at line 1
DB version:SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Please think about the possible causes.Thanks in advance,
Jac
You might get some info from dba_jobs, but you can use dbms_scheduler? The dba_scheduler_job_run_details view can offer more details, IE the additional_info column can contain the error which causes the failure.
Tags: Database
Similar Questions
-
After an update the operation of my account PRO to Acrobat DC disappeared and it works as if it were a FREE standard version. So I disinstalled it and tried to install it but when I install the Setup program fails. So I'm not able to install it more. What can I do?
When I opened my creative cloud I see nothing!
Please see these troubleshooting FAQ:
FAQ: What should I do if I have a subscription, but my application acts as if I had a trial?
-
I tried to download trial version of photoshop on creative cloud. 42% the download stops and the program starts to extract the files, BUT when it's done, he says failed to install. When I click on more information ot says: fatal error: payload "Microsoft C++ Redistributation Pack 2010 (Code output: 34)." Can someone help me please?
See link below:
-
I migrated my Macbook pro to an Imac Photoshop works very well, but CC says that there is a problem. It tells me to download CC but when I try to install it fails and tells me that I need CC?
Migration/transfer of Adobe applications does not work. You must install using installation files. Uninstall, and then use the CS cleanup tool. Then download/install the desktop application, connect and install applications subscription.
http://www.Adobe.com/support/contact/cscleanertool.html
Creative cloud to desktop
https://helpx.Adobe.com/creative-cloud/help/creative-cloud-desktop.htmlSign out, sign in | Creative office cloud app
http://helpx.Adobe.com/creative-cloud/KB/sign-in-out-creative-cloud-desktop-app.htmlHelp of activation & deactivation
https://helpx.Adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html#a ctivate-how-to'sInstall, update, or uninstall applications
http://helpx.Adobe.com/creative-cloud/help/install-apps.html -
My question pretty much says it all. Don't know what you want. I have a Windows Vista and you use FIrefox for at least 4 years.
Hi rv7431, don't you worry - you already use firefox 22 which is the latest version available.
the message you see is probably just show up, because you are using google.ca/firefox as your homepage, which has only been maintained up to what firefox 3 and displays now the warning message that you have referred to as no. matter what browser version you are using. change the homepage of Subject: House to answer the question and get the current home page of firefox...
Edit: another thing that is directly related to your original question - you have two present addons, sounding rather malicious (My Web Search 1.1, Performance Cache 1.0). I recommend to Remove...
-
My default PDF program is Nitro but when I download a PDF file fails
When I download a PDF file it comes up with the following message...
C:\DOCUME~1\ADMINI~1\Locals~1\Temp\FXP8560MFPD-1.PDF could not be opened, because the associated helper application does not exist. Changing the association in your preferences.Where and how to find the preferences to change the association
See if that helps you.
http://support.Mozilla.com/en-us/KB/managing+file+types -
DBMS Scheduler Job will run but did not finish.
Hello!
I created a job that is supposed to run a stored procedure. It works ok but it looks like no it's over... How do I know? My procedure records each action and after execution of the task, I see only one line of paper. One from the code...
It is the stored procedure code:
create or replace PROCEDURE get_survey_data AS dir_name VARCHAR2(100); nip_no VARCHAR2 (1024); employee_name VARCHAR2 (1024); company_name VARCHAR2 (1024); hire_date VARCHAR2 (1024); agreement_date VARCHAR2 (1024); stmnt_1 VARCHAR2 (5000); stmnt_2 VARCHAR2 (5000); t_check NUMBER; s_id NUMBER; ecode NUMBER; emesg VARCHAR2 (200); BEGIN DIR_NAME := 'F:\SURVEY_FILES\IN'; --pobranie ID z sekwencji SELECT adecco_apex.survey_job_seq.NEXTVAL INTO s_id FROM DUAL; INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Rozpoczynam Survey JOB' ); COMMIT; --SPRAWDZENIE CZY ISTNIEJE TABELA SELECT COUNT (*) INTO t_check FROM all_tables WHERE owner = 'ADECCO_APEX' and table_name = 'EXT_IN_INVOICE'; IF t_check > 0 THEN EXECUTE IMMEDIATE 'DROP TABLE ADECCO_APEX.EXT_IN_INVOICE'; END IF; -- stmnt_1 := 'CREATE TABLE ADECCO_APEX.EXT_IN_INVOICE(R NUMBER,FIELD_NAME VARCHAR2(255 BYTE),FIELD_VALUE VARCHAR2(255 BYTE)) ORGANIZATION EXTERNAL( TYPE ORACLE_LOADER DEFAULT DIRECTORY SURVEY_IN ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE CHARACTERSET EE8MSWIN1250 STRING SIZES ARE IN BYTES NOBADFILE NODISCARDFILE NOLOGFILE FIELDS TERMINATED BY '';'' OPTIONALLY ENCLOSED BY ''"'' AND ''"'' NOTRIM MISSING FIELD VALUES ARE NULL ( "R" RECNUM, "FIELD_NAME" CHAR, "FIELD_VALUE" CHAR )) LOCATION (SURVEY_IN:'''; stmnt_2 := ''')) REJECT LIMIT UNLIMITED NOPARALLEL NOMONITORING'; --sprawdzenie czy sa jakies pliki SELECT COUNT (*) INTO t_check FROM (SELECT SUBSTR (ret_val, LENGTH (UPPER (dir_name)) + 2, LENGTH (ret_val) ) file_name FROM TABLE (SYS.ls_directory (UPPER (dir_name))) WHERE UPPER (ret_val) LIKE '%.CSV' AND ret_val NOT LIKE '%OUT_SURVEY.CSV'); IF t_check > 1 THEN INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Rozpoczynam petle po plikach .csv z folderu IN' ); COMMIT; FOR i IN (SELECT SUBSTR (ret_val, LENGTH (UPPER (dir_name)) + 2, LENGTH (ret_val) ) file_name FROM TABLE (SYS.ls_directory (UPPER (dir_name))) WHERE UPPER (ret_val) LIKE '%.CSV' AND ret_val NOT LIKE '%OUT_SURVEY.CSV') LOOP --DBMS_OUTPUT.ENABLE (); --DBMS_OUTPUT.PUT_LINE(stmnt_1 || i.file_name || stmnt_2); BEGIN EXECUTE IMMEDIATE stmnt_1 || i.file_name || stmnt_2; EXCEPTION WHEN OTHERS THEN INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Blad podczas tworzenia tabeli: ' || ecode || '-' || emesg ); COMMIT; END; INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Czytam plik: ' || i.file_name ); COMMIT; EXECUTE IMMEDIATE 'SELECT FIELD_VALUE FROM ADECCO_APEX.EXT_IN_INVOICE WHERE R = 2' INTO company_name; EXECUTE IMMEDIATE 'SELECT FIELD_VALUE FROM ADECCO_APEX.EXT_IN_INVOICE WHERE R = 6' INTO nip_no; EXECUTE IMMEDIATE 'SELECT FIELD_VALUE FROM ADECCO_APEX.EXT_IN_INVOICE WHERE R = 9' INTO employee_name; EXECUTE IMMEDIATE 'SELECT FIELD_VALUE FROM ADECCO_APEX.EXT_IN_INVOICE WHERE R = 11' INTO hire_date; EXECUTE IMMEDIATE 'SELECT FIELD_VALUE FROM ADECCO_APEX.EXT_IN_INVOICE WHERE R = 12' INTO agreement_date; --DBMS_OUTPUT.PUT_LINE(to_date(hire_Date,'YYYY-MM-DD')); --DBMS_OUTPUT.PUT_LINE(to_date(agreement_Date,'YYYY-MM-DD')); EXECUTE IMMEDIATE 'TRUNCATE TABLE ADECCO_APEX.STG_SURVEY'; BEGIN INSERT INTO adecco_apex.stg_survey (nip, employee_name, company_name, hire_date, agreement_date ) VALUES (nip_no, employee_name, company_name, hire_date, agreement_date ); COMMIT; EXCEPTION WHEN OTHERS THEN INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Blad podczas dodawania wierszy do tabeli STG: ' || ecode || '-' || emesg ); COMMIT; END; BEGIN MERGE INTO adecco_apex.survey a USING (SELECT nip, employee_name, company_name, hire_date, agreement_date FROM adecco_apex.stg_survey) b ON (a.nip = b.nip AND a.employee_name = b.employee_name) WHEN MATCHED THEN UPDATE SET a.hire_date = b.hire_date, a.agreement_date = b.agreement_date WHEN NOT MATCHED THEN INSERT (nip, employee_name, company_name, hire_date, agreement_date) VALUES (TO_NUMBER (b.nip), b.employee_name, b.company_name, TO_DATE (b.hire_date, 'YYYY-MM-DD'), TO_DATE (b.agreement_date, 'YYYY-MM-DD')); COMMIT; EXCEPTION WHEN OTHERS THEN INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Blad podczas merge do tabeli docelowej: ' || ecode || '-' || emesg ); COMMIT; END; EXECUTE IMMEDIATE 'DROP TABLE ADECCO_APEX.EXT_IN_INVOICE'; --Wygenerowanie pliku wynikowego INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Generuje plik wynikowy OUT_SURVEY.CSV' ); COMMIT; BEGIN adecco_apex.dump_table_to_csv ('ADECCO_APEX.SURVEY', 'SURVEY_OUT', 'OUT_SURVEY.CSV' ); EXCEPTION WHEN OTHERS THEN INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Blad podczas generowania pliku OUT: ' || ecode || '-' || emesg ); COMMIT; END; INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Zamykam plik: ' || i.file_name ); COMMIT; utl_file.fremove('SURVEY_IN', i.file_name); END LOOP; ELSE INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Brak plikow .CSV w folderze IN' ); COMMIT; END IF; INSERT INTO adecco_apex.survey_job_log (ID, start_date, description ) VALUES (s_id, SYSTIMESTAMP, 'Koncze Survey JOB' ); COMMIT; END;
What can be wrong?
Help gurus!
Kind regards
PsmakR
Hello!
This stored procedure runs fine when Im running it but the thing is that DBMS Scheduler starts the application and then I do not know... So basically I do not understand how the profile can help me in this case?
With respect,
PSmakR
-
Explorer.exe freezes when Windows XP starts. Programs do not run but clickable.
Start Windows XP.
Click on I want to open an account.
Type password.
Windows desktop with icons appears.Start a hourglass when scrolling on her menu.
Frozen, you won't fix.The Task Manager, end Explorer.exe
Run Explorer.exe
Freezes again but clickable for 2 seconds.All icons on the desktop clickable and says they are running but does not actually open.
PC works fine in SafeMode w / networking.
Help please,
PC Professional, accounting files needed!
SOS!The fact that your system works well in Safe Mode (w / network) indicates that a program run as part of your startup that causes this condition. Safe mode is nothing else than Windows running with a bare minimum of programs and processes required to start your system (that is, all non-essential is cut off).
This problem will be a proposal of chance. You need start your computer Safe Mode and run a configuration manager (msconfig or autoruns) and disable programs that run automatically at startup, until you find the (s) which is causing your problem in a selective way. First turn off non-Microsoft and programs that extend if necessary MS programs. These programs will warn you generally if you try to disable something you shouldn't. After you turn off some of them, you restart normally and see if the problem persists. Once you find the program/process disturbed, the procedure is usually obvious as to the difficulty (usually UN-installing then re - install)
Autoruns: <> http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx >Procedure using "msconfig".
"How to solve configuration errors by using the System Configuration utility in Windows XP"
<>http://support.Microsoft.com/kb/310560 >HTH,
JW -
A large number of menu selections is affected, including the 'computer management', 'Event Viewer', 'Services' and 'System Configuration'.
I tried to clean a computer that was thus invaded by unwanted applications and the services that it was unusable. I applied several sets of Windows updates until it has been fairly stable, then lightened through the Services application services, changing many services 'automatic' to 'enabled' or 'disabled '. I suspect that some service necessary for the performance of the foregoing has been inadvertently stopped. (None that he was '' strongly recommended '' or '' recommended '' do not turn off or the description seemed to make a requirement, but...) I don't know how to confirm this theory, identify the missing service or reactivate a service without the Services application.I got lucky. I called a local, independent computer store. Their support staff (after confirming that I had an appropriate Windows license) told me that if the computer came with a disk for Installation of Windows Vista, there is probably a partition to start installation on the hard disk, I could get to with a special touch at the beginning of the start-up phase of the BIOS. It flashed by so quickly that I missed my chance, so I put off the power while trying to boot Windows. On my next attempt, I missed again (even if I managed to spot the key combination - F11). But when he arrived at the start-up phase of Windows, he offered me a chance to run the system restore which was banned when I was logged in with an administrator account. I had to go back a ways, but I found one who would start and was able to complete cleaning of the machine and make it to a usable state.
Thanks to all who responded.
Oh, and it seems (according to my conversation with the service of the local computer store) that my fatal mistake was by disabling the service allowing you to promote its own security. Apparently an administrator account is not the rights needed to perform most administrative functions without it; If disabling the service gets you into a nearly unrecoverable state. A hint of that in the description of the service, or even a total ban on deactivation, would be a good idea.
-Kevin -
I have two computers in a small home network, both running Windows 7. A laptop and the other a PC. The two appear in the network on each computer. The PC shows it belongs to a homegroup, but when I try and join the laptop to the Homegroup PC, following the instructions, including the seizure of the password, it fails. I want to share photos, files and documents, etc.
Any ideas.
Original title: homegroups
Read this discussion and see if it helps you:
http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-networking/HomeGroup-cannot-figure-out-how-to-share-files/f2ee4a6b-1540-4894-8a80-15168e55fc83>Here is another method that doesn't use homegroup. I've used this between two machines of Win7 and between Win7 and Win8 machine, as well as the topic Win7 and WinXP. I am frustrated with Group residential everything and currently have disabled entirely.
http://www.howtogeek.com/HOWTO/Windows-7/share-files-and-printers-between-Windows-7-and-XP/>SC Tom
-
I never use Internet Explorer, always use Firefox, but when I run CCleaner, some files appear in Internet Explorer. Can't understand why?
Note If you are using MS plugins like the Windows Media Player and Silverlight these plugins to store their data in the storage of the cache and cookies IE location.
-
I see not that everything written on the firefox page. But when open secure mod (with SHIFT because there is no written) firefox run normally.
If you have tried safe mode and the problem disappeared, this means that one of your modules are the origin of the problem are seen.
-
I am running Firefox on Mac OS 10.6.8 10.0.2. Get the message that I had to upgrade to version 11.0, but when I try Firefox says that my current version is up-to-date
Sometimes the updater becomes confused, in this case, your best option is to go to www.getfirefox.comand download and install Firefox 11 from there. You can do it just on your current installation and not your personal data will be affected.
-
Dear all,
Firefox crashes when I try to play flash videos from any website, but when I run firefox as administrator, it works very well. (but Google Chrome, Opera & I.E9 video parts without administrator.) I use Windows 7 & Firefox 7.0.1. Help, please.One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.
Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.
See:
-
I run 10 64-bit Windows and I have used iTunes for years. iTunes installs OK, I disable Norton Firewall during installation. iTunes starts OK, but when I try to access the store down ¾ of the page turns black, the upper band has Taylor Swift and a few small icons to the bottom of the page. If I type Perry Como, in the search box, the page does not change.
lysdexic01, I know almost exactly what you describe on my screen of iTunes Store recently updated for Windows 7 64-bit. Only difference is that the icons in the black box are invisible until I move the mouse above them, their location by trial and error. Once activated, the icon remains visible. Each found icon flickers at first, but stops flashing if I pass the mouse over it.
I think that the store is now functional and useless for those of us experiencing this problem. Other users have reported that their iTunes store screen flickers since they updated iTunes to the latest version, but most did not mention the area big black screen that you and I see.
So far, Apple seems not to believe that there is a problem with the software to update iTunes. It is therefore important that users continue to report these problems to Apple that there are enough complaints for attention even during a week of office party.
Maybe you are looking for
-
Satellite C660 - 23 M won't turn on and makes a high pitched noise high
Hi I'm new here Ive had my laptop for about 2 years and she had a lot of problems - broken screens, dust in the fan, etc. yesterday I used it as usual when it off completely without warning.I'm used to is happening because my laptop overheats and tur
-
Satellite L300 is dead - the battery light blinks orange 6 times
Does anyone know what was the cause of this yellow flashing light?I have the same problem with a Satellite L300. Battery light flashes orange 6 times when I press the power button and nothing else happens. Dead laptop.I just picked up a service guara
-
HP SimpleSave has started everyday errors. It's the most recent: Problem event name: APPCRASH Application name: HPSSBackupMonitor.exe App version: 1.0.2.38 Application timestamp: 4da7f7f6 Exception code: c0000094 Exception offset: 0002fa1b OS version
-
How can I install and synchronize my old palm tx handheld on a new laptop computer?
I need to get my old palm tx handheld information and put it on a new laptop.
-
I need a part # for sensor try cassette upper Canon iR 3025 (PS10 in repairs, page 6-6 and 6-7)