At PLSQL Level How To Make The Program Re-startable

Jun 19, 2011

At PLSQL level how can we make our program re-startable such that if there is some abort after the commited update program will restart from the last commit checkpoint.

View 2 Replies


ADVERTISEMENT

Program That Uses SQLPlus To Run PLSQL Scripts

Oct 19, 2010

we have a program that uses SQLPlus to run PLSQL scripts - this program then checks the return code of SQLPlus to determine whether the script ran successfully. Our PLSQL scripts often call other PLSQL scripts via "@@OtherScript.sql" - one problem we have is that if (due to an engineering mistake) the OtherScript.sql file is missing, SQLPlus throws an SP2 error stating that the file was not found. However, the return code of SQLPlus does not indicate any problem. I have found, by searching the internet, that I can simply add a line "whenever OS error exit failure" to our script which then allows our program to detect the failure... however, the error message is not as informative:

CODESQL*Plus: Release 11.1.0.7.0 - Production on Tue Oct 19 10:28:45 2010
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[code]....

is it possible to get BOTH types of error messages? With "oserror exit" set it does not tell you which file was not found.. which is useful information. I would like the SQL Plus session to return failure but also print out what file it did not find.

View 4 Replies View Related

Networking And Gateways :: C Program Call From Plsql

Jan 24, 2013

my db version is:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

entry in my listener.ora file
===========================
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
[code]......

entry in tnsnames.ora file:
===============================
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc0))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl.example.com)
)
)

listener is running perfectly. created c program, compile the program by

gcc -c <filename>
ld -shared -o <filename.so> <filename.o>
cp <filename.so> $ORACLE_HOME/bin

create library & function from db. when I am invoking this function it is throwing error message:

ORA-28546: connection initialization failed, probable Net8 admin error

View 1 Replies View Related

Forms :: Make A Field As Mandatory At Current Record Level

May 27, 2010

I have one requirement i.e i want to make a particular item as mandatory for the current record in the tabular form.

so i have written code as below:

DECLARE
lv_item item;
BEGIN
lv_item := FIND_ITEM ('XXMZ_DETAIL.QTY_ACT');
SET_ITEM_INSTANCE_PROPERTY (lv_item,
current_record,
required,
property_true);
END;

This code is not effecting qty field. If i write set_item_property built-in that item becomes mandatory.But it's not effecting at current record level.It's effecting block level.

So how can i make a field as mandatory at current record level?

View 7 Replies View Related

Precompilers, OCI & OCCI :: Cobol Program That Call C Program

Jan 28, 2011

I have a Cobol program that call C program above

#include stdlib

EXEC SQL INCLUDE SQLCA;
EXEC SQL BEGIN DECLARE SECTION;
char *uid = "puntos/puntos@cmrdesar";
[code]....

Are something wrong in C programm ? Pro*C code from vouters.dyndns.org/tima/OpenVMS-Cobol-C-Cobol_ passing_ variable_ number_ of_ arguments_to_C.html

View 1 Replies View Related

SQL & PL/SQL :: Row Level To Column Level Data Transposition?

May 14, 2010

I have a data like,

1) manual_temp_master

auto_idbatch_id sec_idsec_id_type crrncy_cdcreate_Dt price_dt
------------------------------------------------------------------
11234ABC1CUSIPUSD14/05/201014/05/2010
23456XYZ1SEDOLGBP13/05/201013/05/2010

2)manual_temp_detl

auto_idbatch_id Price_bkt_cdscreate_Dtprice_date
---------------------------------------------------------
11234PS114/05/201014/05/2010
11234PS214/05/201014/05/2010
11234PS314/05/201014/05/2010
11234PS414/05/201014/05/2010

[code]....

I want to write a sql query which will fetch the data from manual_temp_master and manual_temp_detl.But from manual_temp_detl table, Price_bkt_cds columns should be displayed as columns. Like the should look like as below:

sec_idsec_id_type crrncy_cd COL_PS1 COL_PS2 COL_PS3 COL_PS4 COL_PS5COL_PS6price_date
--------------------------------------------------------------------------------------
ABC1CUSIPUSDPS1PS2PS3PS4PS5PS614/05/2010
XYZ1SEDOLGBPPS1PS2PS3PS4PS5PS613/05/2010

View 8 Replies View Related

