Home Database Mysql Tutorial Oracle 10g新特性--归档压缩

Oracle 10g新特性--归档压缩

Jun 07, 2016 pm 03:21 PM
o

在Oracle 10g版本中,推出了一个新特性mdash;mdash;归档压缩,此功能的目的是在归档传输到远程或者归档存储到磁盘之前进行压缩

在Oracle 10g版本中,推出了一个新特性——归档压缩,此功能的目的是在归档传输到远程或者归档存储到磁盘之前进行压缩,以便减少归档传输的时间和占用的磁盘空间。但是关于怎样开启归档压缩的语法,在10g的官方文档中没有提及,参考MOS文章BUG 3464260。可以用下面的语法开启数据库的归档压缩功能:alter database archivelog compress enable。但是,这个功能在10g、11g中都还未进行支持,相关的官方文档中也没有进行申明。下面进行测试,观察在开启归档压缩后是否会对归档日志进行压缩。

--本次测试在11.2.0.3版本中进行

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0    Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

--查看redo文件大小
SQL> select group#,members,bytes from v$log;

    GROUP# MEMBERS    BYTES
---------- ---------- ----------
    1    1    52428800
    2    1    52428800
    3    1    52428800

--查看数据库是否开启归档压缩
SQL> select name,ARCHIVELOG_COMPRESSION from v$database;

NAME                    ARCHIVEL
--------------------------------------------- --------
GYL                    DISABLED

