SQL & PL/SQL :: How Oracle Manages Multiple Sessions In A Database Performing DML

Feb 25, 2011

I was just wondering how Oracle manages multiple sessions in a database performing DML. I believe this is related to 'Read Consistency' and I tried to search for the same but could not get any satisfactory online documents.

CASE 1:
user A logs in to a database1
issues select on table A and then inserts 4 rows
user B logs in to databse1
issues select on table A and then inserts 5 rows
issues rollback
user C logs in to a database1
issues select on table A and then inserts 6 rows
issues commit

How many rows can user C see in the table A when he issues select?

CASE 2:
user A logs in to a database1
issues select on table A and then inserts 4 rows
user B logs in to databse1
issues select on table A and then inserts 5 rows
user C logs in to a database1
user B issues rollback
user C issues select on table A and then inserts 6 rows
issues commit

How many rows can user C see in the table A when he issues select?

NOTE: All the users are currently logged in to the same database and none has logged out.

View 6 Replies


ADVERTISEMENT

SQL & PL/SQL :: UPDATE Query Opens Multiple Oracle Sessions

Feb 24, 2011

We recently migrated from 9i to 11g.

One UPDATE query runs for 2min and it opens multiple oracle sessions. Almost 40 sessions. Once the UPDATE is done, the sessions close.

When monitoring V$SESSION, found that the newly opened sessions have a PROGRAM value like "oracle@server (P001)"

The UPDATE query is as below. The query works fine, no issue with performance.

