Home Database Mysql Tutorial 如果查看Oracle数据块和操作系统块大小

如果查看Oracle数据块和操作系统块大小

Jun 07, 2016 pm 03:50 PM
oracle Order size operating system data Check

1、 1、 在命令窗口中执行: SQL show parameter db_block_size NAME TYPE VALUE ------------------------------------ ----------------------------------------- db_block_size integer 8192 2、 2、 在SQL窗口中执行: //查询实例的db_block_size(为81

1、 1、 在命令窗口中执行:
SQL> show parameter db_block_size
NAME                 TYPE       VALUE
------------------------------------ -----------------------------------------
db_block_size          integer      8192

2、2、 在SQL窗口中执行:
//查询实例的db_block_size值(为8192 bytes)
select value from v$parameter where name='db_block_size'
如果查看Oracle数据块和操作系统块大小

//查询出的回滚段中每个extent的初始分配的大小
select initial_extent fromdba_rollback_segs
如果查看Oracle数据块和操作系统块大小

//initial_extent值除以db_block_size后的结果:
select initial_extent/8192 fromdba_rollback_segs
如果查看Oracle数据块和操作系统块大小

由此可见,initial_extent值是db_block_size的整数倍,db_block_size的默认值为8192 bytes,是不能被用户修改的。因为db_block_size对应于一个实例,所以意味着在数据库创建(建库)以后是不能修改的,如需修改,可行的方式是重新建库并把原库的数据export到新库。当然最好的方式是在建数据库之前就规划好,一般如果是OLTP系统,可以保持默认值;OLAP环境可以考虑适当调大。 

db_block_size典型的值有4096 bytes 和 8192 bytes,且必须是操作系统块(os block)的整数倍。操作系统块(os block)在Windows下可以通过fsutil工具查看,在Linux下则可以使用tune2fs命令。

Windows下使用方法如下:
D:\>fsutil fsinfontfsinfo c:
NTFS 卷序列号 :                      0x 388c89188c88d1b4
版本:                                        3.1
区数量:                                    0x00000000013fe599
簇总数:                                    0x000000000027fcb3
可用簇:                                    0x0000000000011e43
保留总数:                                 0x0000000000000060
每个扇区字节数:                      512
每个簇字节数:                          4096
每个FileRecord 段的字节数 :  1024
每个FileRecord 段的簇数 :   

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)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks 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)

How to add and replace hard disks in oracle rac How to add and replace hard disks in oracle rac Apr 11, 2025 pm 05:39 PM

Oracle RAC hard disk new and replacement operations: Add hard disk: Add new disks, create ASM disk groups, add to clusters, move data files. Replace hard disk: Identify the failed hard disk, close the disk group, replace the hard disk, reopen the disk group, repair the failed disk, and move the data files.

How to deal with oracle garbled code How to deal with oracle garbled code Apr 11, 2025 pm 07:00 PM

Oracle garbled problems are usually caused by improper character set settings. Solutions include: Checking the server, database, and client character sets. Set up the server, database, and client character sets as needed. Use the CONVERT function or the DBMS_LOB.CONVERT_LOB function to fix garbled data. Always specify the character set and set the NLS parameters correctly.

How to re-query oracle How to re-query oracle Apr 11, 2025 pm 07:33 PM

Oracle provides multiple deduplication query methods: The DISTINCT keyword returns a unique value for each column. The GROUP BY clause groups the results and returns a non-repetitive value for each group. The UNIQUE keyword is used to create an index containing only unique rows, and querying the index will automatically deduplicate. The ROW_NUMBER() function assigns unique numbers and filters out results that contain only line 1. The MIN() or MAX() function returns non-repetitive values ​​of a numeric column. The INTERSECT operator returns the common values ​​of the two result sets (no duplicates).

How to check tablespace size of oracle How to check tablespace size of oracle Apr 11, 2025 pm 08:15 PM

To query the Oracle tablespace size, follow the following steps: Determine the tablespace name by running the query: SELECT tablespace_name FROM dba_tablespaces; Query the tablespace size by running the query: SELECT sum(bytes) AS total_size, sum(bytes_free) AS available_space, sum(bytes) - sum(bytes_free) AS used_space FROM dba_data_files WHERE tablespace_

Summary of basic knowledge of oracle database Summary of basic knowledge of oracle database Apr 11, 2025 pm 06:33 PM

Oracle Database is a reliable, scalable and feature-rich relational database management system (RDBMS). Its architecture follows the client-server model, including server-side components (Oracle Net), instances, shared memory areas (SGAs), background processes, and database files that store data. Basic concepts include tables, rows, columns, primary keys, foreign keys, indexes and cursors. The database is known for its advantages such as high availability, big data support, rich features, strong security and ease of use.

How to connect to a cloud server How to connect to a cloud server Apr 11, 2025 pm 06:51 PM

The steps to connect to a cloud server through an Oracle client are as follows: Create an SSH key and copy the public key to the cloud server. Configure the Oracle client and add the connection information of the cloud server to the tnsnames.ora file. Create a new database connection in the Oracle client, enter the username, password, and DSN. Click OK and verify that the connection is successful.

How to modify oracle character set How to modify oracle character set Apr 11, 2025 pm 06:57 PM

To modify the Oracle character set, you need to: back up the database; modify the character set settings in the init.ora file; restart the database; modify existing tables and columns to use the new character set; reload the data; modify the database link (optional).

How to use stored procedures for oracle How to use stored procedures for oracle Apr 11, 2025 pm 07:03 PM

A stored procedure is a set of SQL statements that can be stored in a database and can be called repeatedly as a separate unit. They can accept parameters (IN, OUT, INOUT) and provide the advantages of code reuse, security, performance and modularity. Example: Create a stored procedure calculate_sum to calculate the sum of two numbers and store them in the OUT parameter.

See all articles