创建ASM磁盘组
ASM磁盘组是作为一个逻辑单元管理的一个ASM磁盘池。与其他任何LVM一样,ASM管理大量物理卷并将其作为一个或多个逻辑卷呈交给Oracle。物理卷可以是实际的磁盘或磁
ASM磁盘组是作为一个逻辑单元管理的一个ASM磁盘池。与其他任何LVM一样,ASM管理大量物理卷并将其作为一个或多个逻辑卷呈交给Oracle。物理卷可以是实际的磁盘或磁盘的分区,或者是隶属操作系统的卷管理器的卷。无论采用哪种方式,都不能使用任何文件系统格式化,必须是裸设备。
在Linux上,ASM能引用磁盘作为裸设备,或通过使用ASMLib软件。
直接使用裸设备的方法:
1. 在RHEL6以前的可以直接通过rawdevices的管理方法,系统安装后默认已存在/etc/init.d/rawdevices和/etc/sysconfig/rawdevices这两个文件。
# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) # rpm -qf /etc/init.d/rawdevices /etc/sysconfig/rawdevices initscripts-8.45.42-1.el5 initscripts-8.45.42-1.el5 # cat /etc/init.d/rawdevices #!/bin/bash # # rawdevices This shell script assignes rawdevices to block devices # # chkconfig: 345 56 44 # description: This scripts assignes raw devices to block devices \ # (such as hard drive partitions). This is for the use \ # of applications such as Oracle. You can set up the \ # raw device to block device mapping by editing \ # the file /etc/sysconfig/rawdevices. # config: /etc/sysconfig/rawdevices [ -f /bin/raw ] || exit 0 [ -f /etc/sysconfig/rawdevices ] || exit 0 # Exit if the file just has the default comments. LC_ALL=C /bin/egrep -q -v "^ *#" /etc/sysconfig/rawdevices 2>/dev/null || exit 0 . /etc/init.d/functions function assign_raw() { LC_ALL=C egrep -v '^ *#' /etc/sysconfig/rawdevices | while read RAW BLOCK; do if [ -n "$RAW" -a -n "$BLOCK" ]; then rawdirname=${RAW%/*} if [ "$rawdirname" = "/dev" -a -d /dev/raw ]; then echo $" Please correct your /etc/sysconfig/rawdevices:" echo $" rawdevices are now located in the directory /dev/raw/ " echo $" If the command 'raw' still refers to /dev/raw as a file." echo $" you'll have to upgrade your util-linux package" exit 0 fi if [ "$rawdirname" = "/dev/raw" -a -f /dev/raw ]; then echo $" Please correct your /etc/sysconfig/rawdevices:" echo $" rawdevices are now located in the directory /dev/raw/ " echo $" If the command 'raw' still refers to /dev/raw as a file." echo $" you'll have to upgrade your util-linux package" exit 0 fi echo " $RAW --> $BLOCK"; raw $RAW $BLOCK fi done } # See how we were called. case "$1" in start) # Assign devices echo $"Assigning devices: " assign_raw #添加以下两行(默认不存在),即默认情况下生成的裸设备为root所有, #所以必须修改属主,否则oracle用户无法使用裸设备 sleep 5 chown -R oracle:oinstall /dev/raw/ echo $"done" ;; stop) # No action to be taken here ;; status) ID=`id -u` if [ $ID -eq 0 ]; then raw -qa else echo $"You need to be root to use this command ! " fi ;; restart|reload) $0 start ;; *) echo $"Usage: $0 {start|stop|status|restart}" exit 1 esac exit 0
# vi /etc/sysconfig/rawdevices //映射将要绑定的裸设备 /dev/raw/raw10 /dev/sda10 /dev/raw/raw11 /dev/sda11 /dev/raw/raw12 /dev/sda12 /dev/raw/raw13 /dev/sda13 /dev/raw/raw14 /dev/sda14 # chkconfig rawdevices on # service rawdevices start Assigning devices: /dev/raw/raw10 --> /dev/sda10 /dev/raw/raw10: bound to major 8, minor 10 /dev/raw/raw11 --> /dev/sda11 /dev/raw/raw11: bound to major 8, minor 11 /dev/raw/raw12 --> /dev/sda12 /dev/raw/raw12: bound to major 8, minor 12 /dev/raw/raw13 --> /dev/sda13 /dev/raw/raw13: bound to major 8, minor 13 /dev/raw/raw14 --> /dev/sda14 /dev/raw/raw14: bound to major 8, minor 14 done # ls -l /dev/raw/ total 0 crw-rw----. 1 oracle oinstall 162, 10 May 27 08:37 raw10 crw-rw----. 1 oracle oinstall 162, 11 May 27 08:37 raw11 crw-rw----. 1 oracle oinstall 162, 12 May 27 08:37 raw12 crw-rw----. 1 oracle oinstall 162, 13 May 27 08:37 raw13 crw-rw----. 1 oracle oinstall 162, 14 May 27 08:37 raw14 crw-rw----. 1 oracle oinstall 162, 0 May 27 08:19 rawctl # raw -qa /dev/raw/raw10: bound to major 8, minor 10 /dev/raw/raw11: bound to major 8, minor 11 /dev/raw/raw12: bound to major 8, minor 12 /dev/raw/raw13: bound to major 8, minor 13 /dev/raw/raw14: bound to major 8, minor 14
2. 在RHEL6中,系统里面虽然已经不存在/etc/sysconfig/rawdevices和/etc/init.d/rawdevices文件了,但是依然支持rawdevices的方式,网站空间,网站空间,可以通过如下方法来管理raw文件。
手动创建/etc/sysconfig/rawdevices和/etc/init.d/rawdevices文件,然后依然以rawdevices的方式
通过udev来管理raw,同样也可以通过udev固定磁盘对应的设备名
以下介绍udev的方式:
# fdisk -l /dev/sdb Disk /dev/sdb: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 261 2096451 5 Extended /dev/sdb5 1 25 200749+ 83 Linux /dev/sdb6 26 50 200781 83 Linux /dev/sdb7 51 75 200781 83 Linux /dev/sdb8 76 100 200781 83 Linux /dev/sdb9 101 125 200781 83 Linux # vi /etc/udev/rules.d/60-raw.rules ACTION=="add",KERNEL=="sdb5",RUN+="/bin/raw /dev/raw/raw5 %N",OWNER="oracle", GROUP="oinstall", MODE="660" ACTION=="add",KERNEL=="sdb6",RUN+="/bin/raw /dev/raw/raw6 %N",OWNER="oracle", GROUP="oinstall", MODE="660" ACTION=="add",KERNEL=="sdb7",RUN+="/bin/raw /dev/raw/raw7 %N",OWNER="oracle", GROUP="oinstall", MODE="660" ACTION=="add",KERNEL=="sdb8",RUN+="/bin/raw /dev/raw/raw8 %N",OWNER="oracle", GROUP="oinstall", MODE="660" ACTION=="add",KERNEL=="sdb9",RUN+="/bin/raw /dev/raw/raw9 %N",OWNER="oracle", GROUP="oinstall", MODE="660" # raw -qa # start_udev Starting udev: [ OK ] # raw -qa /dev/raw/raw5: bound to major 8, minor 21 /dev/raw/raw6: bound to major 8, minor 22 /dev/raw/raw7: bound to major 8, minor 23 /dev/raw/raw8: bound to major 8, minor 24 /dev/raw/raw9: bound to major 8, minor 25 # ls -l /dev/raw total 0 crw-rw---- 1 oracle oinstall 162, 5 Jun 9 17:15 raw5 crw-rw---- 1 oracle oinstall 162, 6 Jun 9 17:15 raw6 crw-rw---- 1 oracle oinstall 162, 7 Jun 9 17:15 raw7 crw-rw---- 1 oracle oinstall 162, 8 Jun 9 17:15 raw8 crw-rw---- 1 oracle oinstall 162, 9 Jun 9 17:15 raw9
ASMLib:(非Linux系统只能使用裸设备的方法)
ASMLib是一组可选的位于ASM和硬件之间的一个内核驱动程序工具,也是作为一个应用程序库通过Oracle数据库软件访问ASM磁盘。
它是Oracle 10g和11g单实例数据库以及RAC的ASM特性支持库。ASM和数据库实例可以使用ASMLib作为可替代的磁盘访问接口。
ASMLib有以下三个组件:
内核驱动:oracleasm Linux中支持oracle ASMLib的内核驱动程序(需根据内核版本下载)
支持工具:oracleasm-support 提供用于配置和启动ASM驱动程序的实用工具
应用程序库:oracleasmlib 提供了实际的ASM库

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

