Search notes:

Oracle: Read-only tables

Tables can be set read-only.
create table tq84_table (
  col_1 number,
  col_2 date
);

insert into tq84_table values (1, sysdate);
Making the table read only:
alter table tq84_table read only;
Verify that the table is read only in the data dictionary:
select read_only from user_tables where table_name = 'TQ84_TABLE';
The following statement throws ORA-12081: update operation not allowed on table:
insert into tq84_table values (2, null);
Cleaning up:
drop table tq84_table purge;

See also

The following statement throws ORA-12081: update operation not allowed on table:

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/developm...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759612262, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/objects/tables/read-only(60): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51