SQL & PL/SQL :: DBMS_STATS For Table Level Vs Partition Level

Nov 17, 2010

what is the difference on DBMS_STATS for table level and partition level , which will provide the best optimizer . If the table xxxx is partitioned from 1 to 10 ,then running gather stats on table xxxx as whole table level or partition level which will provide best result on the performance.

View 1 Replies View Related

Backup & Recovery :: Incremental Backup Level 1 Or Level 0 Without Archivelogs?

Oct 22, 2012

Can you take an incremental backup level 1 or level 0 without archivelogs?

syntax would bebackup as compressed backupset cummulative level 1 database.

The reason I ask is because when I run backup as compressed backupset cummulative level 1 database plus archivelogs # it runs fine, but when I run backup as compressed backupset cummulative level 1 database it just hangs.

View 20 Replies View Related

SQL & PL/SQL :: Row Level And Statement Level

Apr 11, 2013

between statement level or row level trigger, which trigger will execute first.We have BEFORE_UPDATE_ROWLEVEL_TRIGGER and BEFORE_ UPDATE_ STATEMENT LEVEL_TRIGGER triggers on table product.

which will execute first on update DML event ?

View 2 Replies View Related

PLSQL With Java?

Aug 2, 2010

This is a daily batch job which captures end of the day changes from a set of Oracle 10G "Source" tables in (.exp) file and another overnight batch job will read from (.exp) files and Insert into Oracle 10G "Target" Tables. The .exp files are created by Oracle 10G Data Pump utilities.In future we will be migrating Target to Teradata. All the tables will be migrated. No change in table names or structure.

The plan of action to write the later bit of PLSQL (which read from .exp files and loads it into Target tables) into Java so that the programe can be re-used on teradata.

Questions

1) Can Java read the contents with in .exp files and insert into Oracle tables?
2) Can Teradata read the contents with in .exp files and insert into Teradata tables?
3) Will we be achieving any benefit if we execute DDL (Insert) using Java rather than PLSQL. Obvious one being Platform independent.

there is no transformation of data in flight between .exp to Target tables.

View 2 Replies View Related

How To Use Parameters In Plsql Procedure

Oct 21, 2010

I have excel file which I am reading through plsql procedure using UTL_FILE utilities, one of the column in the excel has multiple values in the same column, I am getting the values into plsql, but when it is coming to where clause its not working.

Example:
in excel the column has : 'ABC','GEH','HGT',LTP'

create or replace procedure abc(temp_col varchar2)
.
....
....
...
SELECT COLA, COLB, COLC
FROM TABLE_TEMP
WHERE TCOL IN temp_col;

This is not working, if the column in excel has one value say ('ABC') then the above sql is working, if it has more than one value its not working.

View 2 Replies View Related

Error In PLSQL Developer

Dec 22, 2010

I have upgraded my Operating Syatem from Vista to Win7. I have SQL nav version but is not supported on Win7. So I have installed PLSQL developer. When I try to connect its giving the error connection not open. But when I tried the same credentials with SQLPLUS it's working fine.

View 3 Replies View Related

Best Practice For Using Commit In PLSQL Blocks

Jun 14, 2011

If in a PlSQL procedures there are many DML statements which are part of the same transaction. and there are many calls to other PLSQL blocks also.

what is the best practice to use commit either after each DML statement or to use it in the End of Block?

View 8 Replies View Related

Dynamic Matrix Format In Sql / Plsql

Dec 14, 2012

how can i display the out in matrx format.

example;

select country_code
, item_number
, sum(quantity)
FROM item_table it

[Code]...

output format:

--------- country_code1 country_code2 country_code3 country_code4
item1 10 77 99 87
item2 30 67 56 76
item3 35 45 66 66
item4 50 33 56 67

FOR my case PIVOT_ won't work. I am using 10g database.

View 1 Replies View Related

Passing Unstructured Data From Pro*C To PLSQL

Dec 12, 2011

My application reads a binary file in C++ using fstream.read and needs to save that binary data into the database as a blob.

I am not using OCI.

My struggle is trying to determine the proper way to pass this unstructured data to a PLSQL procedure.

1 > What data type should the input paramter be for the PLSQL procedure?

2 > My binary data is in a char variable. Do I need to convert that to something else before passing it as a parameter.

View 3 Replies View Related