전체 테이블 스캔은 MySQL에서 인덱스를 사용하는 것보다 빠를 수 있습니다. 특정 사례는 다음과 같습니다. 1) 데이터 볼륨은 작습니다. 2) 쿼리가 많은 양의 데이터를 반환 할 때; 3) 인덱스 열이 매우 선택적이지 않은 경우; 4) 복잡한 쿼리시. 쿼리 계획을 분석하고 인덱스 최적화, 과도한 인덱스를 피하고 정기적으로 테이블을 유지 관리하면 실제 응용 프로그램에서 최상의 선택을 할 수 있습니다.

예, MySQL은 Windows 7에 설치 될 수 있으며 Microsoft는 Windows 7 지원을 중단했지만 MySQL은 여전히 호환됩니다. 그러나 설치 프로세스 중에 다음 지점이 표시되어야합니다. Windows 용 MySQL 설치 프로그램을 다운로드하십시오. MySQL의 적절한 버전 (커뮤니티 또는 기업)을 선택하십시오. 설치 프로세스 중에 적절한 설치 디렉토리 및 문자를 선택하십시오. 루트 사용자 비밀번호를 설정하고 올바르게 유지하십시오. 테스트를 위해 데이터베이스에 연결하십시오. Windows 7의 호환성 및 보안 문제에 주목하고 지원되는 운영 체제로 업그레이드하는 것이 좋습니다.

