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.


Sunday, February 07, 2016

XServer on Windows 10

Recently upgrade to 64 bits windows 10.

Tried Cywin startxwin but not working, which was working on my 32bits windows7.

Luckily, MobaXterm still works well.

The other software in my mind is XMing. The installation is smooth. One thing to note is that I need to choose "No access control" as shown below (after click the XLaunch), which I guess this is the same effect to command "xhost + &"  of startxwin.







For MobaXterm, for those X11 forwarding is disabled on the SSH server end, we'll  need to export DISPLAY explicitly, After that, it works perfect.




Tuesday, February 02, 2016

investigating Delphix job timeout issue with inner tools




Recently we have Delphix jobs can't  complete within scheduled windows. even I separate them in more windows. 

The above three pages are handy for investigation. They tell me which databases are using the most bandwidth. From them drill down further, I identified problematic application/jobs, which should not be there. I even found  a problem in production, which does full table scan to a moderate size table. This is make the saying true that fast HW may help to hide the performance problem. 

As we use NFS to present storage to database, the network bandwidth becomes expensive for our 1GbE network interface , running on VMWare. 

From this case, we learn that for best practice, the recommend network is 10GbE


Best practices to improve network throughput include:
Use 10 Gigabit Ethernet (10GbE)
Use a dedicated storage network

And it is worth to read the Delphix performance tuning document again. 

Delphix cron

Delphix cron used by replication job is Quartz CronTrigger scheduler


And below is its format.


Format

A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field. The fields are as follows as I copy it from the site. But I think there error with 5th & 6th position , which should swap the "Day of week" and "Year"

Field NameMandatoryAllowed ValuesAllowed Special Characters
SecondsYES0-59, - * /
MinutesYES0-59, - * /
HoursYES0-23, - * /
Day of monthYES1-31, - * ? / L W
MonthYES1-12 or JAN-DEC, - * /
Day of weekYES1-7 or SUN-SAT, - * ? / L #
YearNOempty, 1970-2099, - * /

Monday, February 01, 2016

unto_retention=0

It is auto tuned by Oracle, if it is the retention is set to 0.

https://community.oracle.com/thread/833573?tstart=0