SET t1.text =
( SELECT text
FROM table2 t2
WHERE t1.col1 = t2.col1
AND t1.col2 = t2.col2
AND ROWNUM < 2
[code].......

View 13 Replies View Related

SSO Preventing Multiple Concurrent Oracle Sessions From Loading

Nov 16, 2012

We are experiencing a problem with SSO causing 2nd or 3rd concurrent Oracle sessions to hang. The Oracle application hangs during loading and the task manager has to be used to close the application.

I have tested logging onto our application servers using SSO and I cannot load more than 3 concurrent Oracle sessions. When I bypass the SSO and logon to the same server I can load more than 20.

View 1 Replies View Related

Database Hangs On Performing Logswitch

Oct 16, 2012

Iam usin 11.2.0.3 database on linux 64 bit machine

I have got the report from the users that the dataload operation which they perform in the database is taking normal than the expected time

I rebooted the server and started the database i can see that the database startup is even taking more time

The memory allocated is sufficient and when i tried to perform the logswitch the database simply hangs

alertlog contents after restart
---------------------------------------

minact-scn: useg scan erroring out with error e:12751
Tue Oct 16 11:02:03 2012
minact-scn: useg scan erroring out with error e:12751
Suspending MMON action 'Block Cleanout Optim, Undo Segment Scan' for 82800 seconds
Tue Oct 16 11:12:47 2012

Active Session History (ASH) performed an emergency flush. This may mean that ASH is undersized. If emergency flushes are a recurring issue, you may consider increasing ASH size by setting the value of ASHSIZE to a sufficiently large value. Currently, ASH size is 50331648 bytes. Both ASH size and the total number of emergency flushes since instance startup can be monitored by running the following query:

select total_size,awr_flush_emergency_count from v$ash_info;
Tue Oct 16 11:17:53 2012
Suspending MMON action 'undo usage' for 82800 seconds
Tue Oct 16 11:28:05 2012
Suspending MMON action 'metrics monitoring' for 82800 seconds

View 3 Replies View Related

Inactive Sessions In Database?

Dec 12, 2011

In our databace there are around 300 sessions were in inactive state.

Database is not releas the sessions.

View 2 Replies View Related

Command Won't Terminate Current Sessions To Database

Aug 23, 2010

lsnrctl RELOAD [listener_name] Hope the above command wont terminate the current sessions to the database.

View 2 Replies View Related

Server Administration :: Database Sessions - Setting Value Of Parameter

Mar 26, 2013

I have a simple question about database sessions. The value of parameter "sessions" is set to 500 and the users connect to database through an application server(Jboss). There are more than 500 users connect to the database through application.

My question is, how more than 500 users can connect to the database without any issue, if we set the value of "sessions" parameter to 500?

View 2 Replies View Related

Application Express :: 4.2 New Database Sessions Per Report Region?

Nov 22, 2012

Does version 4.2 create a new db session for each report run on a page?

The reason I ask is we have a page with 4 report regions, each querying a global temporary table that is populated in a 'Before Regions' page process. The first report displays the correct data, but the others return 'No Data Found' and it is because the Global Temporary Table has been cleared out following the first report. This did not happen in 4.1.

I know we should be using Apex Collections, and we will in future, but time is at a premium to get this live

View 3 Replies View Related

Slow Database - V$session Has Lots Of Active Sessions With 00 As Sql-address?

Oct 1, 2012

Server:
Windows 2008 R2 x64
Oracle Database 11g Release 11.2.0.1.0 Standard Edition

I recently applied the Oracle® Database Server Version 11.2.0.1 Patch 16 I have several databases running on this box with the same application.Since then I've had lots of customers complaining about slow systems. The server has plenty of RAM availableI also have several other servers all on the same versions, same patch, running the same application with no issues.

Looking at v$session there are often lots of active sessions that have a sql_address of "00". I've never seen this before and I regularly look at v$session, as you can see for below these have been running for a while. The sessions do drop off but I am at a loss as to what is happening.

select username, last_call_et, sid, serial#, user#, status, sql_address, sql_hash_value
from v$session
where username is not null and status = 'ACTIVE'
order by last_call_et desc, sid

[code]...

View 8 Replies View Related

Server Administration :: Number Of Sessions In Database MES (production) Coming From Another Machine

May 25, 2010

We have quite a number of sessions in database MES (production) coming from another machine.

From v$session, the program is oracle@WID27 (TNS V1-V3). This WID27 (hostname) consists of quite a number of development databases inside. We have to trace which jobs are actually triggering this, as WID27 are not suppose to connect to production databases.

How can we tell whether the sessions came in is from dblink or from the machine itself?

View 3 Replies View Related

INACTIVE Sessions In Oracle?

Apr 22, 2011

our db shows more than 200 INACTIVE Sessions ; and the DBA plans to reboot the db to get rid of these sessions . Can we not KILL these sessions and avoid the reboot ?

View 4 Replies View Related

Server Administration :: Oracle 10g Blocking Sessions

Aug 19, 2010

I am using oracle 10g as server in my lab. I faced some problems initially, but later after increasing the USERS tablespace it is working fine.

But there is still one problem. During the query execution some queries will be blocked and it doesn't leave any consequent queries to execute from the same user.

The blocked sessions will be displayed in the admin page under blocking sessions link. There is a option to kill the session. But when i do that, it affects all the users and the connection will be lost to all the users. again I have startup the database from beginning.

View 1 Replies View Related

Networking And Gateways :: Start Multiple Listeners In One Oracle Database?

Dec 6, 2011

can i start multiple listeners in one oracle database ?

View 7 Replies View Related

Windows / .NET :: Multiple Oracle ODBC Drivers In Single Database

Jan 9, 2013

I work in a large bank in a department that produces reports for different areas of the bank. By and large, we use Microsoft Office products to interface with our Oracle databases.Recently, we had two new databases come online that use Oracle 11g - we were not using any 11g databases before this point. We have two other databases that we use that run on Oracle 10g.

Up until the two new databases were brought in, our reporting was done from systems that used 10g and 9I. We all ran the Oracle 9I driver to connect to them, and it worked very well without issue. With the addition of the 11g databases to our reporting pool, we have been forced to upgrade our ODBC connections to the 11g driver, and it has not gone well at all. I had one query that typically ran in 30 minutes take +13 hours+ to run yesterday. Speed is not the only issue, either; we have sporadic ODBC call fails, crashes, and other general failures to deal with.

Our Oracle DBAs have been trying to solve the issue, but have not yet found a solution, and each day that this goes on we fall further and further behind, as I have daily time-sensitive reports to send out that depend on this data.

One of our DBAs said she read somewhere that Oracle had not included MS Access support in the 11g driver, and that the errors were due to the imperfect connection that the driver created. I don't know of there's any truth to that, but it would provide an explanation for our troubles. We have to use Access for our reporting, as over 90% of our existing reports and processes use Access, and having to change over everything at once is just not feasible.

Is there any way to force the 9I and 11g ODBC connections to coexist, so that we don't have to use the 11g driver for our 10g databases? Or is there a better 11g driver available?

View 2 Replies View Related

Oracle / EMC - Snap View Snapshots And Consistent Sessions

Nov 22, 2010

I have some questions about Oracle + EMC shared storage. I have Oracle 11gR1 RAC (2nodes) + ASM environment with shared shorage EMC Clariion AX4.

The database is running no archivelog mode. I'd like to implement point-in-time recovery using Snap View snapshots.

Currently my AX4 platform has the following LUNS:

LUN1 - registry 1
LUN2 - registry 2
LUN3 - vote 1
LUN4 - vote 2
LUN5 - vote 3
LUN6 - ASM - DISKGROUP DATA DISK DATA01 (actual db datafiles)
LUN7 - ASM - DISKGROUP DATA DISK DATA02 (actual db datafiles)

Using source LUNs in consistent session will take sync snapshots of all the LUNs working against my database. Once something happens with database, the LUNs can be returned to specific point in time when snapshot consistent session was taken and I'm expecting the database will up and continue to work.

Questions:

1. Is my approach correct at all? (The database is running noarchivelog mode, not dealing with hot backups. The recovery point in time implemented purely via EMC snapshot consistent sessions.)
2. The AX4 platform has a limit 8 source LUNs in session. If I understand it correctly, I can't place more than 8 LUNs in session. What will be the workaround if my database will occupy more than 8 LUNs, I'd like to take their consistent snapshot; for example:

LUN1 - registry 1
LUN2 - registry 2
LUN3 - vote 1
LUN4 - vote 2
LUN5 - vote 3
LUN6 - ASM - DISKGROUP DATA DISK DATA01 (actual db datafiles)
LUN7 - ASM - DISKGROUP DATA DISK DATA02 (actual db datafiles)
LUN8 - ASM - DISKGROUP DATA DISK DATA03 (actual db datafiles)
LUN9 - ASM - DISKGROUP DATA DISK DATA04 (actual db datafiles)

View 2 Replies View Related

Server Administration :: Multiple Database With Multiple Instance On Same Machine?

Mar 16, 2011

can we have multiple database version running in a single machine with multiple instances provided there are enough resources.Can we do in RAC only?

View 15 Replies View Related

SQL & PL/SQL :: How To Insert Data In Multiple Bases Using Multiple Database Links

Jan 2, 2013

how to insert the data in multiple bases( Same table structure in different bases) using the multiple database links?

View 4 Replies View Related

Attack Databases While Performing Backup?

Apr 1, 2011

are there any possibility to attack oracle databases while performing database backup!

View 3 Replies View Related

Performing Expdp On Network Drive?

Jul 23, 2013

while try to expdp on network drive. getting below error.how can we perform the expdp on network drive

Network location: \\tsclient\p\expdp

1.)SQL> show user
USER is "SYS"