PL/SQL :: Finding Commits In Plsql During Runtime?

Jul 19, 2012

In any application, we will have many commit statements issued in many places. How can we find out as to where all commits have happened during runtime.

Basically in our application, when am trying an operation, am getting the error ORA-01086: savepoint <save point name> never established.

My guess is that there is a commit somewhere because of which system is not able to rollback to that save point.

View 1 Replies View Related

Writing A PLSQL Procedure To Housekeep Files?

May 22, 2007

I am trying to implement a Houskeeping program for files generated in 4 different servers. This housekeeping program is run as a batch job and I need to use PLSQL to implement it. The files need to be housekept on the basis of the file creation date.

how I can go about doing this using a PLSQL stored procedure.

View 3 Replies View Related

Debug The Procedure In PLSQL Developer Tool?

Feb 18, 2009

I want to debug the procedure using PLSQL Developer tool?How to use the debug option in that tool?.

View 1 Replies View Related

Forms :: How To Send Pic And TEXT In Email Using PLSQL

Jun 13, 2010

I am create procedure send the message in form bulider10g to Internet email and the procedure is work .

but now I want to modify this procedure , I want to add picture of my country ( logo ) and the original message . why cant display the image in my email ?

this code of image

<p align="center"><img border="0" src="logo.gif" width="20" height="20"></p>

I Think the problem of this code because 'Content-type: text/html' not image ?????!!!!!!!

utl_smtp.data(v_Mail_Conn, 'MIME-Version: 1.0' ||CHR(13)|| CHR(10)||'Content-type: text/html' || CHR(13)||CHR(10)||mesg);

procedure

EMAIL_SEN VARCHAR2(250);
EMAIL_REC VARCHAR2(250);
DESC_EN VARCHAR2(250);
UB_SEQ NUMBER(10);
BEGIN
DECLARE
v_From VARCHAR2(80) :=admin@yahoo.com ;
[code].........

View 2 Replies View Related

PLSQL Via Data Link To Remote Database

Nov 23, 2012

I have one PLSQL package that does a join of two tables of remote database instance via the datalink. I just wonder where the most calculation(the join) is done, local machine or remote machine? Is there any best practice to have a better performance for such configuration.

View 3 Replies View Related

Performance Tuning :: PLSQL And Related Cursors Generated In V$sql

Jan 26, 2012

I wanted to know how to find the links between cursors that have been created in v$sql after compiling a PLSQL procedure.

For example, if i compile the following procedure :

create or replace
PROCEDURE PROCEDURE1
AS
BEGIN
insert into t values(1,1);
END PROCEDURE1;

, the 2 following cursors are created in v$sql :

select SQL_ID, SQL_TEXT from v$sql
where sql_id in ('71pj8t5nz1d80','2s567zb6684sh');

"SQL_ID""SQL_TEXT"
"2s567zb6684sh""BEGIN PROCEDURE1; END;"
"71pj8t5nz1d80""INSERT INTO T VALUES(1,1)"

Thus, i would like to know how to find that the cursor 71pj8t5nz1d80 is called/linked by the cursor 2s567zb6684sh.

This would be useful for interpreting some sql statistics in v$sqlstats in where such cursors appear and related sql statistics are accounted twice.

View 1 Replies View Related

Forms :: Calling Java Class Files From PLSQL?

Jun 19, 2007

I have imported a java class file that inturn gets content from a webservice. One of the functions on that imported class file is as follows ...

Funtion getcontent(A1 JOBJECT,A2 JOBJECT, A3 String) return JOBJECT ....

In my PLSQL package ...How do I invoke this class file ?

So far I have done this ...

Declare
abc ORA_JAVA.JOBJECT;
xyz ORA_JAVA.JOBJECT;
xxx VARCHAR2(25);
value ORA_JAVA.JOBJECT;
BEGIN

[code]...

I am getting an error saying the object type is wrong .... I would like to know how to assign a hardcoded value to the JOBJECT just to test before I continue.

View 20 Replies View Related

Client Tools :: Spool Without SQL Statement And Commands In PLSQL?

Jan 3, 2011

I have a PLSQL script.

sqlplus
$DB_ACCT << EOSQL
set heading off
set termout off
set pagesize 0

[code]....

My output in FILE.txt looks like this
SQL>
SQL> Select col_with_a||col_with_b||col_with_c from
2 alphabet_table;
abc

