oracle asm refers to "automatic storage management" and is a volume manager that automatically manages disk groups and provides effective data redundancy functions; it is implemented and deployed as a separate Oracle instance. The advantages of asm: 1. Simple configuration, which can maximize the storage resource utilization of database merger; 2. Support BIGFILE files, etc.
The operating environment of this tutorial: Windows 7 system, Oracle 10g version, Dell G3 computer.
1. What is ASM
ASM (Automatic Storage Management, automatic storage management) is a feature in Oracle10g R2 to simplify the management of Oracle databases. A new feature launched is the volume manager provided by Oracle itself. It is mainly used to replace the LVM provided by the operating system. It not only supports single instances, but also has very good support for RAC.
ASM can automatically manage disk groups and provide effective data redundancy functions. After using ASM (Automatic Storage Management), database administrators no longer need to manage and classify thousands of data files in ORACLE, thus simplifying the DBA's workload and greatly improving work efficiency.
Using ASM, storage can be managed as a small number of storage pools called ASM disk groups. Database-related files are assigned to ASM disk groups, and ASM manages the layout and data organization, ensuring optimal performance and protection against storage hardware failures. Using ASM disk groups makes it easy and convenient to consolidate storage and simplify management tasks that previously required DBAs and system administrators. ASM provides the underlying storage management for ASM Cluster File System (ACFS), which centrally stores data outside of the database.
ASM provides platform-independent file system, logical volume management and software RAID services. ASM can support striping and disk mirroring, allowing you to add or remove disks while the database is loaded and automatically balance I/O to remove "hot spots." It also supports direct and asynchronous I/O and uses the Oracle Data Manager API (Simplified I/O System Call Interface) introduced in Oracle9i.
ASM is implemented and deployed as a separate Oracle instance, and it only needs parameter files and does not require any other physical files to start the ASM instance. Only when it is running can it be used by other data access. On the Linux platform, ASM can only be accessed if the OCSSD service (installed by Oracle installer by default) is running.
2. Advantages of using ASM
Advantages:
(1) Connect I/ O is evenly distributed across all available disk drives to prevent hot spots and maximize performance. In ASM, the concept of DiskGroup is similar to the concept of VG in LVM volume group management. Multiple physical disks are also assembled into a disk group, and the data in a disk group is evenly distributed on each physical disk. When adding and deleting physical disks manually, the data will be automatically balanced (ReBalance);
(2) The configuration is simpler and maximizes the storage resource utilization of database merger; data files are stored in DiskGroup (referred to as DG) ), management is relatively simple.
(3) Built-in support for large files and BIGFILE files.
(4) Perform automatic contact redistribution after incrementally adding or removing storage capacity, that is, automatic ReBalance;
(5) Maintain redundant copies of data to improve availability;
(6) Supports 10g and 11g data storage and RAC shared storage management. Relatively speaking, 11g ASM is more stable, and there are some BUGs in 10g.
(7) Support third-party multi-path software; such as powerpath (aix), mutlipath (linux)
(8) Use OMF (Oracle Managed Files) method to manage files.
Disadvantages:
(1) Adding an ASM instance to the database requires ASM management for maintenance, which increases maintenance costs;
(2) ASM is relatively a black box. If something goes wrong, recovery will be difficult.
3. ASM redundancy method
ASM uses a unique mirroring algorithm: it does not mirror disks, but mirrors extents. As a result, to provide continuous protection in the event of a failure, only the space capacity in the disk group is required, rather than the need to prepare a hot spare disk. It is not recommended that users create failure groups of different sizes as this will cause problems when allocating secondary extents. When ASM assigns a file's primary extent to a disk in a disk group, it assigns a mirrored copy of that extent to another disk in the disk group. The primary extents on a given disk will have their own mirror extents on a partner disk in the disk group. ASM ensures that a primary extent and its mirror copy do not reside in the same failure group. Disk group redundancy can take the following forms: normal redundancy (default redundancy) using two-way mirror files (requiring at least two failure groups) and using three-way mirroring (requiring at least three failure groups) to provide a higher degree of protection High redundancy. Once a disk group is created, its redundancy level cannot be changed. In order to change the redundancy of a disk group, another disk group with appropriate redundancy must be created, and then the data files must be moved to this newly created disk group using RMAN restore or DBMS_FILE_TRANSFER.
Three different redundancy methods are as follows:
(1) External redundancy (external redundancy) --Commonly used
means that Oracle does not help you manage the image, and the function is implemented by an external storage system, such as through RAID technology; the effective disk space is the sum of the spaces of all disk devices.
(2)Default redundancy (normal redundancy)
Indicates that Oracle provides 2 mirrors to protect data. The effective disk space is 1/2 of the sum of the sizes of all disk devices (most used)
(3) High redundancy
Indicates that Oracle provides three mirrors to protect data to improve performance and data security. At least three disks (three failure groups) are required ); the effective disk space is 1/3 of the sum of the sizes of all disk devices. Although the redundancy level is high, the hardware cost is also the highest.
4. ASM process
In addition to the traditional DBWR, LGWR, CKPT, SMON, PMON and other processes, the ASM instance also includes the following four new processes: Background process:
(1) RBAL: Responsible for coordinating the rebalancing activities of the disk group (responsible for disk group balancing)
(2) ARB0-ARBn: Many such processes can exist at the same time , they are respectively named ARB0, ARB1, and so on, to perform the actual rebalancing allocation unit movement process.
(3) GMON: used for ASM disk group monitoring
(4) O0nn 01-10: This group of processes establishes connections to ASM instances, and some long-term operations such as creating data files ,RDBMS will send information to ASM through these processes
ASMB connects to the foreground process of the ASM instance and periodically checks the health status of the two instances. Each database instance can only be connected to one ASM instance at the same time, so the database will only have one ASMB background process. If there are multiple database instances on a node, they can only share one ASM instance.
RBAL is used to make global calls to open disks in a certain disk group. The ASMB process communicates with the node's CSS daemon and receives file interval mapping information from the ASM instance. ASMB is also responsible for providing I/O statistics for ASM instances
CSS cluster synchronization service. To use ASM, you must ensure that the CSS cluster synchronization service is running. CSS is responsible for synchronization between ASM instances and database instances.
Note:
The ASM instance must be started before the database instance, run synchronously with the database instance, and be closed later than the database instance. The relationship between ASM instances and database instances can be 1:1 or 1:n. If it is 1:n, it is better to install a separate ASM_HOME for ASM.
5. ASMSupported file types
ASMSupports automatic database file management such as datafiles, logfiles, control files, archivelogs, RMAN backup sets, etc.
Generally speaking, a single-instance database using ASM consists of two DGs. One is datadg and the other is fradg. Datadg mainly stores data files, while fradg (flash recovery area) stores archivelog files, control files, backup files, etc.
6. Correspondence between ASM instance and database instance
7. Cluster ASM architecture
8. Related views
View name |
X$Base table name |
Description |
V$ASM_DISKGROUP |
X $KFGRP |
Implement disk discovery and list disk groups |
V$ASM_DISKGROUP_STAT |
X$KFGRP_STAT |
Display disk group status |
V$ASM_DISK |
X$KFDSK, |
V$ASM_DISK_STAT |
List disks and Its usage metric information | V$ASM_FILE |
|
Listing ASM files also includes metadata information | V$ASM_ALIAS |
|
Lists ASM aliases, files and directories | ##V$ASM_TEMPLATE | |
List available templates and their properties | V$ASM_CLIENT
|
|
List DB instances linked to ASM | V$ASM_OPERATION | |
List rebalancing operations | ||
Available ASMLIB paths | ||
List Disk-partners relationships | ||
extent map of all ASM files | ||
extent list of all ASM Disk | ||
Describe ASM cache | ||
Linked list of ASM block | V$ASM_ATTRIBUTE(new in 11g) | |
Asm attribute, the X$ base The table also shows some hidden attributes | ##V$ASM_DISK_IOSTAT(new in 11g) | X$KFNSDSKIOST(new in 11g) |
I/O statistics |
X $KFDFS(new in 11g) | |
|
## | X $KFDDD(new in 11g) |
X $KFGBRB(new in 11g) | ||
## |
X $KFMDGRP(new in 11g) |
|
|
X$KFCLLE(new in 11g) |
|
|
X$KFVOL(new in 11g) |
|
|
X$KFVOLSTAT(new in 11g) |
|
|
X$KFVOFS(new in 11g) |
|
|
X$KFVOFSV(new in 11g) |
|
Recommended tutorial: "Oracle Tutorial"
The above is the detailed content of what is oracle asm. For more information, please follow other related articles on the PHP Chinese website!

MySQL and Oracle selection should be based on cost, performance, complexity and functional requirements: 1. MySQL is suitable for projects with limited budgets, is simple to install, and is suitable for small to medium-sized applications. 2. Oracle is suitable for large enterprises and performs excellently in handling large-scale data and high concurrent requests, but is costly and complex in configuration.

Oracle helps businesses achieve digital transformation and data management through its products and services. 1) Oracle provides a comprehensive product portfolio, including database management systems, ERP and CRM systems, helping enterprises automate and optimize business processes. 2) Oracle's ERP systems such as E-BusinessSuite and FusionApplications realize end-to-end business process automation, improve efficiency and reduce costs, but have high implementation and maintenance costs. 3) OracleDatabase provides high concurrency and high availability data processing, but has high licensing costs. 4) Performance optimization and best practices include the rational use of indexing and partitioning technology, regular database maintenance and compliance with coding specifications.

Steps to delete the failed database after Oracle failed to build a library: Use sys username to connect to the target instance. Use DROP DATABASE to delete the database. Query v$database to confirm that the database has been deleted.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Notepad++7.3.1
Easy-to-use and free code editor