SQL> create or replace directory exp as '\\tsclient\p\expdp';Directory created.
SQL>Grant read,write on directory exp to system;

2.)expdp system/xxxxx@orcl directory=exp dumpfile=EXP_orcl_072013.dmp logfile=EXP_72013_1.log schemas=('IIMS','CMMN')

Export: Release 11.2.0.2.0 - Production on Tue Jul 23 13:48:07 2013
Copyright © 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation

View 2 Replies View Related

SQL & PL/SQL :: Performing TYPE 2 Operation Using Merge In 10g

Mar 11, 2010

I have a type to table where only few columns are SCD 2. Like address, city, zip.I wrote a code using cursor. But now the requirement is to replace the cursor .how to perform type 2 using Merge in oracle 10g or any better way to perform it without using cursor. Look the code which i have attached with cursor.

CREATE OR REPLACE PROCEDURE Proc_cp_jci_contract_dim_hist
IS
l_fun_ret_value NUMBER;
v_src_id NUMBER;
rec_jci_contract_dim jci_contract_dim%ROWTYPE;
rec_jci_contract_dim_hist jci_contract_dim_hist%ROWTYPE;
err_row VARCHAR2(4000);
ind NUMBER(1) := 1;
[code]....

View 2 Replies View Related

SQL & PL/SQL :: Missing Records While Performing Parallel Inserts

