SQL & PL/SQL :: Does Commit Close Implicit Cursor

Feb 3, 2011

We all know that commit will do the following.

1. Save the Txn Permanently to the database.

2. Release the table locks and

3. Erase the save points.

TABLE NAME:
==========
create table TEST_PREC (NO NUMBER(4,2));
DECLARE
BEGIN
INSERT INTO TEST_PREC VALUES (12.34);
DBMS_OUTPUT.PUT_LINE('the no of records before commit '||SQL%ROWCOUNT);
commit; /* What's happening inside commit */

[code]....

why the SQL%ROWCOUNT is set to zero after commit.

Does the commit, close the implicit cursor?

View 3 Replies


ADVERTISEMENT

Implicit Commit While Purging

Oct 24, 2011

I have written a purge package that would delete records older than 10 years. Since the data is huge, the purging was taking 14 hours plus. To improve performance, I disabled constraints , deleted records and then reanabled them. This was quite quick but the only problem is rollback. Say for some reason if enabling constraints fails there is no way to rollback as enabling and disabling constraints does an implicit rollback.

View 1 Replies View Related

SQL & PL/SQL :: Use Implicit Cursor In Program

Aug 18, 2010

I've tried to use implicit cursor in my pl/sql program and i get an error as following:

DECLARE
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 17

Then,I tried to include an exception for it and the error is 'solved'.

DECLARE
d_call_id course.call_id%TYPE;
d_course_name course.course_name%TYPE;
d_term_desc term.term_desc%TYPE ;
d_f_first faculty.f_first%TYPE;
d_f_last faculty.f_last%TYPE;
d_day course_section.c_sec_day%TYPE;
d_time course_section.c_sec_time%TYPE;
d_bldg_code location.bldg_code%TYPE;
d_room location.room%TYPE;
[code]....

By actually the program are suppose to return the records instead or returning the error. I've included the table that i'm trying to retrieve the records from as well.

View 4 Replies View Related

SQL & PL/SQL :: Implicit Cursor In Single Statement?

Feb 7, 2011

1) SQL Statements are not using IMPLICIT CURSORS.

2) Only the SQL statements of the PLSQL program create implicit cursors.

View 1 Replies View Related

SQL & PL/SQL :: Differences Between Explicit And Implicit Cursor?

Nov 16, 2011

what are the main points that these examples are considered cursors? and why are they called explicit and implicit cursor.

explicit
for x in (select * from emp) loop
dbms_output.put_line('emp no: '||x.empno);
end loop;

implicit
select empno
into vEmpno
from empno
where empname = 'SCOTT';

for all we know that these are not clearly defined on the declaration area as cursor.

View 16 Replies View Related

SQL & PL/SQL :: Difference Between Implicit And Explicit Cursor?

Feb 21, 2013

What is the difference between implicit cursor and explicit cursor in PL/SqL?

And what is ref cursor ?

View 2 Replies View Related

PL/SQL :: Difference Between Explicit And Implicit Cursor?

Nov 5, 2013

difference between between these two constructs. Finally  when i read the asktom.oracle.com , I was totally confused. The reason is thatTom says...we can retrieve more than one row in implicit cursor. If that would be case, what's the difference between these two cursors?? when to use?? My understanding was implicit cursors" ---> single-row queryExplicit cursors ---> multi-row query Experts

View 10 Replies View Related

Server Administration :: How To Find And Close Open Cursor List Without Restarting

May 28, 2013

In my environment found maximum open cursor exceeds error. So how can I found the open cursor list and how can I close that cursor without restarting. Any SQL commands to close the open cursor.

View 4 Replies View Related

Dividing The Cursor Records Using Commit Limit

Sep 18, 2011

I have to optimize a batch job which returns > 1 lakh records . I have a commit limit being passed . I am planning to divide the cursor records for processing as follows. If the cursor suppose returns 1000 rows and the commit limit passed is 200 , then i want to fetch 200 records first , bulk collect them into associative arrays and then bulk insert into target table.

After this is done, i will fetch the next 200 records from the cursor and repeat the processing. I would like to know how i can divide the cursor records, and fetch "limit" number of records at a time and also be able to go to the next 200 recs of the cursor next time.

View 1 Replies View Related

Auditing And Implicit Commits

May 11, 2009

I'm working on a Java-based web application and we have unit tests that we use to test all our all code that interacts with the database or code that interacts with our DB code. The Spring framework allows us to perform some DML within a transaction before each test and then rollback the changes. For the most part, this works, however when I run the full suite of unit tests, it will randomly commit data to the database causing the rest of the tests to fail.

will Oracle's auditing let me see where this odd-ball commit is occurring? Is there another way for me to see when data is being committed?

This does not appear to be happening on any of the systems we've deployed, however this is a bit unsettling and would like to know why this is occurring so that we can prevent it from happening in production.

