创建ASM实例及ASM数据库
文件按分配单元AUs(allocation units)平衡分布在磁盘组的所有磁盘中,ASM使用索引技术来跟踪每个AUs的位置,支持RAC集群技术,每一
--========================
-- 创建ASM实例及ASM数据库
--========================
一、ASM相关概念
1.什么是ASM(Auto Storage Management)
简称自动存储管理,是一种用于管理磁盘的工具
能够在多个物理设备之间实现条带化、镜像数据文件、恢复文件等
文件按分配单元AUs(allocation units)平衡分布在磁盘组的所有磁盘中,ASM使用索引技术来跟踪每个AUs的位置
支持联机磁盘的动态增加和减少,当磁盘发生变化后,AUs会自动重新实现动态分布
支持RAC集群技术,每一节点上运行一个ASM实例,各ASM实例间能实现点对点通讯
是一个纯软件级别的实现方式,第三方RAID工作在卷层次上,使用统一条带大小,ASM可以工作在文件层次级别,不同文件可以使用
不同的条带大小
2.ASM的优点
磁盘增加:增加磁盘变得非常容易。无需停机时间,并且文件区域自动重新分配。
I/O 分配:I/O 自动分布在所有可用的磁盘上,无需人工干预,从而减少了热点出现的可能性。
带区宽度:在重做日志文件中分段可以细分(K,以获得更快的传输速率),对于数据文件,带区则略大一些(MB,以一次性传输大量的数据块)。
缓冲:ASM 文件系统不进行缓冲,直接进行输入/输出。
镜像:如果硬件镜像不可用,则可以容易地建立软件镜像。
核心化的异步I/O :实现核心化的异步I/O 无需特殊的设置,并且无需使用原始或第三方的文件系统(如 Veritas Quick I/O)
3.Oracle 常用数据文件的RAID级别
SYSTEM、UNDO表空间通常置于RAID 1卷上
联机重做日志通常置于RAID 0卷上
控制文件通常置于RAID 0+1 卷上
数据文件通常置于RAID 5卷上
4.ASM体系结构(主要由ASM实例及ASM磁盘组组成)
ASM的使用需要创建一个ASM实例,用于管理ASM磁盘组
ASM磁盘组由ASM磁盘组成,可以包含一个或多个ASM磁盘
ASM磁盘可以是实际的磁盘,也可以是磁盘的某个分区,或LVM管理的逻辑卷,但必须是未格式化的原始设备
ASM磁盘组的大小为该组内ASM磁盘大小的总和,可使用的容量则根据容错级别而有不同的可用大小
5.ASM实例及RDBMS实例
ASM实例类似于普通的数据库实例(RDBMS),同样由SGA和一堆后台进程组成,对大多数系统而言,SGA只需64 MB即可
ASM实例中的LargePool 用于存放Extent Map,可以根据数据库的大小来计算LargePool的大小,通常100GB大小需要1MB存放Extent Map
普通的RDBMS实例会定位数据文件并打开其数据文件,而在使用ASM存储的数据库中,该工作由ASM实例接管,即ASM实例用于定位和
管理ASM磁盘,磁盘组。
ASM实例拥有类似于普通RDBMS实例的后台进程,如SMON,PMON,LGWR,DBWR,CKPT等,,还增添了两个新进程,一类是RBAL,一类是ARBn
RBAL:用于协调和管理磁盘组之间的动态平衡
ARBn:可以为多个,用于完成AU的移动
ASM实例仅仅是定位管理ASM磁盘,不能加载或打开数据库,因此也无法读取数据字典信息
ASM实例通常有个参数,只能使用口令文件或操作系统身份验证作为sysdba或sysoper来启动或关闭该实例。
关于sysdba或sysoper区别请参考:system sys,sysoper sysdba 的区别
一个ASM实例可以为多个RDBMS提供服务,可以在一台主机上创建多个ASM实例,但通常一台主机上使用一个ASM实例
如果一个实例服务于多个RDBMS,建议将ASM的ASM_HOME与DB的ORACLE_HOME分开,便于日后的升级与维护
ASM磁盘组的创建与配置在ASM实例启动之后
使用ASM磁盘的RDBMS实例与普通的RDBMS实例相同,但多出了两个后台进程,RBAL,ASMB。
ASMB借助某个服务器进程如oracle+ASM1建立普通RDBMS实例到ASM实例的会话,并传递磁盘文件的相关信息
RBAL打开通过ASM实例定位的ASM磁盘
注意:ASM 实例并不代替RDBMS实例来读取或写入数据文件,数据是直接在ASM磁盘和RDBMS实例传递,ASM实例仅用于定位数据文件
所在的asm磁盘,盘区以及所需的相关信息。假定新增加数据文件,则RDBMS告知ASM实例要创建数据文件,ASM实例则分配盘区
(extent),并创建盘区映射地址返回给RDBMS实例,RDBMS则将数据直接写入到磁盘组。
6.ASM实例中存储的文件类型
控制文件 参数文件 联机日志文件 归档日志文件 数据文件 临时文件
RMAN备份集、映像副本 控制文件备份集 datapump 转储文件、Change Tracing file

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics











Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

LaravelEloquent Model Retrieval: Easily obtaining database data EloquentORM provides a concise and easy-to-understand way to operate the database. This article will introduce various Eloquent model search techniques in detail to help you obtain data from the database efficiently. 1. Get all records. Use the all() method to get all records in the database table: useApp\Models\Post;$posts=Post::all(); This will return a collection. You can access data using foreach loop or other collection methods: foreach($postsas$post){echo$post->

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.