Jun 29, 2010

I have prepared shell scripts to do the parallel inserts on my DB table (LEGACY_SYSTEM).

There is a trigger (AFTER INSERT ON EACH ROW) associated with the above table. I am calling a package.function inside the trigger to do the required operation and finally it will insert records into my target table (PRICE_CHANGE).

Expectation:
------------
If I insert 10 rows into LEGACY_SYSTEM table, it should do few updates and finally insert 10 rows into PRICE_CHANGE table.

Result:
-------
10 rows got inserted into LEGACY_SYSTEM. All the updates are successful but I could see only 4 rows in PRICE_CHANGE table. If I run it for the second or third time, all the results will be perfect.

Instead of these shell script, if I insert one by one rows manually into LEGACY_SYSTEM table, I am getting all the expected results and the results are consistent. If you look at my scripts below, you will understand the problem better..

DRIVING SCRIPT(test_global.sh):
---------------
#!/bin/sh
./test_script.sh &
./test_script2.sh &
exit;

test_script.sh:
---------------
#!/bin/sh
./test.sh 100052051 10974 &
./test.sh 100052051 8649 &
./test.sh 100052060 10974 &
./test.sh 100052060 8649 &
./test.sh 100052078 10974 &
./test.sh 100052078 8649 &
./test.sh 100052086 10974 &
./test.sh 100052086 8649 &
exit;

test_script2.sh:
---------------
#!/bin/sh
./test.sh 100052051 11698 &
./test.sh 100052051 11777 &
./test.sh 100052060 11698 &
./test.sh 100052060 11777 &
./test.sh 100052078 11698 &
./test.sh 100052078 11777 &
./test.sh 100052086 11698 &
exit;

test.sh:
--------
#!/bin/sh
sqlplus HRUAMGR/HRUAMGR@MALDEV_DW1<<EOF
ALTER SESSION ENABLE PARALLEL DML;
insert into legacy_system (product, item, supp, type, g_ind, d_ind, o_num) values (7896544,$1,$2,'TEST',NULL,NULL,NULL);
commit;
exit;
EOF

I am calling test_global.sh through the UNIX session and all the records got inserted into LEGACY_SYSTEM table and few rows are missing from PRICE_CHANGE table.

If I remove the '&' symbol and execute, the results are perfect. But the requirement is not to remove the '&' symbol. I have been facing this problem for the past 1 month.

View 8 Replies View Related

Forms :: Performing Validation Based On Unique Values In A Form

Mar 10, 2013

In my form i have a multi record block which is based on a table in which i am performing insertion, deletion, updation.

My requirement is as below,

While saving a records i want to check distinct value of specific item can not be greater than some value say 2. Then only my records should be saved. I am planning to populate those values in a collection table type and take the distinct values from it. How to populate record values in a collection table type.

View 2 Replies View Related

Replication :: Error Performing Fast Refresh Of Materialized View?

Sep 4, 2008

We are facing serious problem while refreshing materialized views using fast refresh option in ORACLE..For the very first time we are performing Complete refresh of data from DB1 to DB2 for few tables.Ongoing we are performing Fast Refresh.Sometimes the fast refresh works fine without any error and sometimes it fails with the below error.

ERROR at line 1:
ORA-32320: REFRESH FAST of "CIR"."C_BO_COMM" unsupported after
cointainer table
PMOPs
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 841
ORA-06512: at line 1

