Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ ASM Management - How to Rename diskgroup     - Android Application Development: Genymotion can not start solving (Linux)

- RMAN backup file is much larger than the size of the database Cause Analysis (Database)

- Zorin OS: Linux novice most personal desktop system should be used (Linux)

- Fedora 22 installation and configuration optimization (Linux)

- How to build Mono 3.4.0 / 3.4.1 on Windows (Linux)

- Eclipse Android development environment installation (Linux)

- Linux the best download manager uGet (Linux)

- Linux system package manager (rpm, yum, source packages installation) (Linux)

- Xshell key authentication mechanism using a remote login Linux (Linux)

- How do I delete a NEEDS RECOVERY rollback state of undo tablespace (Database)

- Four safety delete files under Linux tools (Linux)

- Android Studio Clear Project or Rebuild Project Error (Linux)

- Linux log management tools Logrotate (Linux)

- Oracle metadata Reconstruction experiments (Database)

- curl Usage: Being the first site header and status codes (Server)

- Ubuntu 14.10 / 14.04 / 12.04 virtual users to install the printing software Boomaga (Linux)

- awk Programming Model (Programming)

- How to use nmap command in Linux (Linux)

- Linux operation and maintenance of the actual file system, file links (Linux)

- DBCA Error: ORA-19809: limit exceeded for recovery files process (Database)

 
         
  ASM Management - How to Rename diskgroup
     
  Add Date : 2018-11-21      
         
         
         
  ASM 11.2.0.1 version began to increase diskgroup rename the new features by renamedg diskgroup rename command has been created, you need to rename the former dismount diskgroup.

If you rename the diskgroup has been used to store the database data files, then you need to manually synchronize the location of the data file.

- Check the current ASM diskgroup named DGASMDB

$ Su - grid

$ Sqlplus / as sysasm

SQL> select GROUP_NUMBER, name, state, type, offline_disks, ALLOCATION_UNIT_SIZE, BLOCK_SIZE, TOTAL_MB, FREE_MB from v $ asm_diskgroup;

GROUP_NUMBER NAME STATE TYPE OFFLINE_DISKS ALLOCATION_UNIT_SIZE BLOCK_SIZE TOTAL_MB FREE_MB

------------ ---------- -------------- ------------- - ------------------- ---------- ---------- ----------

1 DGASMDB MOUNTED EXTERN 0 1048576 4096 3992 1879

- Check database current information (spfile / controlfile / datafile / redo)

su - Oracle

$ Sqlplus / as sysdba

SQL> show parameter spfile;

NAME TYPE VALUE

------------------------------------ ----------- --- ---------------------------

spfile string + DGASMDB / asmdb / spfileasmdb.ora

SQL> show parameter control

NAME TYPE VALUE

------------------------------------ ----------- --- ---------------------------

control_files string + DGASMDB / asmdb / controlfile / current.256.856653049

SQL> select name from v $ datafile;

NAME

-------------------------------------------------- ------------------------------

+ DGASMDB / asmdb / datafile / system.260.856653053

+ DGASMDB / asmdb / datafile / sysaux.261.856653059

+ DGASMDB / asmdb / datafile / undotbs1.262.856653061

+ DGASMDB / asmdb / datafile / users.264.856653075

+ DGASMDB / asmdb / datafile / asm_test.dbf

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

--dismount diskgroup dgasmdb

$ Su - grid

$ Asmcmd umount dgasmdb

- Rename command diskgroup, new diskgroup named dgasmdb_new

$ Renamedg phase = both dgname = dgasmdb newdgname = dgasmdb_new verbose = true

Parsing parameters ..

Parameters in effect:

Old DG name: DGASMDB

New DG name: DGASMDB_NEW

Phases:

Phase 1

Phase 2

Discovery str: (null)

Clean: TRUE

Raw only: TRUE

renamedg operation: phase = both dgname = dgasmdb newdgname = dgasmdb_new verbose = true

Executing phase 1

Discovering the group

Performing discovery with string:

Identified disk ASM: /opt/oracle/extapi/64/asm/orcl/1/libasm.so: ORCL: ASMDISK4G1 with disk number: 0 and timestamp (33006423 142494720)

Checking for hearbeat ...

Re-discovering the group

Performing discovery with string:

Identified disk ASM: /opt/oracle/extapi/64/asm/orcl/1/libasm.so: ORCL: ASMDISK4G1 with disk number: 0 and timestamp (33006423 142494720)

Checking if the diskgroup is mounted or used by CSS

Checking disk number: 0

Generating configuration file ..

Completed phase 1

Executing phase 2

Looking for ORCL: ASMDISK4G1

Modifying the header

Completed phase 2

Terminating kgfd context 0x7fa6c2bee0a0

--mount new diksgroup dgasmdb_new

$ Asmcmd mount dgasmdb_new

- Check out the new diskgroup information

SQL> select GROUP_NUMBER, name, state, type, offline_disks, ALLOCATION_UNIT_SIZE, BLOCK_SIZE, TOTAL_MB, FREE_MB from v $ asm_diskgroup;

GROUP_NUMBER NAME STATE TYPE OFFLINE_DISKS ALLOCATION_UNIT_SIZE BLOCK_SIZE TOTAL_MB FREE_MB

------------ ----------- -------- ------ ------------- -------------------- ---------- ---------- ----------

1 DGASMDB_NEW MOUNTED EXTERN 0 1048576 4096 3992 1879

- Modify DB initialization parameters (/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initasmdb.ora) configuration information

