Friday, April 15, 2016

12c multitenant database backupset location

Organize  a chart based on below full list of backup information.



Note that if BACKUP OPTIMIZATION is turned on , the seeds files then are backed up once only.


Appendix




RMAN> list backupset;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
133     Full    4.34M      DISK        00:00:02     2016-APR-12 10:06:04
        BP Key: 133   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp0bls_.bkp
  List of Datafiles in backup set 133
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  5       Full 4542086    2016-APR-12 10:06:02 /rman001/oradata/RCATT/undotbs01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
134     Full    189.24M    DISK        00:00:57     2016-APR-12 10:07:02
        BP Key: 134   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp0ftk_.bkp
  List of Datafiles in backup set 134
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  1       Full 4542088    2016-APR-12 10:06:05 /rman001/oradata/RCATT/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
135     Full    200.26M    DISK        00:01:08     2016-APR-12 10:07:10
        BP Key: 135   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp0blb_.bkp
  List of Datafiles in backup set 135
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  3       Full 4542084    2016-APR-12 10:06:02 /rman001/oradata/RCATT/sysaux01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
136     Full    102.60M    DISK        00:00:34     2016-APR-12 10:07:45
        BP Key: 136   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D960D0F8745635EE05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp2hj0_.bkp
  List of Datafiles in backup set 136
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  4       Full 2043027    2016-MAR-09 14:26:29 /rman001/oradata/RCATT/pdbseed/sysaux01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
137     Full    110.38M    DISK        00:00:37     2016-APR-12 10:07:48
        BP Key: 137   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp2h52_.bkp
  List of Datafiles in backup set 137
  Container ID: 3, PDB Name: RCATPDB1
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  8       Full 4542112    2016-APR-12 10:07:11 /rman001/oradata/RCATT/RCATPDB1/sysaux01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
138     Full    47.09M     DISK        00:00:16     2016-APR-12 10:08:02
        BP Key: 138   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp3lw2_.bkp
  List of Datafiles in backup set 138
  Container ID: 3, PDB Name: RCATPDB1
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  7       Full 4542130    2016-APR-12 10:07:46 /rman001/oradata/RCATT/RCATPDB1/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
139     Full    43.30M     DISK        00:00:14     2016-APR-12 10:08:04
        BP Key: 139   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D960D0F8745635EE05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp3p2s_.bkp
  List of Datafiles in backup set 139
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  2       Full 2043027    2016-MAR-09 14:26:29 /rman001/oradata/RCATT/pdbseed/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
140     Full    1.06M      DISK        00:00:00     2016-APR-12 10:08:05
        BP Key: 140   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp45tc_.bkp
  List of Datafiles in backup set 140
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  6       Full 4542138    2016-APR-12 10:08:05 /rman001/oradata/RCATT/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
141     Full    9.34M      DISK        00:00:03     2016-APR-12 10:08:08
        BP Key: 141   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100602
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T100602_cjrp45cf_.bkp
  List of Datafiles in backup set 141
  Container ID: 3, PDB Name: RCATPDB1
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  9       Full 4542137    2016-APR-12 10:08:05 /rman001/oradata/RCATT/RCATPDB1/RCATPDB1_users01.dbf

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ --------------------
143     2.50K      DISK        00:00:00     2016-APR-12 10:08:11
        BP Key: 143   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100811
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_annnn_TAG20160412T100811_cjrp4cmh_.bkp

  List of Archived Logs in backup set 143
  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time
  ---- ------- ---------- -------------------- ---------- ---------
  1    442     4542164    2016-APR-12 10:08:10 4542172    2016-APR-12 10:08:11

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ --------------------
144     1.70M      DISK        00:00:00     2016-APR-12 10:08:11
        BP Key: 144   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T100811
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_annnn_TAG20160412T100811_cjrp4cl8_.bkp

  List of Archived Logs in backup set 144
  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time
  ---- ------- ---------- -------------------- ---------- ---------
  1    441     4541226    2016-APR-12 09:56:17 4542164    2016-APR-12 10:08:10

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
145     Full    17.30M     DISK        00:00:01     2016-APR-12 10:08:13
        BP Key: 145   Status: AVAILABLE  Compressed: NO  Tag: TAG20160412T100812
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/autobackup/2016_04_12/o1_mf_s_908964492_cjrp4f6j_.bkp
  SPFILE Included: Modification time: 2016-APR-09 07:07:00
  SPFILE db_unique_name: RCATT
  Control File Included: Ckp SCN: 4542190      Ckp time: 2016-APR-12 10:08:12

change fast recovery area location, no impact to existing backup