let me know when will this error occur during Fast Refresh.

View 4 Replies View Related

Retrieve Info From Multiple Databases / Insert Into Central Database Via Database LINKS

Jun 10, 2013

I am trying to retrieve info from multiple DBs and insert into a central DB via DB LINKS.The links are retrieved via a cursor.

However I keep coming up against 'PL/SQL: ORA-00942: table or view does not exist'..how to handle db_links using a cursor in a pl/sql block? The code is as follows:

DECLARE
db_link_rec VARCHAR2(30);
CURSOR db_link_cur IS
SELECT DB_LINK
from MESSAGING_PROD_LIST;
BEGIN
OPEN db_link_cur;
LOOP
FETCH db_link_cur INTO db_link_rec;
EXIT when db_link_cur%NOTFOUND;
[code]....

View 1 Replies View Related

Backup & Recovery :: Tape Streaming Not Happening While Performing RMAN Backup

Oct 29, 2011

Tape streaming is not happening while performing RMAN tape backup. On investigation, you find that it is not because of the incremental backup or the empty file backup and that RMAN is sending data blocks to the tape drive fast enough.What could be a solution to make tape streaming happen during the backup?

A.Configure backup optimization

B.Configure the channel to increase MAXOPENFILES

C.Configure the channel to increase the capacity with the RATE parameter

D.Configure the channel to adjust the tape buffer size with the BLKSIZE option

View 7 Replies View Related

Sessions Value Always Seems To Be Higher Than Set Value

Jul 23, 2010

I have set my processes and session value in my database as 1000 and 1248 respectively. I am using 11.2.0.1 but when I restart my DB it showing me sessions=1524...its too high value then what I set.I don't know why it showing higher value than the value I set...

ALTER SYSTEM SET processes=1000 SCOPE=SPFILE;
ALTER SYSTEM SET sessions=1248 SCOPE=SPFILE;

Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side spfile /u02/app/oracle/product/11.2.0/db_1/dbs/spfileeng11g02.ora
System parameters with non-default values:
processes = 1000
sessions = 1524

And one more thing is there any recommended formula for calculate sessions in 11g? [ I found one formual from google:
SESSIONS derived: (1.1 * PROCESSES) + 5

View 3 Replies View Related

Sessions Based On SQL ID

Aug 31, 2012

One of our DB server is high on CPU utilization, as per the AWR we found couple of queries are running many times and taking huge CPU, hence we need to know from which user these queries are runnings.find the session information as per the sql id?

View 9 Replies View Related

Multiple Socket For Database Communication

Jul 23, 2013

One of the customer is using Oracle database  Oracle database 9i and its listener is running on port 1521. When Oracle database client are connected to database , it is connecting on multiple ports ( like 1600 to 1690 )  . if it is possible to restrict Oracle database client connection to only one specified port or not . 

View 17 Replies View Related

Possible To Limit Sessions In These Views

Jan 17, 2013

I'm using Toad 11.6, I can see about 156 sessions for the database in the session browser but when I do a select from v$session, only 40 sessions are showing up. I was able to look at all the sessions until yesterday. I tried several views like v$session, v$open_cursor etc, but only 60 sessions show up. I'm connected to the database using same user login yesterday and this morning.. May be this user had some privileges revoked last night??If so is it possible to limit sessions in these views (v$session etc) but it's strange that I can see them in the session browser in Toad. 'm very confident that there are 156 sessions in the database but it's just that I'm not able to see them in the v$session etc views. I need to troubleshoot a session but it is not showing up in any views.

View 9 Replies View Related

Sessions Processes And Transactions

Nov 20, 2012

Oracle database 11g Expression Edition 11.2.0.2

I want to change the the number of processes to 150 (default is 100) I did this by issuing the below command.

alter system set processes=150 scope=spfile;But why that modified value is not being reflected?

select name, value from v$parameter where name in ('sessions','processes','transactions');

NAME                 VALUE
-------------------- -----
processes            100
sessions             172
transactions         189

View 8 Replies View Related







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