Home » SQL & PL/SQL » SQL & PL/SQL » Simultaneous Access of Database (oracle 9i)
icon14.gif  Simultaneous Access of Database [message #343923] Thu, 28 August 2008 08:04 Go to next message
prakash2007
Messages: 14
Registered: March 2007
Junior Member
hi friends,
i need the solution for following situation,,,
A database is accessed by multiple users at the same time..(eg,Insert ,Delete,Update..).i want to retrieve the data based on the user., i.e. suppose user1 and user2 inserting 2 records individually (USER1->2 RECORDS
USER2->2 RECORDS
TOTAL Insertion 4 RECORDS ).
But USER1 need to view the data which is inserted by him (USER1) only(Not by USER2 )...I am not using any special column which is used to identify the user ..
Re: Simultaneous Access of Database [message #343927 is a reply to message #343923] Thu, 28 August 2008 08:07 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
Until a commit is issued, you will only see records inserted by yourself.
After the commit is issued, there is no way to tell who inserted the record unless you capture it in a column.

Well, maybe with AUDITing.
Re: Simultaneous Access of Database [message #343928 is a reply to message #343927] Thu, 28 August 2008 08:10 Go to previous messageGo to next message
Dipali Vithalani
Messages: 278
Registered: March 2007
Location: India
Senior Member

Or one way is: you have to handle , who has inserted which data by using trigger.
Have one column in table for user identification, update that column using trigger with user name and provide view to users to show them only those data which are inserted by him.

Regards,
Dipali..
Re: Simultaneous Access of Database [message #343962 is a reply to message #343923] Thu, 28 August 2008 09:08 Go to previous message
dwarak.k
Messages: 61
Registered: June 2008
Location: Hyderabad
Member
If in a application more than 1 user can access,you should be using the "WHO" columns
Created_date,created_by,last_update_date,last_update_by

This should really help in these kind of data tracking Cool
Previous Topic: ORA-01467: sort key too long
Next Topic: update query
Goto Forum:
  


Current Time: Sat Dec 10 01:31:34 CST 2016

Total time taken to generate the page: 0.06840 seconds