The database RCATT's FRA was set to /rman001/oradata/fast_recovery_area/, now I want to change to another directory, i.e. /dbfra/wiadb01d. Wondering if the recovery catalog still knows it.

The answer is no impact based on my below test.

The old FRA location

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
172     Full    2.14M      DISK        00:00:01     2016-APR-12 11:30:05
        BP Key: 172   Status: AVAILABLE  Compressed: YES  Tag: TAG20160412T113004
        Piece Name: /rman001/oradata/fast_recovery_area/RCATT/backupset/2016_04_12/o1_mf_nnndf_TAG20160412T113004_cjrtxx0n_.bkp
  List of Datafiles in backup set 172
  File LV Type Ckp SCN    Ckp Time             Name
  ---- -- ---- ---------- -------------------- ----
  5       Full 4550801    2016-APR-12 11:30:04 /rman001/oradata/RCATT/undotbs01.dbf



Change to new FRA location

--change FRA location , and backup pluggable database rcatpdb1


RCATT:testdb01:/software/orarman/product/12.1.0/dbs> sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Apr 13 17:44:32 2016

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


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

SQL> alter system set db_recovery_file_dest='/dbfra/testdb01' scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size                  2914560 bytes
Variable Size             922748672 bytes
Database Buffers          671088640 bytes
Redo Buffers               13860864 bytes
Database mounted.
Database opened.
SQL> alter pluggable database rcatpdb1 open;

Pluggable database altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
RCATT:testdb01:/software/orarman/product/12.1.0/dbs> rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Apr 13 17:46:15 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RCATT (DBID=4101766741)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name RCATT are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 7;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/software/orarman/product/12.1.0/dbs/snapcf_RCATT.f'; # default

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;

old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully stored

RMAN> backup pluggable database rcatpdb1;

Starting backup at 2016-APR-13 17:47:29
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=422 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=443 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00008 name=/rman001/oradata/RCATT/RCATPDB1/sysaux01.dbf
channel ORA_DISK_1: starting piece 1 at 2016-APR-13 17:47:31
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00007 name=/rman001/oradata/RCATT/RCATPDB1/system01.dbf
input datafile file number=00009 name=/rman001/oradata/RCATT/RCATPDB1/RCATPDB1_users01.dbf
channel ORA_DISK_2: starting piece 1 at 2016-APR-13 17:47:31
channel ORA_DISK_2: finished piece 1 at 2016-APR-13 17:47:56
piece handle=/dbfra/testdb01/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_13/o1_mf_nnndf_TAG20160413T174730_                                                       cjw5fm7m_.bkp tag=TAG20160413T174730 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: finished piece 1 at 2016-APR-13 17:48:16
piece handle=/dbfra/testdb01/RCATT/2D98C99BF6722388E05400144FF8A527/backupset/2016_04_13/o1_mf_nnndf_TAG20160413T174730_                                                       cjw5fm5g_.bkp tag=TAG20160413T174730 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 2016-APR-13 17:48:16

Starting Control File and SPFILE Autobackup at 2016-APR-13 17:48:16
piece handle=/dbfra/testdb01/RCATT/autobackup/2016_04_13/o1_mf_s_909078496_cjw5h0v1_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2016-APR-13 17:48:17



Note that "2D98C99BF6722388E05400144FF8A527" (the funny directory name) is meant for pluggable database's backuppiece.

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time      #Pieces #Copies Compressed Tag
------- -- -- - ----------- -------------------- ------- ------- ---------- ---
146     B  F  A DISK        2016-APR-12 11:20:05 1       1       YES        TAG20160412T112004
147     B  F  A DISK        2016-APR-12 11:21:01 1       1       YES        TAG20160412T112004
148     B  F  A DISK        2016-APR-12 11:21:11 1       1       YES        TAG20160412T112004
149     B  F  A DISK        2016-APR-12 11:21:46 1       1       YES        TAG20160412T112004
150     B  F  A DISK        2016-APR-12 11:21:48 1       1       YES        TAG20160412T112004
151     B  F  A DISK        2016-APR-12 11:22:03 1       1       YES        TAG20160412T112004
152     B  F  A DISK        2016-APR-12 11:22:03 1       1       YES        TAG20160412T112004
153     B  F  A DISK        2016-APR-12 11:22:04 1       1       YES        TAG20160412T112004
154     B  F  A DISK        2016-APR-12 11:22:07 1       1       YES        TAG20160412T112004
156     B  A  A DISK        2016-APR-12 11:22:11 1       1       YES        TAG20160412T112210
157     B  A  A DISK        2016-APR-12 11:22:11 1       1       YES        TAG20160412T112210
....
234     B  A  A DISK        2016-APR-12 19:02:25 1       1       YES        TAG20160412T190223
235     B  A  A DISK        2016-APR-12 19:02:27 1       1       YES        TAG20160412T190223
236     B  A  A DISK        2016-APR-12 19:02:27 1       1       YES        TAG20160412T190223
237     B  F  A DISK        2016-APR-12 19:02:28 1       1       NO         TAG20160412T190227
238     B  F  A DISK        2016-APR-13 17:47:49 1       1       YES        TAG20160413T174730
239     B  F  A DISK        2016-APR-13 17:48:08 1       1       YES        TAG20160413T174730
240     B  F  A DISK        2016-APR-13 17:48:17 1       1       NO         TAG20160413T174816


