今天是2014-03-24,介绍一个重命名oracle asm 磁盘组的工具renamedg The renamedg tool enables you to change the name of a cloned disk group. The disk group must be dismounted on all nodes in the cluster before running renamedg on the disk grou
今天是2014-03-24,介绍一个重命名oracle asm 磁盘组的工具renamedg
The renamedg tool enables you to change the name of a cloned disk group. The disk group must be dismounted on all nodes in the cluster before running renamedg on the disk group.
renamedg renames a disk group using a two-step process:
Phase one
This phase generates a configuration file to be used in phase two.
Phase two
This phase uses the configuration file to perform the renaming of the disk group.
The syntax is:
renamedg {-help | help=true}
renamedg
[phase={ one|two |both } ] dgname=diskgroup
newdgname=newdiskgroup [config=configfile]
[ asm_diskstring=discoverystring, discoverystring ... ]
[ clean={true|false} ] [ check={true|false} ]
[ confirm={true|false}] [ verbose={ true|false} ]
[ keep_voting_files={true|false}]
-
phase={one|two|both}
注意:
Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.2.0.0
Information in this document applies to any platform.
Goal
The purpose of this document is to provide information about rename diskgroup in 10g and 11gR1 release
Solution
rename diskgroup option is a new feature of 11gR2 .
You can use this tool to rename your 10g or 11gR1 ASM diskgroup
you need to just install 11gR2 SIHA Grid Infrastructure software only installation.
cd /bin
renamedg
use renamedg tool to rename 10g or 11gR1 diskgroup.
Diskgroup cannot be renamed under following conditions :
- the Diskgroup is mounted
- the Diskgroup is being used by CSS
- Diskgroup contains offline diskseg:
-bash-4.1$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 24 15:33:16 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Automatic Storage Management option SQL> alter diskgroup new_datagroup2 dismount; Diskgroup altered. SQL> SQL> SQL> exit -bash-4.1$ -bash-4.1$ renamedg -help NOTE: No asm libraries found in the system Parsing parameters.. phase Phase to execute, (phase=ONE|TWO|BOTH), default BOTH dgname Diskgroup to be renamed newdgname New name for the diskgroup config intermediate config file check just check-do not perform actual operation, (check=TRUE/FALSE), default FALSE confirm confirm before committing changes to disks, (confirm=TRUE/FALSE), default FALSE clean ignore errors, (clean=TRUE/FALSE), default TRUE asm_diskstring ASM Diskstring (asm_diskstring='discoverystring', 'discoverystring1' ...) verbose verbose execution, (verbose=TRUE|FALSE), default FALSE keep_voting_files Voting file attribute, (keep_voting_files=TRUE|FALSE), default FALSE -bash-4.1$ renamedg dgname=NEW_DATAGROUP2 newdgname=datagroup2 asm_diskstring='/dev/oracleasm/disks/*' verbose=true NOTE: No asm libraries found in the system Parsing parameters.. Parameters in effect: Old DG name : NEW_DATAGROUP2 New DG name : DATAGROUP2 Phases : Phase 1 Phase 2 Discovery str : /dev/oracleasm/disks/* Clean : TRUE Raw only : TRUE renamedg operation: dgname=NEW_DATAGROUP2 newdgname=datagroup2 asm_diskstring=/dev/oracleasm/disks/* verbose=true Executing phase 1 Discovering the group Performing discovery with string:/dev/oracleasm/disks/* Identified disk UFS:/dev/oracleasm/disks/ASMDISK5 with disk number:0 and timestamp (33001227 75905024) Identified disk UFS:/dev/oracleasm/disks/ASMDISK6 with disk number:1 and timestamp (33001227 75905024) Identified disk UFS:/dev/oracleasm/disks/ASMDISK7 with disk number:2 and timestamp (33001227 75905024) Identified disk UFS:/dev/oracleasm/disks/ASMDISK8 with disk number:5 and timestamp (33001229 -598404096) Identified disk UFS:/dev/oracleasm/disks/ASMDISK9 with disk number:3 and timestamp (33001229 -678575104) Identified disk UFS:/dev/oracleasm/disks/ASMDISK10 with disk number:4 and timestamp (33001229 -678575104) Checking for hearbeat... Re-discovering the group Performing discovery with string:/dev/oracleasm/disks/* Identified disk UFS:/dev/oracleasm/disks/ASMDISK5 with disk number:0 and timestamp (33001227 75905024) Identified disk UFS:/dev/oracleasm/disks/ASMDISK6 with disk number:1 and timestamp (33001227 75905024) Identified disk UFS:/dev/oracleasm/disks/ASMDISK7 with disk number:2 and timestamp (33001227 75905024) Identified disk UFS:/dev/oracleasm/disks/ASMDISK8 with disk number:5 and timestamp (33001229 -598404096) Identified disk UFS:/dev/oracleasm/disks/ASMDISK9 with disk number:3 and timestamp (33001229 -678575104) Identified disk UFS:/dev/oracleasm/disks/ASMDISK10 with disk number:4 and timestamp (33001229 -678575104) Checking if the diskgroup is mounted or used by CSS Checking disk number:0 Checking disk number:1 Checking disk number:2 Checking disk number:5 Checking disk number:3 Checking disk number:4 Generating configuration file.. Completed phase 1 Executing phase 2 Looking for /dev/oracleasm/disks/ASMDISK5 Modifying the header Looking for /dev/oracleasm/disks/ASMDISK6 Modifying the header Looking for /dev/oracleasm/disks/ASMDISK7 Modifying the header Looking for /dev/oracleasm/disks/ASMDISK8 Modifying the header Looking for /dev/oracleasm/disks/ASMDISK9 Modifying the header Looking for /dev/oracleasm/disks/ASMDISK10 Modifying the header Completed phase 2 Terminating kgfd context 0x7f57a379b0a0 -bash-4.1$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 24 15:35:04 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Automatic Storage Management option SQL> select name,state from v$asm_diskgroup; NAME STATE ------------------------------ ----------- DATAGROUP1 MOUNTED DATAGROUP2 DISMOUNTED SQL> alter diskgroup datagroup2 mount; Diskgroup altered. SQL> select name,state from v$asm_diskgroup; NAME STATE ------------------------------ ----------- DATAGROUP1 MOUNTED DATAGROUP2 MOUNTED SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Automatic Storage Management option -bash-4.1$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATAGROUP1.dg ONLINE ONLINE oracle-one ora.DATAGROUP2.dg ONLINE ONLINE oracle-one ora.LISTENER.lsnr ONLINE ONLINE oracle-one ora.NEW_DATAGROUP2.dg OFFLINE OFFLINE oracle-one ora.asm ONLINE ONLINE oracle-one Started ora.ons OFFLINE OFFLINE oracle-one -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cssd 1 ONLINE ONLINE oracle-one ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE oracle-one ora.rhys.db 1 OFFLINE OFFLINE Instance Shutdown -bash-4.1$ srvctl remove diskgroup -g new_datagroup2 -bash-4.1$ crsctl status res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATAGROUP1.dg ONLINE ONLINE oracle-one ora.DATAGROUP2.dg ONLINE ONLINE oracle-one ora.LISTENER.lsnr ONLINE ONLINE oracle-one ora.asm ONLINE ONLINE oracle-one Started ora.ons OFFLINE OFFLINE oracle-one -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cssd 1 ONLINE ONLINE oracle-one ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE oracle-one ora.rhys.db 1 OFFLINE OFFLINE Instance Shutdown

在数据库优化中,应根据查询需求选择索引策略:1.当查询涉及多个列且条件顺序固定时,使用复合索引;2.当查询涉及多个列但条件顺序不固定时,使用多个单列索引。复合索引适用于优化多列查询,单列索引则适合单列查询。

要优化MySQL慢查询,需使用slowquerylog和performance_schema:1.启用slowquerylog并设置阈值,记录慢查询;2.利用performance_schema分析查询执行细节,找出性能瓶颈并优化。

MySQL和SQL是开发者必备技能。1.MySQL是开源的关系型数据库管理系统,SQL是用于管理和操作数据库的标准语言。2.MySQL通过高效的数据存储和检索功能支持多种存储引擎,SQL通过简单语句完成复杂数据操作。3.使用示例包括基本查询和高级查询,如按条件过滤和排序。4.常见错误包括语法错误和性能问题,可通过检查SQL语句和使用EXPLAIN命令优化。5.性能优化技巧包括使用索引、避免全表扫描、优化JOIN操作和提升代码可读性。

MySQL异步主从复制通过binlog实现数据同步,提升读性能和高可用性。1)主服务器记录变更到binlog;2)从服务器通过I/O线程读取binlog;3)从服务器的SQL线程应用binlog同步数据。

MySQL是一个开源的关系型数据库管理系统。1)创建数据库和表:使用CREATEDATABASE和CREATETABLE命令。2)基本操作:INSERT、UPDATE、DELETE和SELECT。3)高级操作:JOIN、子查询和事务处理。4)调试技巧:检查语法、数据类型和权限。5)优化建议:使用索引、避免SELECT*和使用事务。

MySQL的安装和基本操作包括:1.下载并安装MySQL,设置根用户密码;2.使用SQL命令创建数据库和表,如CREATEDATABASE和CREATETABLE;3.执行CRUD操作,使用INSERT,SELECT,UPDATE,DELETE命令;4.创建索引和存储过程以优化性能和实现复杂逻辑。通过这些步骤,你可以从零开始构建和管理MySQL数据库。

InnoDBBufferPool通过将数据和索引页加载到内存中来提升MySQL数据库的性能。1)数据页加载到BufferPool中,减少磁盘I/O。2)脏页被标记并定期刷新到磁盘。3)LRU算法管理数据页淘汰。4)预读机制提前加载可能需要的数据页。

MySQL适合初学者使用,因为它安装简单、功能强大且易于管理数据。1.安装和配置简单,适用于多种操作系统。2.支持基本操作如创建数据库和表、插入、查询、更新和删除数据。3.提供高级功能如JOIN操作和子查询。4.可以通过索引、查询优化和分表分区来提升性能。5.支持备份、恢复和安全措施,确保数据的安全和一致性。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

SublimeText3 英文版
推荐:为Win版本,支持代码提示!

Dreamweaver CS6
视觉化网页开发工具