Posts

Showing posts from December, 2025

Oracle AI Database 26ai — Wide Tables

Image
  Before   Oracle AI Database 26ai , the maximum number of columns allowed in a table or view was limited to   1000 . If this limit was exceeded, Oracle would raise the following error: ORA -01792 : maximum number of columns in a table or view is 1000 Starting with  Oracle AI Database 26ai , this limitation has been significantly expanded, allowing each table to contain up to  4096 columns . To take advantage of this new capability, the initialization parameter  max_columns  must be set to  extended : SQL > alter system set max_columns = extended scope = spfile; System altered SQL > startup force After restarting the database, you can create or modify tables with more than 1000 columns. The following example demonstrates how to add columns up to this new limit: SQL > declare 2 comm varchar2( 100 ); 3 begin 4 for i in 2. .4095 loop 5 comm: = 'alter table tb add c' || '' || i || ' number' ; 6 exec...

Oracle AI Database 26ai — Dictionary Protection

Image
  When we grant a system   ANY   privilege such as   SELECT ANY TABLE ,   DROP ANY TABLE , and so on to a user, that user still   cannot access objects in the  SYS  schema or Data Dictionary tables : SQL * Plus: Release 10.1 .0 .4 .2 - Production on Tue Jan 9 10 : 38 : 31 2024 SQL > show user USER is "SYS" SQL > create table sys.tb as select * from dual; Table created. SQL > create user vahid identified by a; User created. SQL > grant create session, select any table to vahid; Grant succeeded. SQL > conn vahid / a Connected. SQL > select * from sys.tb; ORA -00942 : table or view does not exist SQL > select * from v$datafile; ORA -00942 : table or view does not exist If we decide to remove this restriction — at least for the  SELECT ANY TABLE  privilege—we can grant the  SELECT ANY DICTIONARY  privilege to the user: SQL > grant SELECT ANY DICTIONARY to ...