[code]....

I tried several options by putting set echo off, etc.What do I include in the sql script to get the output as :
abc
abc
abc

without the SQL prompt and the statement, and the spool off command?

View 2 Replies View Related

Backup & Recovery :: Execute A BATCH File Through PLSQL?

May 30, 2012

execute a BATCH File through PLSQL.

BEGIN
dbms_scheduler.Create_schedule(schedule_name => 'RMAN_TICKER_STARTING',
repeat_interval => 'FREQ=DAILY;BYHOUR=9; BYMINUTE=15,30,45,59',
comments
=> 'schedule to run daily');
dbms_scheduler.Create_program (program_name => 'TICKER_PROGRAME',

[code]....

It was created successfully, but when I execute, it shows the error message.

BEGIN
dbms_scheduler.Run_job ('RMAN_TICKER_JOB', TRUE);
END;
begin
dbms_scheduler.run_job (
'RMAN_TICKER_JOB',TRUE);
end;
Error at line 1
ORA-27370: job slave failed to launch a job of type EXECUTABLE
ORA-27300: OS system dependent operation:accessing execution agent failed with status: 2

[code]....

But I have the CMD file in the location - "F:FEEDLGRTOOLSfeedlgr.cmd".

View 2 Replies View Related

Client Tools :: PLSQL Developer - Paste Option?

Apr 20, 2012

From last couple of days, the paste option is not working for me in the PLSQL developer. I selected the text in a SQL window, selected copy.

At the desired location when I right click paste option is not visible in a menu. If it is visible then also it did not paste. I tried Ctrl-V also.

View 2 Replies View Related

SQL & PL/SQL :: Creating PLSQL Collection Table Type With Dynamic Query?

Jul 12, 2013

How can I create PLSQL table type dynamically?

I will have to take the Employee Names and create a table structure. Number of employee names can vary from day to day. So, whenever I execute my procedure with Table type, I will have to build the table columns with the employee names.

View 2 Replies View Related

Application Express Listener :: Calling Plsql Procedure From Web Browser?

May 9, 2013

I have problems with calling procedure directly from webbrowser. I have a procedure test in test_pkg package. I granted execute on it to anonymous , added it to wwv_flow_epg_include_mod_local function and still have error 404.searched this forum and found this: Does listener use wwv_flow_epg_include_mod_local

So I granted to apex_public_user and created synonym for him to my package. And it starts working. But then I wanted to add next proceudre to my package the same way, and change my test procedure and it stop working again. Now I have 404 error again.

View 3 Replies View Related

Application Express :: Validation - PLSQL Function Returning Boolean Bug?

Mar 12, 2013

Application Express 4.1.1.00.23 ( plus all earlier versions that I've ever used)

When using the wizard to create a Validation of type "PLSQL Function returning Boolean", why is it mandatory to enter a value in the text field "Error Message" on the screen that follows? This message is never used as the message actually displayed comes from a PLSQL return statement.

View 5 Replies View Related

Windows :: Copy A File To DB Server From A Remote Machine Using Plsql / Java

Oct 2, 2013

We want to copy a file from a remote machine to the DB server. copy \<IP_ADRESS>SHARED_FOLDERsome_file.sql d:copied_file.sql

I've used Java and a wrapped it into a PL/SQL procedure so I can do :

exec run_os_command(p_command => 'copy \<IP_ADRESS>SHARED_FOLDERsome_file.sql d:copied_file.sql');

The file was not copied.

I have mapped \<IP_ADRESS>SHARED_FOLDER to x: for example and issued : exec run_os_command(p_command => 'copy x:some_file.sql d:copied_file.sql');

The file was not copied.

But when I issued from the OS prompt copy x:some_file.sql d:copied_file.sql then the file is copied.

What can I add to the PL/SQL procedure so it wil work ?

View 19 Replies View Related

Application Express :: Show Region After Running Dynamic Action Plsql?

May 1, 2013

i have a hidden region at the page top i want to show only after clicking my button which is running DA plsql code. This region is like a prompt message container/div at the top of the page so after few seconds like 10 secs i want to hide it again. I tried to use JQUERY but never hide it back, also i tried another TRUE CONDITION within my dynamic action but it doesnt reset it back the region is always shown...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved