OracleDB12c New Feature: Rename and Replace ASM Disk(s) in Diskgroup

As I have not set up 12c GI ASM yet, have not tested this feature… Rename clause is nice to have. Replace clause helps to avoid multiple steps when replacing disk (LUN) with new one [array migration, for example].

Information below is straight copy from Oracle Documentation

rename_disk_clause

ALTER DISKGROUP diskgroup_name 
  RENAME
  { DISK old_disk_name TO new_disk_name 
  [, old_disk_name TO new_disk_name ]...
  | DISKS ALL }

Use this clause to rename one or more disks in the disk group. The disk group must be in the MOUNT RESTRICTED state and all disks in the disk group must be online.

RENAME DISK Specify this clause to rename one or more disks. For each disk, specify the old_disk_name and new_disk_name. If new_disk_name already exists, then this operation fails.
RENAME DISKS ALL Specify this clause to rename all disks in the disk group to a name of the form diskgroupname_####, where #### is the disk number. Disk names that are already in the diskgroupname_#### format are not changed.

replace_disk_clause

ALTER DISKGROUP diskgroup_name 
  REPLACE DISK disk_name 
  WITH 'path_name' 
  [ POWER integer ] [ WAIT | NOWAIT ]

Use this clause to replace a disk in the disk group. This clause provides a single replace operation, which is more efficient than dropping and adding a disk.

For disk_name, specify the name of the disk you want to replace. This name is assigned to the replacement disk. You can view disk names by querying the NAME column of the V$ASM_DISK dynamic performance view.

For path_name, specify the full path name for the replacement disk.

The POWER clause has the same semantics here as for a manual rebalancing of a disk group, except that the power value cannot be set to 0.  The WAIT and NOWAIT keywords have the same semantics here as for a manual rebalancing of a disk group.

 

OracleDB12c New Feature: Last Login Time of User

The SYS.USER$ table in Oracle Database 12c includes a column to store the last login time of the user. In the previous releases, to be able to know the last login time of the user, we had to enable “AUDIT SESSION” and then query the AUD$ table. As part of the increased security features in 12c, last login time is now stored in the USER$ table itself, in SPARE6 column. This is great information to know when a user last used the database.

Security related values in the USER$ table are [as existed in 11gR2]:

CTIME: Date & Time when user was created

PTIME: Date & Time when user password was last changed

LTIME: Date & Time when the user account was locked

LCOUNT: Number of failed login attempts

Added in Oracle Database 12c:

SPARE6: Last login time of the user.

The value from this column is what displayed when you invoke SQL*Plus:

$ sqlplus hr/hr

SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 9 23:34:32 2013

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Last Successful login time: Tue Jul 09 2013 23:34:22 -05:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>

I discussed option in SQL*Plus command line to hide the last login time on July 2.