SQL & PL/SQL :: Altering One Record Concurrently By Two Users

Feb 28, 2013

What will happen when a record in a table is getting update by one user and at the same time if another user trying to update the same record?

View 9 Replies


ADVERTISEMENT

Forms :: Lock Record When Two Users Updating Existing One At Same Time

Aug 22, 2013

I am using Forms 6i and developed a Master Detail Oracle Form for Oracle EBS 11i application.

I was asked to write a pl/sql program so that.. When a user updating an existing record at the same time another user query the same record and try to update the same time, the record should be locked and a message should popup saying the record is being updated by another user.

View 2 Replies View Related

SQL & PL/SQL :: Altering Virtual Column To Real Column?

Oct 4, 2011

Is there a way to alter an existing virtual column to set as a real column without dropping it and recreate (i have index on it, and i don't want to recreate them).

View 2 Replies View Related

Forms :: Populating Values To Record Group From Multi Record Datablock

Jul 26, 2012

My procedure proc_ex is in when_validate_item trigger

I have one Multi Record data block in my form with values in its items

I need to Populate multi record block values to one Record Group using

add_group_row,
add_group_column,
set_group_char_cell to populate values to record group

Let us suppose my multi record data block looks like

item1 item2 item3 item4
10 20 50 70
25 15 30 45
45 90 47 38
75 25 85 90
30 56 78 80

how to populate these multi record datablock values to Record Group ???..Eagerly waiting for your Replies

View 3 Replies View Related

Server Utilities :: How To Associate Header Record To Its Corresponding Detail Record

May 16, 2012

I am loading data file using SQL Loader in TOAD 10.5.1.3 in Oracle 10g using the control file below and loading data into 2 tables post1.thead and post1.tdetl. THEAD contains item level transaction and TDETL is detail level when a transaction has a discount or promo attached to for that item. When the

LOAD DATA
APPEND
INTO TABLE post1.thead
WHEN (1:5) = 'THEAD'
TRAILING NULLCOLS
(file_type POSITION(1:5)CHAR,

[code]....

A particular THEAD value may have 0, 1 or many TDETL corresponding values.below is a sample data file. When the position 21 in the TTAIL has a value of 1 or 2, then we know that there is a promo or discount applicable to the ITEM (THEAD).

THEAD0000000002201109142011091400000000000002091 1 0 -1
TTAIL0000000003000000
THEAD0000000012201109142011091400000000000002091 1 0 -1 20110914-1
TDETL0000000013CMPSPL1004 0 000000010000P0000000000000019990000000000000000200000
TTAIL0000000014000001
THEAD0000000021201109142011091400000000000002091 1 0 -1
TDETL0000000022EMPDSC1005 0 000
TDETL0000000023SCOUP 1006 0 973452 000
TTAIL0000000024000002

What I want to acheive is to accurately reflect a TDETL to its corresponding THEAD, as both THEAD and TDETL are loaded into separate tables. How can we have the 2 records correlated?

View 11 Replies View Related

PL/SQL :: Selecting Single Record From Multiple Record Based On Date?

Aug 26, 2013

I have a table which contains the multiple records for single ID No. Now i have to select single record which contains the latest date. here is the structure Name  

Null Type  ------ ---- ------------ ID_P        NUMBER       NAME_P      VARCHAR2(12) DATE_P      TIMESTAMP(6) Records---------------------1 loosi     22-AUG-13 01.27.48.000000000 PM1 nammi  26-AUG-13 01.28.10.000000000 PM2 kk        22-AUG-13 01.28.26.000000000 PM2 thej      26-AUG-13 01.28.42.000000000 PM 

now i have to select below 2 rows how can write select qurie for this?

1 loosi 26-AUG-13 01.27.48.000000000 PM2 thej  26-AUG-13 01.28.42.000000000 PM

View 4 Replies View Related

Forms ::create History Record For Each Record Whether Updated Or Not

Sep 13, 2011

I have a fairly standard Purchase Order form which contains pre-loaded data (been uploaded from an XML file).When the Purchase Order is processed, the form updates a Price History table only if the Price on the PO_Details changes.The code for updating the price history table is contained in a PRE_UPDATE trigger on the PO_Details Data Block.

No other data changes on the PO_Details table.I now want to change this so that the Price History table is updated even if the price does not change i.e I want to create a history record for each record on the PO_Details irrespective of whether it was updated or not.

Is there an alternative trigger that I can move my code to (ie move it from PRE_UPDATE) to some other trigger that is fired for each PO_Details record even if there is no change.

View 4 Replies View Related

SQL & PL/SQL :: Create A Query That Returns Record By Record A Field

Apr 21, 2010

I have the following case to solve:

Example Table:

Nr_ordPos1Pos2Itemqty
O4018510000107 170,00
O4018520000107 30,00
O40651010000107 500,00
O40651020000107 50,00
O4114510000107 300,00
O31141010000107 50,00
O3114520000107 50,00

I need to create a query that returns record by record a field qty_progr with the cumulate qty considering previous records. The result should be the following:

Nr_ordPos1Pos2Itemqty qty_progr
O4018510000107 170,00 170,00
O4018520000107 30,00 200,00
O40651010000107 500,00 700,00
O40651020000107 50,00 750,00
O4114510000107 300,00 1050,00
O31141010000107 50,00 1100,00
O3114520000107 50,00 1150,00

View 8 Replies View Related

Forms :: Only New Record Have Saved Last Record No Longer Exist

Jun 29, 2013

I create a data block on a table when I am inserting new record only one record have been saved. Last record no longer exist.

View 4 Replies View Related

Forms :: Choose Lov In First Record That Won't Be Display In Second Record Lov

Sep 10, 2012

I have one multi record block in that i have one LOV..If i choose lov in first record that won't be display in second record lov...

View 4 Replies View Related

PL/SQL :: Code Erases Previous Month Record While Updating Current Month Record

May 16, 2013

Using 11gR2, windows 7 client machine. I need to update the table missing_volume (below), where I need to calculate the estimated_missing column. The calculation of estimated_missing column for current month needs previous month numbers (as commented inside the code below). I want the output like the first table. Notice the records start from January, hence estimated_missing for January can't be calculated, but for the the rest of the months it can be done by simply changing 'yr' and 'mnth' (commented inside the code towards the end).

yr          mnth          location     volume          actual_missing          expected_missing     estimated_missing
---------------------------------------------------------------------------------------------------------------------------------
2013            January          loc1          48037          24               57                         
2013             February     loc1          47960          3660               53                      24
2013             March          loc1          55007          78               57                      28
2013             April          loc1          54345          72               58                  77The code:

UPDATE missing_volume g

[Code]....

The code does calculate correct number for 'estimated_missing' as I run the code for each month, but the problem is while updating the current month it also erases the record for previous month. E.g. as can be seen below, after I updated April the column only has the record for April, previous month record is gone, similarly updating March removed February, etc. I can't understand why it's happening!! Here is the output I get:

yr          mnth          location     volume          actual_missing          expected_missing     estimated_missing
---------------------------------------------------------------------------------------------------------------------------------
2013            January          loc1          48037          24               57                         
2013             February     loc1          47960          3660               53
2013             March          loc1          55007          78               57
2013             April          loc1          54345          72               58                   77

why it's happening (I mean where is the flaw in the code) and how to get the desired output (first table).

View 5 Replies View Related

SQL & PL/SQL :: How To Add Tables Users

Jun 3, 2011

I have 4 tables as follows.

1.Deploybase(DeployId)
2.LicenseHistory(DeployId,UserId)
3.Users(UserId,User_Detail_id)
4.UserDetails(User_Detail_id)

Tables are joined using below joins.

Deploybase.DeployId=LicenseHistory.DeployId
LicenseHistory.User_id=Users.User_id
Users.User_Detail_id=UserDetails.User_Detail_id

When I join LicenseHistory,Users,UserDetails, all records are unique.

But the issues is: LicenseHistory table has duplicate records for DeployId column which is used to join table Deploybase. As a result when I join it to Deploybase, it gives me repeating entries which I don't want

I want Comments from LicenseHistory,Login from Users and User_name from UserDetails. There are multiple columns from 1st table i.e. Deploybase which I need.After reading on Exists operator, I made following query.

Select DeployId,comment from (select comments as comment,deploy_id as DeployId from LicenseHistory slh where exists (select deploy_id from symdb.symdb_deploybase sdb) and slh.comments is not null)

Above query gives me results from LicenseHistory table only. But I don't know how to add tables Users,UserDetails

View 1 Replies View Related

SQL & PL/SQL :: How To Logout All Users

Dec 23, 2011

HOW TO LOGOUT ALL USERS FROM ORACLE IN ONE COMMAND

View 2 Replies View Related

SQL & PL/SQL :: How To Extract The Rights Of Users On ERP

Mar 2, 2013

I would like to extract the user rights from the ERP that I use with SQL/Oracle.

There are 3 databases. The first gives me all the users with the main key id_user. The second one gives me the actions with the main key id_action. The third one only gives me what the user can't do.

I would like to know all the actions that all users can do or not.

The result must be something like:

Action 1
User 1 Yes
User 2 No

Action 2
User 1 No
User 2 Yes
....

View 9 Replies View Related

Security :: Password Of Users In 11g?

Jun 2, 2011

how to see password of users in 11g

View 11 Replies View Related

SQL & PL/SQL :: Checking Users Input?

Dec 8, 2010

I want to ask for a password from the user so they can access their account, however I want the password to have constraints on it. For example I want the user input to between 6 and 12 characters in length containing at least one number and one letter.

View 2 Replies View Related

PL/SQL :: How To Create New Users Remotely

Feb 27, 2013

I've been issuing commands like these by using a session on my guest Oracle VM that is hosted by Windows 8.

sqlplus / as sysdba
create user PocketGuide3rdEd identified by top-secret-password ;
grant connect to PocketGuide3rdEd ;
grant create table to PocketGuide3rdEd ;
grant create view to PocketGuide3rdEd ;
grant create trigger to PocketGuide3rdEd ;
grant create sequence to PocketGuide3rdEd ;
grant unlimited tablespace to PocketGuide3rdEd ;

I've discovered that I cannot do "sqlplus / as sysdba" remotely. Is there a way I can create another account like sysdba that can issue the above commands from windows so I don't have to log into the oracle guest VM?

View 4 Replies View Related

Default Oracle Users

Oct 2, 2013

I am trying to find out if there is a definite way to find out (by querying database) which database users have been created by Oracle (either during installation or as part of patching or adding new feature) and which database users have been created by DBAs.

I have looked into the documentation but could not find anything relevant. Ideally, I would like to know if this can be done for any versions starting from 9iR2.

View 7 Replies View Related

Select Access To Users

May 2, 2013

Are you aware of any "Best Practice Document" to grant select accesses to users on databases. These users are developers which select data out of database for the investigation and application bug fix.

From time to time user want more and more access to different tables so that they can do investigation properly.

View 2 Replies View Related

Users Getting Error When Connecting To DB

Dec 26, 2012

The users are getting an error when connecting to the DB. I'm also not able to connect thru sqlplus . I get the message

$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.5.0 - Production on Wed Dec 26 14:39:55 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

ERROR:
ORA-01075: you are currently logged on

ORA-04031: unable to allocate ORA-04031: unable to allocate 4064 bytes o bytes of shared memory ("","","","")
ORA-04031: unable to allocate ORA-04031: unable to allocate 4064 bytes of shared memory ("shared pool","select a.obj# OBJOID, a.clas...","sga heap(1,0)","kglsim hea

I need to restart the DB.

View 5 Replies View Related

PL/SQL :: Only Get Users That Match All Links

Jul 17, 2013

Seemingly a very simple problem, but I can't seem to figure it out. Table below is a table that holds UserId' s and LinkId's.  

CREATE TABLE UserLink (UserId NUMBER, LinkId NUMBER );
ALTER TABLE UserLink ADD PRIMARY KEY (UserId, LinkId);
INSERT INTO UserLink VALUES (1, 1);
INSERT INTO UserLink VALUES (1, 2);
INSERT INTO UserLink VALUES (3, 1);
INSERT INTO UserLink VALUES (4, 1);

I'm looking for a query in which I can plug a List of LinkId's that outputs only users that have a relationship with ALL LinkId's provided. In this example you may assume that the List is equal to (1, 2), but you can't make any assumptions about the size of the list, other than size != 0. The query to find users that match ANY of the provided LinkId's is quite simple:  

SELECT UserId FROM UserLink
WHERE LinkId IN (1,2)

The correct query should output: 

USERID
------
1

And it should work for any size > 0 list of values.

View 6 Replies View Related

SQL & PL/SQL :: How Many Users Can Connect With Database

Apr 23, 2010

I want to know what will be the performance of my DB before loading data and how many users can connect with my database.

View 7 Replies View Related

Dropping Users And Recreating?

Jun 18, 2012

we are refreshing data base for our application from the base load,Every time when ever there is refresh required we need to drop the users and recreate every thing from the base load. For this we need to kill the sessions and drop the users ,Putting the instance in the restricted mode and refreshing the db.Some time when ever During the killing and dropping process there are some errors like you can not drop the users which is currently connected .

set termout on
set echo on
spool Kill_sessions_drop_users.log
DECLARE

[code]...

how to get rid of this

View 6 Replies View Related

Locking Users By A Table Field Value

Dec 27, 2006

We have a table with several columns (id, title, description, area).The data in the table looks like this

1 sometitle1 description1 USA
2 sometitle2 description2 Germany
3 sometitle3 description3 Japan
4 sometitle4 description4 Honduras

We have Oracle users with their usernames and password. We would like to lock every single user to a certain area.Example:

user 1 may see only records, where AREA=USA
user 2 may see only records, where AREA=Honduras

How can I do this in Oracle. I am using Oracle Enterprise 9.2

View 1 Replies View Related

Fast Method To Drop Many Users

Oct 21, 2010

I have 2 tests Oracle instances (a 10g and a 11g) in which somebody added many users (almost 50k), every user having a TEST table with no rows in its schema.

I have to drop these users without recreating the instances, but DROP USER username CASCADE is taking almost 1 minute for each user. This will take me to almost a month.

View 2 Replies View Related

List All Users That Have Privileges On A Table

Aug 6, 2011

Is possible to list all users that have any privilege on a specific table?

View 2 Replies View Related

SQL & PL/SQL :: Dropping Users - Queue Tables

Dec 9, 2010

I am trying to drop a user but i get the following error

*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables

A couple of questions on this error:

- I did a search on the forum and the thread [URL] appears to have a solution to it by using

DBMS_AQADM.DROP_QUEUE_TABLE(queue_table => 'DEF$_AQCALL', force =>TRUE);

What i am not sure of is which queue will the above statement drop if run as sys and there are multiple schemas with different schema names but with the same queue name?

- We recently rebuilt the database server and prior to the rebuild i have always managed to drop a user without the above error. Is it likely that some setting somewhere is changed?

View 2 Replies View Related

SQL & PL/SQL :: Display Temporary Column Of Two Users

Sep 26, 2011

I have created a query that display the difference in the tables and column of two users. Some of the column in the new user have been added new which were not there in the old user and some columns from the old user still exits but their data_type is changed.

Now I want to select one more column in the select statement specifying whether the column is modified or has been added.

SELECT TABLE_NAME,COLUMN_NAME,DATA_TYPE,DATA_LENGTH
FROM DBA_TAB_COLUMNS
WHERE OWNER = 'ABC' AND
TABLE_NAME NOT IN (SELECT table_name FROM all_tables where owner = 'ABC'
MINUS
SELECT table_name FROM all_tables where owner = 'XYZ' )
MINUS
SELECT TABLE_NAME,COLUMN_NAME,DATA_TYPE,DATA_LENGTH
FROM DBA_TAB_COLUMNS
WHERE OWNER = 'XYZ'
[code]....

View 9 Replies View Related

Security :: Create Various Users On A Schema

Nov 19, 2010

I do a schema in oracle ... an m my question is if I can create 2 o more users for access to a schema..for example i have schema Project and i need that one administrator and 2 more users with others permission.

View 3 Replies View Related

SQL & PL/SQL :: Where Does Oracle Get Value Of Users Windows Login Name

Jun 10, 2013

I'm working on a client-server application that uses ODBC to connect Windows XP or Windows 7 PCs to an Oracle 11 database. I use a dedicated account to connect to Oracle, and I get the users Windows login name using the call shown in the title. I use the Windows login name to verify that they can access my application. I've been asked by security conscious folks in our IT department how this information is obtained

My question is: where does Oracle get the value of the users Windows login name? Is it coming from a windows registry key? Environment variable? I heard that it's possible that the ODBC driver is calling a Microsoft Win32 function like GetUserName or GetUserNameEx to retrieve the user ID.

View 1 Replies View Related







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