--运行事务
begin
  for i in 1..500000 loop
  insert into darren values(1,\'aa\');
  commit;
  end loop;
end;

--查看生成的归档文件的大小
SQL> select name,blocks*block_size \"size\" from v$archived_log;

NAME                        size
--------------------------------------------- ----------
/oradata/archive/orcl_1_112_851966182.arc    49916928
/oradata/archive/orcl_1_113_851966182.arc    47870464
/oradata/archive/orcl_1_114_851966182.arc    49916928
/oradata/archive/orcl_1_115_851966182.arc    46791680
/oradata/archive/orcl_1_116_851966182.arc    49449984
/oradata/archive/orcl_1_117_851966182.arc    45774848
/oradata/archive/orcl_1_118_851966182.arc    46656512
/oradata/archive/orcl_1_119_851966182.arc    47223296

--开始数据库归档压缩功能
SQL> alter database archivelog compress enable;

Database altered.

SQL> select name,ARCHIVELOG_COMPRESSION from v$database;

NAME    ARCHIVEL
--------- --------
GYL    ENABLED

--再次运行事务
begin
  for i in 1..500000 loop
  insert into darren values(1,\'aa\');
  commit;
  end loop;
end;

--查看此时生成的归档文件大小
SQL> select name,blocks*block_size \"size\" from v$archived_log;

NAME                        size
--------------------------------------------- ----------
/oradata/archive/orcl_1_112_851966182.arc    49916928
/oradata/archive/orcl_1_113_851966182.arc    47870464
/oradata/archive/orcl_1_114_851966182.arc    49916928
/oradata/archive/orcl_1_115_851966182.arc    46791680
/oradata/archive/orcl_1_116_851966182.arc    49449984
/oradata/archive/orcl_1_117_851966182.arc    45774848
/oradata/archive/orcl_1_118_851966182.arc    46656512
/oradata/archive/orcl_1_119_851966182.arc    47223296
/oradata/archive/orcl_1_120_851966182.arc    48120320
/oradata/archive/orcl_1_121_851966182.arc    48687104
/oradata/archive/orcl_1_122_851966182.arc    49916928
/oradata/archive/orcl_1_123_851966182.arc    45165568
/oradata/archive/orcl_1_124_851966182.arc    48716800
/oradata/archive/orcl_1_125_851966182.arc    48135680
/oradata/archive/orcl_1_126_851966182.arc    46420992
/oradata/archive/orcl_1_127_851966182.arc    47159808
/oradata/archive/orcl_1_128_851966182.arc    43561472

    从实验数据可以看到,从orcl_1_120*开始的归档为开在开启归档功能后生成的归档,与之前的归档文件进行比较,发现并没有对归档文件进行压缩。关于归档日志小于在线日志的原因,请参考  。

  所以,在10g、11g中,oracle暂时不支持归档压缩功能。

  另外,ogg目前也不支持压缩的归档文件,并且也没有表示将会支持压缩的归档文件。因此,,这个功能还只能在期待中!

本文永久更新链接地址

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Digital audio output interface on the motherboard-SPDIF OUT Digital audio output interface on the motherboard-SPDIF OUT Jan 14, 2024 pm 04:42 PM

SPDIFOUT connection line sequence on the motherboard. Recently, I encountered a problem regarding the wiring sequence of the wires. I checked online. Some information says that 1, 2, and 4 correspond to out, +5V, and ground; while other information says that 1, 2, and 4 correspond to out, ground, and +5V. The best way is to check your motherboard manual. If you can't find the manual, you can use a multimeter to measure it. Find the ground first, then you can determine the order of the rest of the wiring. How to connect motherboard VDG wiring When connecting the VDG wiring of the motherboard, you need to plug one end of the VGA cable into the VGA interface of the monitor and the other end into the VGA interface of the computer's graphics card. Please be careful not to plug it into the motherboard's VGA port. Once connected, you can

How to install and register the btc trading app? How to install and register the btc trading app? Feb 21, 2025 pm 07:09 PM

This article will provide a detailed introduction to how to install and register a Bitcoin trading application. The Bitcoin trading app allows users to manage and trade cryptocurrencies such as Bitcoin. The article guides users through the installation and registration process step by step, including downloading applications, creating accounts, performing identity verification, and first deposit. The goal of the article is to provide beginners with clear and easy-to-understand guidelines to help them easily enter the world of Bitcoin trading.

Top 10 global digital currency trading apps recommended (2025 currency trading software ranking) Top 10 global digital currency trading apps recommended (2025 currency trading software ranking) Mar 12, 2025 pm 05:48 PM

This article recommends the top ten digital currency trading apps in the world, including Binance, OKX, Huobi Global, Coinbase, Kraken, Gate.io, KuCoin, Bitfinex, Gemini and Bitstamp. These platforms have their own characteristics in terms of transaction pair quantity, transaction speed, security, compliance, user experience, etc. For example, Binance is known for its high transaction speed and extensive services, while Coinbase is more suitable for novices. Choosing a platform that suits you requires comprehensive consideration of your own needs and risk tolerance. Learn about the world's mainstream digital currency trading platforms to help you conduct digital asset trading safely and efficiently.

Ouyi Exchange Download Official Portal Ouyi Exchange Download Official Portal Feb 21, 2025 pm 07:51 PM

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Which digital currency app trading software is the best? Digital currency trading software big spot Which digital currency app trading software is the best? Digital currency trading software big spot Mar 07, 2025 pm 06:45 PM

There is no single "best" digital currency trading app, and the choice depends on personal needs. 1. OKX has powerful functions and rich currency types; 2. Binance has high liquidity and diverse transaction types; 3. Gate.io provides unique functions such as staking mining; 4. Huobi Global has a friendly interface and multi-language support; 5. Kraken focuses on security; 6. Coinbase is suitable for beginners and focuses on user education. When choosing, you need to consider security, liquidity, handling fees, functions, user experience and other factors.

Digital currency trading platform 2025 Digital currency trading platform 2025 Mar 04, 2025 pm 07:06 PM

Based on global information, this article compiles the rankings of the world's leading virtual digital currency trading platforms, including Binance, OKX, Gate.io, Huobi, Coinbase, Kraken, Crypto.com, bitget, KuCoin and Bitstamp. These platforms have their own characteristics in terms of user count, transaction volume, transaction types, security, compliance, etc. For example, Binance is known for its large user base and extensive trading options, while Coinbase is known for its leadership and ease of use in the US market. Choosing a suitable trading platform requires weighing factors such as security, fees, and trading products based on your own needs.

Top 10 virtual digital currency trading platforms 2025 rankings, top ten virtual currency app exchanges Top 10 virtual digital currency trading platforms 2025 rankings, top ten virtual currency app exchanges Feb 21, 2025 pm 09:03 PM

This article introduces 10 mainstream cryptocurrency exchanges, covering basic information such as their establishment time, service scope, security, liquidity, transaction fees, etc. These exchanges include: OKX, Binance, Gate.io, Bitget, Coinbase, Huobi, KuCoin, Crypto.com, Gemini and Kraken.

What is Ouyi Exchange? What is the use of Ouyi Exchange? What is Ouyi Exchange? What is the use of Ouyi Exchange? Feb 15, 2025 pm 08:57 PM

Ouyi Exchange, formerly known as Binance, is one of the world's leading cryptocurrency trading platforms. It was founded in 2017 by Zhao Changpeng and is headquartered in Hong Kong, China. Ouyi Exchange provides users with a wide range of cryptocurrency trading services, including spot trading, futures trading, over-the-counter trading and crypto asset management.

See all articles