The original: SPFILE = '+ DGASMDB / asmdb / spfileasmdb.ora'

After modification: SPFILE = '+ DGASMDB_NEW / asmdb / spfileasmdb.ora'

- Start the database nomount

su - oracle

sqlplus / as sysdba

startup nomount;

- Modify control_files parameters:

SQL> alter system set control_files = '+ DGASMDB_NEW / asmdb / controlfile / current.256.856653049' scope = spfile;

SQL> shutdown immediate;

SQL> startup mount;

SQL> show parameter control_files

NAME TYPE VALUE

------------------------------------ ----------- --- ---------------------------

control_files string + DGASMDB_NEW / asmdb / controlfile

/current.256.856653049

- Confirm the current record or datafile located in the original diskgroup DGASMDB

SQL> select FILE #, name from v $ datafile;

FILE # NAME

---------- ---------------------------------------- -------------------------------------------------- ----------

1 + DGASMDB / asmdb / datafile / system.260.856653053

2 + DGASMDB / asmdb / datafile / sysaux.261.856653059

3 + DGASMDB / asmdb / datafile / undotbs1.262.856653061

4 + DGASMDB / asmdb / datafile / users.264.856653075

5 + DGASMDB / asmdb / datafile / asm_test.dbf

SQL> select file #, name from v $ tempfile;

FILE # NAME

---------- ---------------------------------------- ----------------------------------------

1 + DGASMDB / asmdb / tempfile / temp.263.856653061

- Modify datafile / tempfile Location:

SQL> conn / as sysdba

SQL> ALTER DATABASE RENAME FILE '+ DGASMDB / asmdb / datafile / system.260.856653053' TO '+ DGASMDB_NEW / asmdb / datafile / system.260.856653053';

SQL> ALTER DATABASE RENAME FILE '+ DGASMDB / asmdb / datafile / sysaux.261.856653059' TO '+ DGASMDB_NEW / asmdb / datafile / sysaux.261.856653059';

SQL> ALTER DATABASE RENAME FILE '+ DGASMDB / asmdb / datafile / undotbs1.262.856653061' TO '+ DGASMDB_NEW / asmdb / datafile / undotbs1.262.856653061';

SQL> ALTER DATABASE RENAME FILE '+ DGASMDB / asmdb / datafile / users.264.856653075' TO '+ DGASMDB_NEW / asmdb / datafile / users.264.856653075';

SQL> ALTER DATABASE RENAME FILE '+ DGASMDB / asmdb / datafile / asm_test.dbf' TO '+ DGASMDB_NEW / asmdb / datafile / asm_test.dbf';

SQL> ALTER DATABASE RENAME FILE '+ DGASMDB / asmdb / tempfile / temp.263.856653061' TO '+ DGASMDB_NEW / asmdb / tempfile / temp.263.856653061';

- Modified confirmation:

SQL> select FILE #, name from v $ datafile;

FILE # NAME

---------- ---------------------------------------- -------------------------------------------------- ----------

1 + DGASMDB_NEW / asmdb / datafile / system.260.856653053

2 + DGASMDB_NEW / asmdb / datafile / sysaux.261.856653059

3 + DGASMDB_NEW / asmdb / datafile / undotbs1.262.856653061

4 + DGASMDB_NEW / asmdb / datafile / users.264.856653075

5 + DGASMDB_NEW / asmdb / datafile / asm_test.dbf

- Modify the redo log location

alter database rename file '+ DGASMDB / asmdb / onlinelog / group_1.257.856653049' to '+ DGASMDB_NEW / asmdb / onlinelog / group_1.257.856653049';

alter database rename file '+ DGASMDB / asmdb / onlinelog / group_2.258.856653051' to '+ DGASMDB_NEW / asmdb / onlinelog / group_2.258.856653051';

alter database rename file '+ DGASMDB / asmdb / onlinelog / group_3.259.856653051' to '+ DGASMDB_NEW / asmdb / onlinelog / group_3.259.856653051';

select * from v $ logfile;

- Start the database

SQL> alter database open;

After renaming diskgroup, have any effect on the database? How to synchronize data?

Before renaming diskgroup, you need to manually dismount the disk group, renaming process does not have the data to be modified, so no additional synchronization.
     
         
         
         
  More:      
 
- ImageMagick Tutorial: How to cut images in Linux command line (Linux)
- How to use Evernote in the Linux command line (Linux)
- CentOS 7 version how to achieve the power to start the graphical interface (Linux)
- OpenGL shadow map (Programming)
- Linux (Ubuntu) How iptables port mapping (Server)
- To create a problem by the statement date comparison of the difference between MySQL and Oracle (Database)
- Detailed software to run UnixBench (Linux)
- SYN attack hacker attack and defense of the basic principles and prevention technology (Linux)
- Build your own Python coding environment (Linux)
- CentOS 6 Install Linux kernel source (Linux)
- Android application security of data transmission security (Programming)
- Firewall Configuration Red Hat Enterprise Linux 4 (Linux)
- Oracle 10g, 11g database silent installation of small differences (Database)
- Oracle 11g new features of the collection of multi-column statistics (Database)
- Easily create RPM packages using the FPM (Linux)
- Ubuntu 14.04 LTS 64-bit installation and activation Sublime Text 3 can not solve the Chinese input method to solve the problem (Linux)
- Phoenix agents use P2P WebRTC development (Programming)
- Help you to see Linux system architecture type 5 Common Commands (Linux)
- Hadoop1.2.1 plug compilation (Server)
- Oracle create user authorization and in PLSQL (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.