Microsoft Windows [Version 10.0.17134.228]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm1.asm
ASM-00200: Invalid command option
ASM-00210: asmtool -create \\server\share\file <size in MB>
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm1.asm 500m
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm2.asm 500m
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm3.asm 500m
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm3.asm 500m
ASM-00001: Could not open device D:\asmdisks\asm3.asm
O/S-Error: (OS 80) The file exists.
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm4.asm 500m
C:\WINDOWS\system32>cd C:\app
C:\app>dir
Volume in drive C has no label.
Volume Serial Number is 06A9-0EA9
Directory of C:\app
08/27/2018 02:34 PM <DIR> .
08/27/2018 02:34 PM <DIR> ..
08/27/2018 02:34 PM <DIR> admin
08/27/2018 02:56 PM <DIR> cfgtoollogs
08/27/2018 02:33 PM <DIR> diag
08/27/2018 02:43 PM <DIR> flash_recovery_area
08/27/2018 02:34 PM <DIR> oradata
08/27/2018 01:20 PM <DIR> product
0 File(s) 0 bytes
8 Dir(s) 87,236,947,968 bytes free
C:\app>cd product\11.1.0\db_1\BIN
C:\app\product\11.1.0\db_1\BIN>localconfig add
Step 1: creating new OCR repository
Successfully accumulated necessary OCR keys.
Creating OCR keys for user '4spl-param', privgrp ''..
Operation successful.
Step 2: creating new CSS service
successfully created local CSS service
successfully added CSS to home
C:\app\product\11.1.0\db_1\BIN>cd ..
C:\app\product\11.1.0\db_1>cd database
C:\app\product\11.1.0\db_1\database>dir
Volume in drive C has no label.
Volume Serial Number is 06A9-0EA9
Directory of C:\app\product\11.1.0\db_1\database
08/27/2018 11:22 PM <DIR> .
08/27/2018 11:22 PM <DIR> ..
08/27/2018 02:29 PM <DIR> archive
08/28/2018 09:23 PM 2,048 hc_+asm.dat
08/27/2018 11:22 PM 2,048 hc_orcl.dat
08/26/2018 10:55 AM 91 init+ASM.ora
12/22/2005 04:07 AM 31,744 oradba.exe
08/28/2018 09:23 PM 330 oradim.log
08/27/2018 02:57 PM 1,536 PWDorcl.ora
08/27/2018 11:03 PM 2,560 SPFILEORCL.ORA
7 File(s) 40,357 bytes
3 Dir(s) 86,966,845,440 bytes free
C:\app\product\11.1.0\db_1\database>notepad init+ASM.ORA
C:\app\product\11.1.0\db_1\database>type init+ASM.ora
instance_type=asm
db_unique_name=+asm
asm_diskstring='d:\asmdisks\*'
Background_dump_dest='C:\app\admin\+ASM\bdump'
User_dump_dest='C:\app\admin\+ASM\udump'
_asm_allow_only_raw_disks=false
asm_diskgroups=data
C:\app\product\11.1.0\db_1\database>oradim -new -asmsid +asm
Instance created.
C:\app\product\11.1.0\db_1\database>set oracle_sid=+asm
C:\app\product\11.1.0\db_1\database>sqlplus
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Aug 28 21:41:33 2018
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter user-name: / as sysdba
Connected to an idle instance.
SQL> select * from v$asm;
select * from v$asm
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00101: unknown parameter name 'Lagre_pool_size'
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ASM instance started
Total System Global Area 1071333376 bytes
Fixed Size 1352100 bytes
Variable Size 1044815452 bytes
ASM Cache 25165824 bytes
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"
SQL> set lines 30000
SQL> set pages 200
SQL> select * from v$asm_disk;
GROUP_NUMBER DISK_NUMBER COMPOUND_INDEX INCARNATION MOUNT_S HEADER_STATU MODE_ST STATE REDUNDA LIBRARY
OS_MB TOTAL_MB FREE_MB NAME FAILGROUP
LABEL PATH
UDID PRODUCT
CREATE_DA MOUNT_DAT REPAIR_TIMER READS WRITES READ_ERRS WRITE_ERRS READ_TIME WRITE_TIME BYTES_READ BYTES_WRITTEN P HASH_VALUE
------------ ----------- -------------- ----------- ------- ------------ ------- -------- ------- ---------------------------------------------------------------- ---------- ---------- ---------- ------------------------------ ------------------------------ ------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------- -------------------------------- --------- --------- ------------ ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------------- - ----------
0 0 0 4031518121 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM1.ASM
0
0
0 3 3 4031518124 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM4.ASM
0
0
0 2 2 4031518123 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM3.ASM
0
0
0 1 1 4031518122 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM2.ASM
0
0
SQL> select * from v$asm_diskgroup;
no rows selected
SQL> create diskgroup data external redundancy disk
2 'D:\asmdisks\asm1.asm', 'D:\asmdisks\asm2.asm','D:\asmdisks\asm3.asm','D:\asmdisks\asm4.asm';
Diskgroup created.
SQL> select * from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB
FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY
------------ ------------------------------ ----------- ---------- -------------------- ----------- ------ ---------- ---------- ----------------------- -------------- ------------- ------------------------------------------------------------ ------------------------------------------------------------
1 DATA 512 4096 1048576 MOUNTED EXTERN 2000
1944 0 1944 0 10.1.0.0.0 10.1.0.0.0
SQL>
C:\WINDOWS\system32>set ORACLE_SID=orcl
C:\WINDOWS\system32>sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Aug 28 22:42:49 2018
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\SYSTEM01.DBF
C:\APP\ORADATA\ORCL\SYSAUX01.DBF
C:\APP\ORADATA\ORCL\UNDOTBS01.DBF
C:\APP\ORADATA\ORCL\USERS01.DBF
C:\APP\ORADATA\ORCL\EXAMPLE01.DBF
SQL> sho parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string C:\APP\ORADATA\ORCL\CONTROL01.
CTL, C:\APP\ORADATA\ORCL\CONTR
OL02.CTL, C:\APP\ORADATA\ORCL\
CONTROL03.CTL
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
C:\APP\ORADATA\ORCL\REDO02.LOG
C:\APP\ORADATA\ORCL\REDO01.LOG
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\TEMP01.DBF
SQL> alter system set control_files='+DATA' scope=spfile;
System altered.
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> ho rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Tue Aug 28 23:00:07 2018
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area 857903104 bytes
Fixed Size 1350668 bytes
Variable Size 499123188 bytes
Database Buffers 352321536 bytes
Redo Buffers 5107712 bytes
RMAN> restore controlfile from 'C:\app\oradata\orcl\CONTROL01.CTL';
Starting restore at 28-AUG-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=151 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/orcl/controlfile/current.256.985388553
Finished restore at 28-AUG-18
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> backup as copy database format '+DATA';
Starting backup at 28-AUG-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=151 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=C:\APP\ORADATA\ORCL\SYSTEM01.DBF
output file name=+DATA/orcl/datafile/system.257.985388649 tag=TAG20180828T230408 RECID=2 STAMP=985388699
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=C:\APP\ORADATA\ORCL\SYSAUX01.DBF
output file name=+DATA/orcl/datafile/sysaux.258.985388705 tag=TAG20180828T230408 RECID=3 STAMP=985388741
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=C:\APP\ORADATA\ORCL\EXAMPLE01.DBF
output file name=+DATA/orcl/datafile/example.259.985388751 tag=TAG20180828T230408 RECID=4 STAMP=985388757
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=C:\APP\ORADATA\ORCL\UNDOTBS01.DBF
output file name=+DATA/orcl/datafile/undotbs1.260.985388765 tag=TAG20180828T230408 RECID=5 STAMP=985388768
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+DATA/orcl/controlfile/backup.261.985388769 tag=TAG20180828T230408 RECID=6 STAMP=985388769
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=C:\APP\ORADATA\ORCL\USERS01.DBF
output file name=+DATA/orcl/datafile/users.262.985388771 tag=TAG20180828T230408 RECID=7 STAMP=985388771
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 28-AUG-18
channel ORA_DISK_1: finished piece 1 at 28-AUG-18
piece handle=+DATA/orcl/backupset/2018_08_28/nnsnf0_tag20180828t230408_0.263.985388773 tag=TAG20180828T230408 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-AUG-18
RMAN> switch database to copy;
datafile 1 switched to datafile copy "+DATA/orcl/datafile/system.257.985388649"
datafile 2 switched to datafile copy "+DATA/orcl/datafile/sysaux.258.985388705"
datafile 3 switched to datafile copy "+DATA/orcl/datafile/undotbs1.260.985388765"
datafile 4 switched to datafile copy "+DATA/orcl/datafile/users.262.985388771"
datafile 5 switched to datafile copy "+DATA/orcl/datafile/example.259.985388751"
RMAN> exit
Recovery Manager complete.
SQL> connect / as sysdba
Connected.
SQL> select * from dba_data_files;
select * from dba_data_files
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
SQL> alter database open;
Database altered.
ONLINE
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
+DATA/orcl/datafile/users.262.985388771
+DATA/orcl/datafile/undotbs1.260.985388765
+DATA/orcl/datafile/sysaux.258.985388705
+DATA/orcl/datafile/system.257.985388649
+DATA/orcl/datafile/example.259.985388751
SQL> sho parameter control;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/orcl/controlfile/current
.256.985388553
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
C:\APP\ORADATA\ORCL\REDO02.LOG
C:\APP\ORADATA\ORCL\REDO01.LOG
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 4 52428800 1 YES INACTIVE
956818 28-AUG-18
2 1 5 52428800 1 YES INACTIVE
960262 28-AUG-18
3 1 6 52428800 1 NO CURRENT
960318 28-AUG-18
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database add logfile group 1 ('+DATA') size 50m;
Database altered.
SQL> alter database drop logfile group ;
alter database drop logfile group
*
ERROR at line 1:
ORA-02177: Missing required group number
SQL> alter database drop logfile group 2;
Database altered.
SQL> alter database add logfile group 2 ('+DATA') size 50m;
Database altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 0 52428800 1 YES UNUSED
0
2 1 0 52428800 1 YES UNUSED
0
3 1 6 52428800 1 NO CURRENT
960318 28-AUG-18
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 7 52428800 1 NO CURRENT
961452 28-AUG-18
2 1 0 52428800 1 YES UNUSED
0
3 1 6 52428800 1 YES ACTIVE
960318 28-AUG-18
SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance orcl (thread 1)
ORA-00312: online log 3 thread 1: 'C:\APP\ORADATA\ORCL\REDO03.LOG'
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 7 52428800 1 YES ACTIVE
961452 28-AUG-18
2 1 8 52428800 1 YES ACTIVE
961499 28-AUG-18
3 1 9 52428800 1 NO CURRENT
961506 28-AUG-18
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 NO CURRENT
961537 28-AUG-18
2 1 8 52428800 1 YES INACTIVE
961499 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES ACTIVE
961537 28-AUG-18
2 1 11 52428800 1 NO CURRENT
961546 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
SQL> alter database add logfile group 4 ('+DATA') size 50m;
Database altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES ACTIVE
961537 28-AUG-18
2 1 11 52428800 1 NO CURRENT
961546 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 0 52428800 1 YES UNUSED
0
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES ACTIVE
961537 28-AUG-18
2 1 11 52428800 1 YES ACTIVE
961546 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 12 52428800 1 NO CURRENT
961576 28-AUG-18
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
+DATA/orcl/onlinelog/group_2.265.985389199
+DATA/orcl/onlinelog/group_1.264.985389177
+DATA/orcl/onlinelog/group_4.266.985389409
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\TEMP01.DBF
SQL> select FILE#,name from v$tempfile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
C:\APP\ORADATA\ORCL\TEMP01.DBF
SQL> alter database tempfile 1 drop;
Database altered.
SQL> alter tablespace temp add tempfile '+DATA' size 10m;
Tablespace altered.
SQL> alter database default temporary tablespace temp;
alter database default temporary tablespace temp
*
ERROR at line 1:
ORA-12907: tablespace TEMP is already the default temporary tablespace
SQL> select FILE#,name from v$tempfile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
+DATA/orcl/tempfile/temp.267.985389595
SQL> ho rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Tue Aug 28 23:20:50 2018
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1513052931)
RMAN> delete copy of database;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=126 device type=DISK
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - --------------- ---------- ---------------
8 1 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\SYSTEM01.DBF
9 2 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\SYSAUX01.DBF
10 3 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\UNDOTBS01.DBF
11 4 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\USERS01.DBF
12 5 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\EXAMPLE01.DBF
Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\SYSTEM01.DBF RECID=8 STAMP=985388831
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\SYSAUX01.DBF RECID=9 STAMP=985388832
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\UNDOTBS01.DBF RECID=10 STAMP=985388832
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\USERS01.DBF RECID=11 STAMP=985388832
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\EXAMPLE01.DBF RECID=12 STAMP=985388833
Deleted 5 objects
RMAN> exit
Recovery Manager complete.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DATA/orcl/datafile/system.257.985388649
+DATA/orcl/datafile/sysaux.258.985388705
+DATA/orcl/datafile/undotbs1.260.985388765
+DATA/orcl/datafile/users.262.985388771
+DATA/orcl/datafile/example.259.985388751
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
+DATA/orcl/onlinelog/group_2.265.985389199
+DATA/orcl/onlinelog/group_1.264.985389177
+DATA/orcl/onlinelog/group_4.266.985389409
SQL> select FILE#,name from v$tempfile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
+DATA/orcl/tempfile/temp.267.985389595
SQL> sho parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/orcl/controlfile/current
.256.985388553
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> create pfile from spfile;
File created.
SQL> sho parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string C:\APP\PRODUCT\11.1.0\DB_1\DAT
ABASE\SPFILEORCL.ORA
SQL> create spfile='+DATA/spfileorcl.ora
2 from pfile;
create spfile='+DATA/spfileorcl.ora
*
ERROR at line 1:
ORA-01756: quoted string not properly terminated
SQL> create spfile='+DATA/spfileorcl.ora' from pfile;
File created.
AFTER lot of time, at last logfile 3 is inactive.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES INACTIVE
961537 28-AUG-18
2 1 11 52428800 1 YES INACTIVE
961546 28-AUG-18
3 1 9 52428800 1 YES INACTIVE
961506 28-AUG-18
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 12 52428800 1 NO CURRENT
961576 28-AUG-18
SQL> alter database drop logfile group 3;
Database altered.
SQL> alter database add logfile group 3('+DATA') size 50m;
Database altered.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DATA/orcl/onlinelog/group_3.269.985430093
+DATA/orcl/onlinelog/group_2.265.985389199
+DATA/orcl/onlinelog/group_1.264.985389177
+DATA/orcl/onlinelog/group_4.266.985389409
(c) 2018 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm1.asm
ASM-00200: Invalid command option
ASM-00210: asmtool -create \\server\share\file <size in MB>
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm1.asm 500m
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm2.asm 500m
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm3.asm 500m
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm3.asm 500m
ASM-00001: Could not open device D:\asmdisks\asm3.asm
O/S-Error: (OS 80) The file exists.
C:\WINDOWS\system32>asmtool -create D:\asmdisks\asm4.asm 500m
C:\WINDOWS\system32>cd C:\app
C:\app>dir
Volume in drive C has no label.
Volume Serial Number is 06A9-0EA9
Directory of C:\app
08/27/2018 02:34 PM <DIR> .
08/27/2018 02:34 PM <DIR> ..
08/27/2018 02:34 PM <DIR> admin
08/27/2018 02:56 PM <DIR> cfgtoollogs
08/27/2018 02:33 PM <DIR> diag
08/27/2018 02:43 PM <DIR> flash_recovery_area
08/27/2018 02:34 PM <DIR> oradata
08/27/2018 01:20 PM <DIR> product
0 File(s) 0 bytes
8 Dir(s) 87,236,947,968 bytes free
C:\app>cd product\11.1.0\db_1\BIN
C:\app\product\11.1.0\db_1\BIN>localconfig add
Step 1: creating new OCR repository
Successfully accumulated necessary OCR keys.
Creating OCR keys for user '4spl-param', privgrp ''..
Operation successful.
Step 2: creating new CSS service
successfully created local CSS service
successfully added CSS to home
C:\app\product\11.1.0\db_1\BIN>cd ..
C:\app\product\11.1.0\db_1>cd database
C:\app\product\11.1.0\db_1\database>dir
Volume in drive C has no label.
Volume Serial Number is 06A9-0EA9
Directory of C:\app\product\11.1.0\db_1\database
08/27/2018 11:22 PM <DIR> .
08/27/2018 11:22 PM <DIR> ..
08/27/2018 02:29 PM <DIR> archive
08/28/2018 09:23 PM 2,048 hc_+asm.dat
08/27/2018 11:22 PM 2,048 hc_orcl.dat
08/26/2018 10:55 AM 91 init+ASM.ora
12/22/2005 04:07 AM 31,744 oradba.exe
08/28/2018 09:23 PM 330 oradim.log
08/27/2018 02:57 PM 1,536 PWDorcl.ora
08/27/2018 11:03 PM 2,560 SPFILEORCL.ORA
7 File(s) 40,357 bytes
3 Dir(s) 86,966,845,440 bytes free
C:\app\product\11.1.0\db_1\database>notepad init+ASM.ORA
C:\app\product\11.1.0\db_1\database>type init+ASM.ora
instance_type=asm
db_unique_name=+asm
asm_diskstring='d:\asmdisks\*'
Background_dump_dest='C:\app\admin\+ASM\bdump'
User_dump_dest='C:\app\admin\+ASM\udump'
_asm_allow_only_raw_disks=false
asm_diskgroups=data
C:\app\product\11.1.0\db_1\database>oradim -new -asmsid +asm
Instance created.
C:\app\product\11.1.0\db_1\database>set oracle_sid=+asm
C:\app\product\11.1.0\db_1\database>sqlplus
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Aug 28 21:41:33 2018
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter user-name: / as sysdba
Connected to an idle instance.
SQL> select * from v$asm;
select * from v$asm
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00101: unknown parameter name 'Lagre_pool_size'
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ASM instance started
Total System Global Area 1071333376 bytes
Fixed Size 1352100 bytes
Variable Size 1044815452 bytes
ASM Cache 25165824 bytes
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"
SQL> set lines 30000
SQL> set pages 200
SQL> select * from v$asm_disk;
GROUP_NUMBER DISK_NUMBER COMPOUND_INDEX INCARNATION MOUNT_S HEADER_STATU MODE_ST STATE REDUNDA LIBRARY
OS_MB TOTAL_MB FREE_MB NAME FAILGROUP
LABEL PATH
UDID PRODUCT
CREATE_DA MOUNT_DAT REPAIR_TIMER READS WRITES READ_ERRS WRITE_ERRS READ_TIME WRITE_TIME BYTES_READ BYTES_WRITTEN P HASH_VALUE
------------ ----------- -------------- ----------- ------- ------------ ------- -------- ------- ---------------------------------------------------------------- ---------- ---------- ---------- ------------------------------ ------------------------------ ------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------- -------------------------------- --------- --------- ------------ ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------------- - ----------
0 0 0 4031518121 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM1.ASM
0
0
0 3 3 4031518124 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM4.ASM
0
0
0 2 2 4031518123 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM3.ASM
0
0
0 1 1 4031518122 CLOSED CANDIDATE ONLINE NORMAL UNKNOWN System
500 0 0
D:\ASMDISKS\ASM2.ASM
0
0
SQL> select * from v$asm_diskgroup;
no rows selected
SQL> create diskgroup data external redundancy disk
2 'D:\asmdisks\asm1.asm', 'D:\asmdisks\asm2.asm','D:\asmdisks\asm3.asm','D:\asmdisks\asm4.asm';
Diskgroup created.
SQL> select * from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB
FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY
------------ ------------------------------ ----------- ---------- -------------------- ----------- ------ ---------- ---------- ----------------------- -------------- ------------- ------------------------------------------------------------ ------------------------------------------------------------
1 DATA 512 4096 1048576 MOUNTED EXTERN 2000
1944 0 1944 0 10.1.0.0.0 10.1.0.0.0
SQL>
C:\WINDOWS\system32>set ORACLE_SID=orcl
C:\WINDOWS\system32>sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Aug 28 22:42:49 2018
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\SYSTEM01.DBF
C:\APP\ORADATA\ORCL\SYSAUX01.DBF
C:\APP\ORADATA\ORCL\UNDOTBS01.DBF
C:\APP\ORADATA\ORCL\USERS01.DBF
C:\APP\ORADATA\ORCL\EXAMPLE01.DBF
SQL> sho parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string C:\APP\ORADATA\ORCL\CONTROL01.
CTL, C:\APP\ORADATA\ORCL\CONTR
OL02.CTL, C:\APP\ORADATA\ORCL\
CONTROL03.CTL
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
C:\APP\ORADATA\ORCL\REDO02.LOG
C:\APP\ORADATA\ORCL\REDO01.LOG
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\TEMP01.DBF
SQL> alter system set control_files='+DATA' scope=spfile;
System altered.
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> ho rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Tue Aug 28 23:00:07 2018
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area 857903104 bytes
Fixed Size 1350668 bytes
Variable Size 499123188 bytes
Database Buffers 352321536 bytes
Redo Buffers 5107712 bytes
RMAN> restore controlfile from 'C:\app\oradata\orcl\CONTROL01.CTL';
Starting restore at 28-AUG-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=151 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/orcl/controlfile/current.256.985388553
Finished restore at 28-AUG-18
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> backup as copy database format '+DATA';
Starting backup at 28-AUG-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=151 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=C:\APP\ORADATA\ORCL\SYSTEM01.DBF
output file name=+DATA/orcl/datafile/system.257.985388649 tag=TAG20180828T230408 RECID=2 STAMP=985388699
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=C:\APP\ORADATA\ORCL\SYSAUX01.DBF
output file name=+DATA/orcl/datafile/sysaux.258.985388705 tag=TAG20180828T230408 RECID=3 STAMP=985388741
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=C:\APP\ORADATA\ORCL\EXAMPLE01.DBF
output file name=+DATA/orcl/datafile/example.259.985388751 tag=TAG20180828T230408 RECID=4 STAMP=985388757
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=C:\APP\ORADATA\ORCL\UNDOTBS01.DBF
output file name=+DATA/orcl/datafile/undotbs1.260.985388765 tag=TAG20180828T230408 RECID=5 STAMP=985388768
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+DATA/orcl/controlfile/backup.261.985388769 tag=TAG20180828T230408 RECID=6 STAMP=985388769
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=C:\APP\ORADATA\ORCL\USERS01.DBF
output file name=+DATA/orcl/datafile/users.262.985388771 tag=TAG20180828T230408 RECID=7 STAMP=985388771
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 28-AUG-18
channel ORA_DISK_1: finished piece 1 at 28-AUG-18
piece handle=+DATA/orcl/backupset/2018_08_28/nnsnf0_tag20180828t230408_0.263.985388773 tag=TAG20180828T230408 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-AUG-18
RMAN> switch database to copy;
datafile 1 switched to datafile copy "+DATA/orcl/datafile/system.257.985388649"
datafile 2 switched to datafile copy "+DATA/orcl/datafile/sysaux.258.985388705"
datafile 3 switched to datafile copy "+DATA/orcl/datafile/undotbs1.260.985388765"
datafile 4 switched to datafile copy "+DATA/orcl/datafile/users.262.985388771"
datafile 5 switched to datafile copy "+DATA/orcl/datafile/example.259.985388751"
RMAN> exit
Recovery Manager complete.
SQL> connect / as sysdba
Connected.
SQL> select * from dba_data_files;
select * from dba_data_files
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
SQL> alter database open;
Database altered.
ONLINE
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
+DATA/orcl/datafile/users.262.985388771
+DATA/orcl/datafile/undotbs1.260.985388765
+DATA/orcl/datafile/sysaux.258.985388705
+DATA/orcl/datafile/system.257.985388649
+DATA/orcl/datafile/example.259.985388751
SQL> sho parameter control;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/orcl/controlfile/current
.256.985388553
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
C:\APP\ORADATA\ORCL\REDO02.LOG
C:\APP\ORADATA\ORCL\REDO01.LOG
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 4 52428800 1 YES INACTIVE
956818 28-AUG-18
2 1 5 52428800 1 YES INACTIVE
960262 28-AUG-18
3 1 6 52428800 1 NO CURRENT
960318 28-AUG-18
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database add logfile group 1 ('+DATA') size 50m;
Database altered.
SQL> alter database drop logfile group ;
alter database drop logfile group
*
ERROR at line 1:
ORA-02177: Missing required group number
SQL> alter database drop logfile group 2;
Database altered.
SQL> alter database add logfile group 2 ('+DATA') size 50m;
Database altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 0 52428800 1 YES UNUSED
0
2 1 0 52428800 1 YES UNUSED
0
3 1 6 52428800 1 NO CURRENT
960318 28-AUG-18
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 7 52428800 1 NO CURRENT
961452 28-AUG-18
2 1 0 52428800 1 YES UNUSED
0
3 1 6 52428800 1 YES ACTIVE
960318 28-AUG-18
SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance orcl (thread 1)
ORA-00312: online log 3 thread 1: 'C:\APP\ORADATA\ORCL\REDO03.LOG'
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 7 52428800 1 YES ACTIVE
961452 28-AUG-18
2 1 8 52428800 1 YES ACTIVE
961499 28-AUG-18
3 1 9 52428800 1 NO CURRENT
961506 28-AUG-18
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 NO CURRENT
961537 28-AUG-18
2 1 8 52428800 1 YES INACTIVE
961499 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES ACTIVE
961537 28-AUG-18
2 1 11 52428800 1 NO CURRENT
961546 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
SQL> alter database add logfile group 4 ('+DATA') size 50m;
Database altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES ACTIVE
961537 28-AUG-18
2 1 11 52428800 1 NO CURRENT
961546 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 0 52428800 1 YES UNUSED
0
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES ACTIVE
961537 28-AUG-18
2 1 11 52428800 1 YES ACTIVE
961546 28-AUG-18
3 1 9 52428800 1 YES ACTIVE
961506 28-AUG-18
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 12 52428800 1 NO CURRENT
961576 28-AUG-18
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
+DATA/orcl/onlinelog/group_2.265.985389199
+DATA/orcl/onlinelog/group_1.264.985389177
+DATA/orcl/onlinelog/group_4.266.985389409
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\TEMP01.DBF
SQL> select FILE#,name from v$tempfile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
C:\APP\ORADATA\ORCL\TEMP01.DBF
SQL> alter database tempfile 1 drop;
Database altered.
SQL> alter tablespace temp add tempfile '+DATA' size 10m;
Tablespace altered.
SQL> alter database default temporary tablespace temp;
alter database default temporary tablespace temp
*
ERROR at line 1:
ORA-12907: tablespace TEMP is already the default temporary tablespace
SQL> select FILE#,name from v$tempfile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
+DATA/orcl/tempfile/temp.267.985389595
SQL> ho rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Tue Aug 28 23:20:50 2018
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1513052931)
RMAN> delete copy of database;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=126 device type=DISK
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - --------------- ---------- ---------------
8 1 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\SYSTEM01.DBF
9 2 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\SYSAUX01.DBF
10 3 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\UNDOTBS01.DBF
11 4 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\USERS01.DBF
12 5 A 28-AUG-18 960816 28-AUG-18
Name: C:\APP\ORADATA\ORCL\EXAMPLE01.DBF
Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\SYSTEM01.DBF RECID=8 STAMP=985388831
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\SYSAUX01.DBF RECID=9 STAMP=985388832
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\UNDOTBS01.DBF RECID=10 STAMP=985388832
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\USERS01.DBF RECID=11 STAMP=985388832
deleted datafile copy
datafile copy file name=C:\APP\ORADATA\ORCL\EXAMPLE01.DBF RECID=12 STAMP=985388833
Deleted 5 objects
RMAN> exit
Recovery Manager complete.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DATA/orcl/datafile/system.257.985388649
+DATA/orcl/datafile/sysaux.258.985388705
+DATA/orcl/datafile/undotbs1.260.985388765
+DATA/orcl/datafile/users.262.985388771
+DATA/orcl/datafile/example.259.985388751
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
C:\APP\ORADATA\ORCL\REDO03.LOG
+DATA/orcl/onlinelog/group_2.265.985389199
+DATA/orcl/onlinelog/group_1.264.985389177
+DATA/orcl/onlinelog/group_4.266.985389409
SQL> select FILE#,name from v$tempfile;
FILE#
----------
NAME
--------------------------------------------------------------------------------
1
+DATA/orcl/tempfile/temp.267.985389595
SQL> sho parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/orcl/controlfile/current
.256.985388553
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> create pfile from spfile;
File created.
SQL> sho parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string C:\APP\PRODUCT\11.1.0\DB_1\DAT
ABASE\SPFILEORCL.ORA
SQL> create spfile='+DATA/spfileorcl.ora
2 from pfile;
create spfile='+DATA/spfileorcl.ora
*
ERROR at line 1:
ORA-01756: quoted string not properly terminated
SQL> create spfile='+DATA/spfileorcl.ora' from pfile;
File created.
AFTER lot of time, at last logfile 3 is inactive.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 10 52428800 1 YES INACTIVE
961537 28-AUG-18
2 1 11 52428800 1 YES INACTIVE
961546 28-AUG-18
3 1 9 52428800 1 YES INACTIVE
961506 28-AUG-18
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 12 52428800 1 NO CURRENT
961576 28-AUG-18
SQL> alter database drop logfile group 3;
Database altered.
SQL> alter database add logfile group 3('+DATA') size 50m;
Database altered.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DATA/orcl/onlinelog/group_3.269.985430093
+DATA/orcl/onlinelog/group_2.265.985389199
+DATA/orcl/onlinelog/group_1.264.985389177
+DATA/orcl/onlinelog/group_4.266.985389409
No comments:
Post a Comment