View 1 Replies View Related

Implicit Data Conversion / Join Conditions Between Number And Vrahchar2

Jun 17, 2013

In my Project, there are many queries have join conditions between Number and Vrahchar2. Will it give any wrong results or Invalid Number exception even the varchar2 column always contains the number data?

Example:
Select * from Table_t1 t1, table_t2 t2
where t1.num_col = t2.var_col
-- Here var_col always hold only numaric data.

View 1 Replies View Related

How To Close Window In Oracle Forms 6i

Nov 27, 2004

code for "when button pressed" trigger that will close the current window and displays another window.

View 4 Replies View Related

Forms :: Close A Window In Query Mode

Apr 10, 2010

How do I close a window in query mode?My form has a button "Populate from Charge Master" which opens a window containing a List Item (Department Names) and 2 buttons,

1. "Select the Dept" and
2. "Cancel"

The WHEN-BUTTON-PRESSED trigger code for "Populate from Charge Master" button is as follows:

begin
SHOW_WINDOW('WINDOW_POP_FROM_CHARGE_MASTER');
go_block('bl_med_dep');
enter_query;
end;

Code for "Select" button in the window is:

populate_from_charge_master(:bl_med_dep.med_dep_code,:bl_med_charge_party.charge_party_no);
execute_query;
COMMIT;
HIDE_WINDOW('WINDOW_POP_FROM_CHARGE_MASTER');
GO_BLOCK('BL_MED_CHARGE_PARTY');
EXECUTE_QUERY;

Code for "Cancel" button in the window is:

BEGIN
hide_window('WINDOW_POP_FROM_CHARGE_MASTER');
show_window('WINDOW1');
GO_BLOCK('BL_CHARGE_COMPANY');
END;

Here WINDOW1 is the main window and WINDOW_POP_FROM_CHARGE_MASTER is the window which must be closed when "Cancel" button is pressed.

When I remove "enter_query" statement in "populate from charge master" trigger code, I am not able to select any of the departments from the list. and If I have that statement, I am not able to hide/close the window.

View 5 Replies View Related

ODP.NET :: ManagedDataAccess OracleConnection.close Is Extremely Slow

Jul 26, 2013

In a vb.net app we use Oracle.ManagedDataAccess.dll (version version 4.112.3.50) to read 1000s of records of a ResultSet.  Once the records are read and processed, we call connection.close() which takes 15 minutes or more to complete.  The more records read the longer the close takes.This is a minimized code example: 

dbcon = New OracleConnection()dbcon.Open()cmd = New OracleCommand(sqlString, dbcon)reader OracleDataReader = cmd. ExecuteReader (CommandBehavior.SingleResult)While (reader.Read())  'consume and process recordEnd While reader.Dispose()cmd.Dispose()dbcon.Dispose()

View 1 Replies View Related

Precompilers, OCI & OCCI :: Error Implicit Conversion Of String Literal To (char) Is Deprecated?

Jan 30, 2011

i write a select statement in proc that contains 44 columns.

when i precompile it. it is showing the error: implicit conversion of string literal to "char *" is deprecated.when i compile the same select with 40 columns it is not showing any error.

but for more than 40 columns (41-44) it is showing the above error.

View 1 Replies View Related

Server Administration :: Close All Open Cursors In Other Session?

Mar 23, 2010

How to Close All open cursors in other session.

NAME TYPE VALUE
------------------------------------ ----------- ---------------
cursor_sharing string EXACT
cursor_space_for_time boolean FALSE
open_cursors integer 500
session_cached_cursors integer 50

Ex. as above we have 500 max cursor

seesion show 499 and now we need to flust all open cursors

View 9 Replies View Related

(failed To Close File) Error Message While Backing Up DB?

May 30, 2012

We have been getting the below error message, while backing up the DB(Full DB backup) via netbackup. The DB version is 10.2.0.3 (64bit). The archive backup goes fine. the problem is with the full backup.

input datafile fno=00241 name=/u106/oradata/iwhdbqa/iwh_mvlog_01x.dbf
channel CH02: starting piece 1 at 29-MAY-12
RMAN-03009: failure of backup command on CH01 channel at 05/29/2012 21:41:28
ORA-19506: failed to create sequential file, name="iwhdbqa_20120529210533_db_ipnc7n6l_1_1", parms=""

[code]...

I came to know that this is a netbackup configuration/client bug. Can we do something from the oracle side.

The RMAN COMMAND STRINGS we use is as follows:

SET SNAPSHOT CONTROLFILE NAME TO '/u101/app/oracle/product/10.2.0.5/db_1/dbs/iwhdbqa_snapshot_db.snap';
RUN {
ALLOCATE CHANNEL CH01 TYPE 'SBT_TAPE' parms='SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1' ;
SEND 'NB_ORA_SERV=atlbackupmaster, NB_ORA_POLICY=iwh-dbqa_oracle, NB_ORA_CLIENT=iwh-dbqa-bu';
ALLOCATE CHANNEL CH02 TYPE 'SBT_TAPE' parms='SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1' ;

[code]...

View 3 Replies View Related

Forms :: Close Java Applet WebStart Window

Dec 18, 2010

I am Trying to use jnlp file to launch my form application and it looks good, all works fine , except one thing

1) When i close form application, the webstart applet window doesn't close.

View 1 Replies View Related

Forms :: DDE Package - How To Close Excel File Without Saving Changes / Messages

Nov 19, 2009

I need to rescue some valors from Excel, and then close the excel file without saving changes and without messages.

I am using THe DDE package and when using

DDE.EXECUTE(convid, '[Save()]', 10000);

there is no problem, but the changes are saved. I have tried '[Exit()]' and '[Close()]' but always have error message ORA-106555. Is there any way of doing this without errors?

View 11 Replies View Related

Reports & Discoverer :: How To Close Window Automatically Without Manual Intervention

Oct 20, 2010

I am running a report which is called for a set of employees picked up in the cursor. For each employee the report is run in a different window. However, the report runs fine and the output gets saved in the local machine but the window doesn't get closed automatically.

How to close the reports window automatically without manual intervention?

View 2 Replies View Related

Forms :: Windows Close / Click On Save Button Data Get Saved

Jun 29, 2010

i design one master detail block and one command button for saving the data....as i click on save button data get saved and after that if i want to close form then at this time it again asking me for save changes window..

View 8 Replies View Related

Application Express :: Auto-Close Modal Page When Nothing Is Changed In The Form

Jul 15, 2012

I am using Skilllbuilders modal page 2.0 to edit the form. Sometimes, the end user clicks on the edit link to trigger the modal page and sees the form , but he/she could not do any changes. Thus, when clicking Apply Changes button, we will be redirected to the page 102 ( the empty page ). How can I get around and make the page 102 to close automatically in case I am redirected to it ?

I put this in a JavaScript a dynamic action to be fired as page loads:

$(document).apex_modal_page('close');but nothing happen.

View 2 Replies View Related

Data Guard :: ORA-01154 / Database Busy - Open / Close / Mount And Dismount Not Allowed Now

Sep 21, 2010

I am trying to create the Physical StandBy Database in the same server. Till last 2 Final steps, everything went on well. In the final steps, when I try to open the StandBy Database, it throws the following Error:

*******************************************************
SQL...> alter database open;
alter database open
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now
*******************************************************

I tried creating the Physical Standby with the following Steps.

Environment: Oracle Release 10.2.0.1.0 / Windows 2003 Server Enterprise Edition SP2
Primary DB = 'PrimDB'
StandBy DB to be created ='StBy1DB'

In the same Server, location for

PrimDB datafiles='F:oracleproduct10.2.0oradataPrimDBData',
StandBy Datafiles='E:StandBy_DBData'
PrimDB Control Files='F:oracleproduct10.2.0oradataPrimDBControl'
StandBy Control Files= 'E:StandBy_DBControl'

[code]....

Step 1 Create the Oracle Service for StandBy DB "StBy1DB' and Create the Standy DB Password file.

ORADIM -NEW -sid StBy1DB -intpwd passwd -startmode manual

Step 2 Shut down the primary database.

SQL> SHUTDOWN IMMEDIATE;

Step 3 Copy the datafiles to 'E:StandBy_DBData'. (including Temp01.dbf is it Right?)

Step 4 Restart the primary database.

Restart the primary database:

SQL> STARTUP;

Step 5 Create a Control File for the Standby Database (Should this command be given in Mount Status or Open Status?)

From Primary database,

SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'E:StandBy_DBControlStByControl01.ctl';

Step 6 Prepare the Initialization Parameter File to be Copied to the Standby Database

SQL> CREATE PFILE='E:StandBy_DBPFileinitStBy1DB.ora' FROM SPFILE;

Step 7 Set Initialization Parameters on a Physical Standby Database

db_cache_size=444596224
java_pool_size=4194304
large_pool_size=4194304
shared_pool_size=150994944
streams_pool_size=0

[code]....

Now When I type the following command, it throws an error:

SQL...> alter database open;
alter database open
*
ERROR at line 1:
ORA-01154: database busy. Open, close, mount, and dismount not allowed now

View 2 Replies View Related

RMAN :: RMAN-03014 / Implicit Resync Of Recovery Catalog Failed

May 29, 2013

My oracle backup via Netbackup failing with error 6 (Netbackup) and i have checked the logs please find the RMAN log file as well.

Script /opt/rman_script/st72_oracle_full.sh
==== started on Tue May 28 15:27:46 SGT 2013 ====
RMAN: /OraBase/V10203/bin/rman
ORACLE_SID: ST72
ORACLE_USER: oracle
ORACLE_HOME: /OraBase/V10203
NB_ORA_FULL: 1
NB_ORA_INCR: 0

[code]....

View 2 Replies View Related

Precompilers, OCI & OCCI :: Pro*C - Cursor Leak With Cursor Array

Sep 7, 2007

I'm dealing with an ORA-1000 error in a Pro*C application where all the cursors are correctly closed (or so it seems to me).

Here is the code for a simple program which reproduces the problem:

Each cursor is opened in a PL/SQL package:

CREATE OR REPLACE PACKAGE emp_demo_pkg AS
TYPE emp_cur_type IS REF CURSOR;
PROCEDURE open_cur(curs IN OUT emp_cur_type, dept_num IN NUMBER);
END emp_demo_pkg;

[Code]....

While testing the initialization parameter open_cursors is set to 50.

It's my understanding that Oracle doesn't close the cursors until it needs the space for another cursor, which in my test case seems to happen when I enter a value of 50 or bigger for "number of loops". To see how oracle is reusing the cursors, while the test program is running I run SQL*Plus and query v$sesstat for the session that's running the test with the following sentence:

select name, value
from v$sesstat s, v$statname n
where s.statistic# = n.statistic#
and sid = 7
and name like '%cursor%';

Even before I enter a value for number of loops I can see that the session opened 4 cursors and closed 2 of them:

NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 4
opened cursors current 2

Entering a value of 5 for number of loops yields

NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 11 <----- 7+
opened cursors current 8 <----- 6+

With a value of 30

NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 36 <----- 25+ (apparently, Oracle reused at least 5 cursors)
opened cursors current 33 <----- 25+

With a value of 47

NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 53 <----- 17+
opened cursors current 50 <----- 17+

Now I reached the upper limit set by the initialization parameter open_cursors.

Entering a value of 48, I get the ORA-1000 error.

ORA-01000: maximum open cursors exceeded
ORA-06512: at "SCOTT.EMP_DEMO

Since I open and close the cursor in the same loop iteration, I expect to find in every iterarion 1 explicit cursor and a number of implicit cursors (the PL/SQL call along with the so-called recursive cursors), but I don't expect the sum of all of them to be greater than 50. If my understanding is correct Oracle should be reusing the 50 cursors previously marked as "closeable", not raising the ORA-1000 error.

View 1 Replies View Related

Forms :: Opening Form Has Attached Libraries Caused Form Close

Jul 19, 2010

If I open a form has attached libraries in form builder on windows7 it closed and give this message :

Problem signature:
Problem Event Name:APPCRASH
Application Name:frmbld.exe
Application Version:10.1.2.0
Application Timestamp:42d63632
Fault Module Name:KERNELBASE.dll

[code]......

View 14 Replies View Related

SQL & PL/SQL :: Cursor With Bind Variable And Cursor Record

Feb 25, 2011

Is it possible to:

-define a cursor with bind variables
-get a cursor record from these cursor
-and pass the bind variable in the OPEN clause

Did'nt succeed as shown in the example.

SET SERVEROUTPUT ON SIZE 900000;
DECLARE
--works fine
CURSOR c1 IS SELECT * FROM USER_TABLES WHERE rownum<3;
--doesn't work
--CURSOR c1 IS SELECT * FROM USER_TABLES WHERE rownum<:1;
crec c1%rowtype;
BEGIN
--works fine
OPEN c1;
--isn't possible ?
--OPEN c1 USING 3;

[Code]....

View 3 Replies View Related

SQL & PL/SQL :: Converting Numeric Cursor To Ref Cursor?

Sep 11, 2011

just looking around to use the new feature available in oracle 11g to convert the dbms_sql numeric cursor to reference cursor, how to do it?

parse and execute the sql string first with dbms_sql and then convert it to ref cursor?

View 1 Replies View Related

SQL & PL/SQL :: Open Ref Cursor From Explicit Cursor

Nov 23, 2011

I want to return ref cursor based on explicit cursors

create table jumbo(id number, name varchar2(20));
insert into jumbo values(1,'jumbo');
create table mumbo(id number, name varchar2(20));
insert into mumbo values(1,'mumbo');
commit;

[Code].....

The above procedure has compilation errors when I am trying to open ref cursor

LINE/COL ERROR
-------- --------------------------------------------------------
20/24 PL/SQL: SQL Statement ignored
20/38 PL/SQL: ORA-00942: table or view does not exist
32/24 PL/SQL: SQL Statement ignored
32/38 PL/SQL: ORA-00942: table or view does not exist
SQL>

View 5 Replies View Related

PL/SQL :: Can User Exist When Cursor Will Using For Cursor

Aug 7, 2013

Can i user exist when cursor will using For Cursor .

View 15 Replies View Related







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