MySQL은 오픈 소스 관계형 데이터베이스 관리 시스템입니다. 1) 데이터베이스 및 테이블 작성 : CreateAbase 및 CreateTable 명령을 사용하십시오. 2) 기본 작업 : 삽입, 업데이트, 삭제 및 선택. 3) 고급 운영 : 가입, 하위 쿼리 및 거래 처리. 4) 디버깅 기술 : 확인, 데이터 유형 및 권한을 확인하십시오. 5) 최적화 제안 : 인덱스 사용, 선택을 피하고 거래를 사용하십시오.

MySQL 및 MariaDB는 공존 할 수 있지만주의해서 구성해야합니다. 열쇠는 각 데이터베이스에 다른 포트 번호와 데이터 디렉토리를 할당하고 메모리 할당 및 캐시 크기와 같은 매개 변수를 조정하는 것입니다. 연결 풀링, 애플리케이션 구성 및 버전 차이도 고려해야하며 함정을 피하기 위해 신중하게 테스트하고 계획해야합니다. 두 개의 데이터베이스를 동시에 실행하면 리소스가 제한되는 상황에서 성능 문제가 발생할 수 있습니다.

데이터 통합 단순화 : AmazonRdsMysQL 및 Redshift의 Zero ETL 통합 효율적인 데이터 통합은 데이터 중심 구성의 핵심입니다. 전통적인 ETL (추출, 변환,로드) 프로세스는 특히 데이터베이스 (예 : AmazonRDSMySQL)를 데이터웨어 하우스 (예 : Redshift)와 통합 할 때 복잡하고 시간이 많이 걸립니다. 그러나 AWS는 이러한 상황을 완전히 변경 한 Zero ETL 통합 솔루션을 제공하여 RDSMYSQL에서 Redshift로 데이터 마이그레이션을위한 단순화 된 거의 실시간 솔루션을 제공합니다. 이 기사는 RDSMYSQL ZERL ETL 통합으로 Redshift와 함께 작동하여 데이터 엔지니어 및 개발자에게 제공하는 장점과 장점을 설명합니다.

MySQL 데이터베이스에서 사용자와 데이터베이스 간의 관계는 권한과 테이블로 정의됩니다. 사용자는 데이터베이스에 액세스 할 수있는 사용자 이름과 비밀번호가 있습니다. 권한은 보조금 명령을 통해 부여되며 테이블은 Create Table 명령에 의해 생성됩니다. 사용자와 데이터베이스 간의 관계를 설정하려면 데이터베이스를 작성하고 사용자를 생성 한 다음 권한을 부여해야합니다.

Laraveleloquent 모델 검색 : 데이터베이스 데이터를 쉽게 얻을 수 있습니다. 이 기사는 데이터베이스에서 데이터를 효율적으로 얻는 데 도움이되는 다양한 웅변 모델 검색 기술을 자세히 소개합니다. 1. 모든 기록을 얻으십시오. 모든 () 메소드를 사용하여 데이터베이스 테이블에서 모든 레코드를 가져옵니다. 이것은 컬렉션을 반환합니다. Foreach 루프 또는 기타 수집 방법을 사용하여 데이터에 액세스 할 수 있습니다 : Foreach ($ postas $ post) {echo $ post->

MySQL은 설치가 간단하고 강력하며 데이터를 쉽게 관리하기 쉽기 때문에 초보자에게 적합합니다. 1. 다양한 운영 체제에 적합한 간단한 설치 및 구성. 2. 데이터베이스 및 테이블 작성, 삽입, 쿼리, 업데이트 및 삭제와 같은 기본 작업을 지원합니다. 3. 조인 작업 및 하위 쿼리와 같은 고급 기능을 제공합니다. 4. 인덱싱, 쿼리 최적화 및 테이블 파티셔닝을 통해 성능을 향상시킬 수 있습니다. 5. 데이터 보안 및 일관성을 보장하기위한 지원 백업, 복구 및 보안 조치.
