Home » SQL & PL/SQL » SQL & PL/SQL » prevent the data from update,insert,delete (Oracle - 9i ,92010,RHEL 2.1 AS)
prevent the data from update,insert,delete [message #395636] Thu, 02 April 2009 02:19 Go to next message
jimit_shaili
Messages: 231
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Friends

i have a table with financial year wise data.here is just a sample of data.

finyear   stbag    endbag
20062007  100      200
20062007  300      400
20072008  100      150
20082009  300      400
20092010  100      170 


Is it possible to lock the previous financial year's data [Other than finyear = 20092010,which is current.] against update or detele from application or any sql tool.

I don't have any control on my application code.
Re: prevent the data from update,insert,delete [message #395644 is a reply to message #395636] Thu, 02 April 2009 02:37 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The easiest way would be to create a trigger that raises an error when handling the forbidden data.
Re: prevent the data from update,insert,delete [message #395650 is a reply to message #395636] Thu, 02 April 2009 02:47 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can also partition your table and put the not current year data in a tablespace with read-only files.

Regards
Michel
Previous Topic: How to use UNION with a CLOB [split topic]
Next Topic: Error invalid directory path in oracle 10.2
Goto Forum:
  


Current Time: Sat Dec 10 20:21:36 CST 2016

Total time taken to generate the page: 0.11611 seconds