Posts

Managing Alert Log Size in Oracle AI Database 26ai

Image
  Starting with   Oracle AI Database 26ai (Release Update 23.9) , it is possible to control the maximum size of the alert log using the   ALERT_LOG_MAX_SIZE   parameter. The default value for this parameter is 1000 MB, which means the XML alert log can grow up to a maximum of 20 segments, each 50 MB in size. In my test, I configured the alert log maximum size to 100 MB: SQL > ALTER SYSTEM SET alert_log_max_size = 100 M; System altered. ***This parameter is modifiable using  ALTER SYSTEM , but it is not modifiable at the PDB level. To increase the size of the alert log and force file generation, I executed the following PL/SQL block to continuously write messages into the alert log: begin for i in 1 .. 1000000 loop begin sys.dbms_system.ksdwrt( 2 , 'Vahid Yousefzadeh' ); end ; end loop; end ; / After running this block, there are several XML files in the alert directory and each file size is approximately 50MB. [root @OEL9 - DB2 al...

Excluding LOB Columns Data in Data Pump

Image
  We intend to create a dump from a table in which some columns contain LOB data. However, due to the large volume of LOB data in this table — and for reasons such as higher speed, better security, or reduced space allocation — we want to prevent this data from being included in the dump file, or at least prevent it from being restored during the import process. What is the solution? Excluding LOB column data during the  export  operation in Oracle 12c can be easily controlled. This can be done by creating a view and using the  VIEWS_AS_TABLES  parameter. However, if the dump file already contains LOB data, this method cannot be used during import. In such cases, the  REMAP_DATA  parameter is the solution. Previously, we explained that the  REMAP_DATA  parameter can be used for data masking and data manipulation during export and import operations. In this article, we will see how the same parameter can be used to exclude LOB column data duri...

Restoring a Datafile Using Archivelogs

Image
  Suppose a datafile that was recently added to the database is lost for some reasons. In this case, if the archive logs from the time the datafile was created are available, it is possible to recover that datafile. However, as mentioned, this operation has a very strict requirement: “All archive logs from the time the datafile was created must be available.” Below, we will walk through a scenario related to this topic. SQL > archive log list; Database log mode Archive Mode SQL > alter table space USEF_TBS add datafile ‘ / acfs / test2.dbf’ size 10 m; With the following commands, we create a new table that uses space from the new datafile so that after recovery we can verify that no data was lost. SQL > create table usef_tbl1 tablespace usef_tbs as select * from dba_tables where 1 = 2 ; SQL > alter table usef_tbl1 ALLOCATE EXTENT(DATAFILE ‘ / acfs / test2.dbf’ size 5 m); Table altered. SQL > insert into usef_tbl1 select * from ...