Tuesday, April 12, 2016

"list backup" command can not be in a RUN command block

Ha, just learned.

RCATT:/software/orarman/ops/exec> cat t.rman
run {
list backup summary;
}


RMAN> @t.rman

RMAN> run {
2> list
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "list": expecting one of: "advise, allocate, alter, analyze, associate statistics, audit, backup, begin, @, call, catalog, change, comment, commit, configure, convert, copy, create, crosscheck, declare, delete, delete from, describe, describe catalog, disassociate statistics, drop, drop database, duplicate, execute, explain plan, flashback, flashback table, grant, host, insert, lock, merge, mount, noaudit, open, purge, recover, release, rename, repair, report, restore, resync, revoke, rollback, savepoint, select, send, set, set constraint, set role, set transaction, show, shutdown, sql, startup, switch, transport, "
RMAN-01007: at line 2 column 1 file: t.rman

RMAN> exit


Recovery Manager complete.



Remove it out of {}



RCATT:/software/orarman/ops/exec> cat t.rman
list backup summary;

RCATT:/software/orarman/ops/exec> rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Apr 12 15:27:52 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RCATT (DBID=4101766741)

RMAN> @t.rman

RMAN> list backup summary;
using target database control file instead of recovery catalog

List of Backups
===============
Key     TY LV S Device Type Completion Time      #Pieces #Copies Compressed Tag
------- -- -- - ----------- -------------------- ------- ------- ---------- ---
133     B  F  A DISK        2016-APR-12 10:06:04 1       1       YES        TAG20160412T100602
134     B  F  A DISK        2016-APR-12 10:07:02 1       1       YES        TAG20160412T100602
135     B  F  A DISK        2016-APR-12 10:07:10 1       1       YES        TAG20160412T100602
136     B  F  A DISK        2016-APR-12 10:07:45 1       1       YES        TAG20160412T100602
137     B  F  A DISK        2016-APR-12 10:07:48 1       1       YES        TAG20160412T100602
138     B  F  A DISK        2016-APR-12 10:08:02 1       1       YES        TAG20160412T100602


rman backup set and backup piece concepts

backup piece

The physical file format used to store RMAN backup sets

backup set

A backup of one or more datafiles, control files, SPFILEs and archived redo log files. Each backup set consists of one or more binary files called backup pieces. Backup pieces are written in a proprietary format that can only be created or restored by RMAN.

Backup sets are produced by the RMAN BACKUP command. A backup set usually consists of only one backup piece. RMAN divides the contents of a backup set among multiple backup pieces only if you limit the backup piece size using the MAXPIECESIZE option of the ALLOCATE CHANNEL.

Backup Sets and Backup Pieces

RMAN can store backup data in a logical structure called a backup set, which is the smallest unit of an RMAN backup. A backup set contains the data from one or more datafiles, archived redo logs, control files, or server parameter file. Backup sets, which are only created and accessed through RMAN, are the only form in which RMAN can write backups to media managers such as tape drives and tape libraries.
A backup set contains one or more binary files in an RMAN-specific format. Each of these files is known as a backup piece. A backup set can contain multiple datafiles. For example, you can back up 10 datafiles into a single backup set consisting of a single backup piece. In this case, RMAN creates one backup piece as output. The backup set contains only this backup piece.
If you specify the SECTION SIZE parameter on the BACKUP command, then RMAN produces a multisection backup. This is a backup of a single large file, produced by multiple channels in parallel, each of which produces one backup piece. Each backup piece contains one file section of the file being backed up.
For non-multisection backups, RMAN only records backup sets in the repository that complete successfully. There is no such thing as a partial backup set. This differs from an unsuccessful multisection backup, where it is possible for RMAN metadata to contain a record for a partial backup set. In the latter case, you must use the DELETE command to delete the partial backup set.

Monday, April 11, 2016

two RMAN tips learned when using disk

1. to delete obsolete command, I have to change the command worked for tape device from

delete noprompt obsolte;

to

delete noprompt obsolte to device type disk;

2.  When using FRA, I can't use FORMAT option as discussed here, irregardless I was happy with the conversion for device type tape  BACKUP FULL FILESPERSET 1 FORMAT 'DB%I.%d_%N_%U' DATABASE;.   Otherwise, the backupset is written to $ORACLE_HOME/dbs instead FRA location.

Saturday, March 19, 2016

ORA-12505 TNS:listener does not currently know of SID after 12c DBCA

[The problem]

Created a portable database RCATPDB1 and a contained database RCATT using 12.1.0.2 dbca, but not able to connect to it through LISTENER, however tnsping returns okay.

$ tnsping RCATT

TNS Ping Utility for Solaris: Version 12.1.0.2.0 - Production on 11-MAR-2016 14:11:07

Copyright (c) 1997, 2014, Oracle.  All rights reserved.

Used parameter files:
/software/orarman/product/12.1.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testdbdev)(PORT = 1555)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RCATT)))
OK (10 msec)


$ sqlplus system/dsafdsa@RCATPDB1

SQL*Plus: Release 12.1.0.2.0 Production on Fri Mar 11 16:35:34 2016

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

ERROR:
ORA-12505: TNS:listener does not currently know of SID given in connect
descriptor

[Troubleshooting]
Googled and find this is the exact same problem as mine. 

[Solution]

Then the solution is define local_listener in pfile for dynamic registration.

Define the listener in tnsnames.ora

LISTENER_RCATT =
  (ADDRESS = (PROTOCOL = TCP)(HOST = testdbdev)(PORT = 1555))

RCATT =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = testdbdev)(PORT = 1555))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RCATT)
    )
  )

RCATPDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = testdbdev)(PORT = 1555))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RCATPDB1)
    )


SQL> show parameter local_listen

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string



SQL> alter system set local_listener='RCATT' scope=both;

System altered.


SQL> alter system register;

System altered.


$ lsnrctl service LISTENER_RCATT

LSNRCTL for Solaris: Version 12.1.0.2.0 - Production on 11-MAR-2016 16:44:13

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testdbdev)(PORT=1555)))
Services Summary...
Service "RCATT" has 1 instance(s).
  Instance "RCATT", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "RCATTXDB" has 1 instance(s).
  Instance "RCATT", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER
         (ADDRESS=(PROTOCOL=tcp)(HOST=testdbdev)(PORT=41100))
Service "rcatpdb1" has 1 instance(s).
  Instance "RCATT", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
The command completed successfully



$ sqlplus  system@RCATT

SQL*Plus: Release 12.1.0.2.0 Production on Fri Mar 11 16:46:51 2016

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

Last Successful login time: Wed Mar 09 2016 12:01:10 +08:00

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

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
$ sqlplus  system@RCATPDB1

SQL*Plus: Release 12.1.0.2.0 Production on Fri Mar 11 16:46:57 2016

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

Last Successful login time: Fri Mar 11 2016 16:46:51 +08:00

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

SQL> EXIT
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
$ tnsping RCATT

TNS Ping Utility for Solaris: Version 12.1.0.2.0 - Production on 11-MAR-2016 16:47:04

Copyright (c) 1997, 2014, Oracle.  All rights reserved.

Used parameter files:
/software/orarman/product/12.1.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testdbdev)(PORT = 1555)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RCATT)))
OK (10 msec)
$ tnsping RCATPDB1

TNS Ping Utility for Solaris: Version 12.1.0.2.0 - Production on 11-MAR-2016 16:47:12

Copyright (c) 1997, 2014, Oracle.  All rights reserved.

Used parameter files:
/software/orarman/product/12.1.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testdbdev)(PORT = 1555)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RCATPDB1)))
OK (10 msec)

Cygwin 64 in windows 10 always stopped with Ctrl-C when select text with mouse

Recently upgrade to windows 10 (64bit), and notice Cygwin 64 terminal mintty always stopped with Ctrl-C when select text with mouse, be it in shell command line, or sqlplus/rman comand line, cause troublesome of copy/paste function.

Initially I thought it is problem with mintty, until one day I can't bear it and google it. The article 

Cygwin alway's interpreted with Ctrl-C saved my cygwin

Finally I found I have a startup dictionary called YouDao. No more Ctrl-C for mouse selection, after I disable all functions of the dictionary's mouse selection functions.