Thursday, October 01, 2015

No timesten tab in sql developer ?

Following to config sql developer.
But no timesten tab found.

googled and realize needing to install timesclient first.


for timesten client installation

Program Folder: TimesTen 11.2.2 (32-bit)
Register TimesTen enviroment variables: Enabled
World-Writeable: Enabled
PL/SQL: Enabled
Java Version: JDK 6
Java Classpath: C:\TimesTen\tt1122_32\lib\ttjdbc6.jar

Destination Location: C:\TimesTen\tt1122_32\
Demo Data_Store Location: C:\Users\liqy\AppData\Roaming\TimesTen\DemoDataStore

Features Selected:
            TimesTen Data Manager
            TimesTen Documentation
            TimesTen Client
            TimesTen Quickstart

Finally , see the timesten tab in sql developer.

Next, I am a bit confused by the username and password needed. Here are information found from various source.


Specify a user name that is defined on the TimesTen server. When caching data from an Oracle database, the UID must match the UID on the Oracle database that is being cached in TimesTen.

In the Username field, enter the TimesTen user. If you use the TimesTen database to cache data from an Oracle database, enter the TimesTen cache manager user name. If you use the TimesTen database to load data from an Oracle database, enter the TimesTen user name that has SELECT privileges on the Oracle database tables that you want to load.


In the Password field, enter the password for the TimesTen user.

Specify the password that corresponds with the specified UID. When caching data from an Oracle database, PWD specifies the TimesTen password. You can specify the Oracle PWD in the connection string, if necessary.

As shown above, I can connect to timesten use either cacheadm or hr to connect to database, subject to purpose/function interested.

PLS-00201: identifier 'SYS.TT_STATS' must be declared in timesten

When using sql developer to create snapshot for timesten, following the demo

An error was encountered performing the requested operation:

TT8503: ORA-06550: line 1, column 28:
PLS-00201: identifier 'TT_STATS' must be declared

Vendor code 8503

orarac1poc:DG:/u01/app/timesten/TimesTen/tt1122/quickstart/sample_code/jdbc> ttisql -version
TimesTen Release

orarac1poc:DG:/u01/app/timesten/TimesTen/tt1122> ttisql

Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.

Command> connect  "dsn=cachedb1_1122;uid=cacheadm;oraclepwd=xxxxxx";
Enter password for 'cacheadm':
Connection successful: DSN=cachedb1_1122;UID=cacheadm;DataStore=/u01/app/timesten/TimesTen/tt1122                        /info/DemoDataStore/cachedb1_1122;DatabaseCharacterSet=WE8MSWIN1252;ConnectionCharacterSet=US7ASC                        II;DRIVER=/u01/app/timesten/TimesTen/tt1122/lib/;PermSize=40;TempSize=32;TypeMode=0;OracleNetServiceName=DG;
(Default setting AutoCommit=1)

-- Able to describe the procedure

Command> desc tt_stats;


      CAPTURE_LEVEL                   IN     VARCHAR2 DEFAULTED
      DESCRIPTION                     IN     VARCHAR2 DEFAULTED



Command> select * from dba_objects where object_name='TT_STATS';
< SYS, TT_STATS, , 316, , PACKAGE, 2015-09-21 15:08:22, 2015-09-21 15:08:22, 2015-09-21:15:08:22, VALID, N, N, N, 1, >
< SYS, TT_STATS, , 318, , PACKAGE BODY, 2015-09-21 15:08:22, 2015-09-21 15:08:22, 2015-09-21:15:08:22, VALID, N, N, N, 2, >
< PUBLIC, TT_STATS, , 317, , SYNONYM, 2015-09-21 15:08:22, 2015-09-21 15:08:22, 2015-09-21:15:08:22, VALID, N, N, N, 1, >
3 rows found.

Command> set serveroutput on;

Command> call sys.TT_STATS.SHOW_SNAPSHOTS;
 8503: ORA-06550: line 1, column 6:
PLS-00201: identifier 'SYS.TT_STATS' must be declared
 8503: ORA-06550: line 1, column 1:
PL/SQL: Statement ignored
The command failed.
Command> select * from dba_tab_privs where table_name='TT_STATS';
0 rows found.

The solution

Command> grant execute on tt_stats to cacheadm;

Command> select * from dba_tab_privs where table_name='TT_STATS';
1 row found.
Command> call sys.TT_STATS.SHOW_SNAPSHOTS;
ID     TimeStamp            Level     Description
-----  -------------------  --------  -----------
0 snapshots were found in current datastore

Verified in sql developer okay too.

Monday, September 28, 2015

running tiddlywiki on node.js in Ubuntu 14.04.3 LTS with existing tiddlers loaded

1. create a directory for tiddlywiki
mkdir tdwiki

2. Under this directory, initialize a notebook named "mywiki"

user:~/tdwiki$ tiddlywiki mywiki --init server
Copied edition 'server' to mywiki

After this command, we are supposed to a see sub-directory named "mywiki" created under the parent directory "tdwiki"

3. To load exting tiddlers in index_2015-9-23.html created by tiddlywiki desktop verion

3.1 --type the help on load command
user:~/tdwiki$ tiddlywiki --help load
Load tiddlers from 2.x.x TiddlyWiki files (.html), .tiddler, .tid, .json or other files

3.2 --actual loading

To load tiddlers from the exsiting html file.

tiddlywiki ./MyWiki --load my_encrypted_wiki.html

user:~/tdwiki$ tiddlywiki ./mywiki  --load index_2015-9-23.html
syncer-server: Dispatching 'save' task: $:/StoryList
FileSystem: Saved file /home/user/tdwiki/mywiki/tiddlers/$__StoryList.tid
syncer-server: Dispatching 'save' task: bf Operator
FileSystem: Saved file /home/user/tdwiki/mywiki/tiddlers/bf_Operator.tid
syncer-server: Dispatching 'save' task: BetaReleases
FileSystem: Saved file /home/user/tdwiki/mywiki/tiddlers/BetaReleases.tid
syncer-server: Dispatching 'save' task: before Operator (Examples)
FileSystem: Saved file /home/user/tdwiki/mywiki/tiddlers/before_Operator_(Examples).tid
syncer-server: Dispatching 'save' task: before Operator
FileSystem: Saved file /home/user/tdwiki/mywiki/tiddlers/before_Operator.tid

4. verify that many tiddlers are created under the "miwiki" subdirectory

5. finaly, start the tiddlywiki service for "mywiki" on port 8080 of server ip, with logon id & password

nohup /usr/local/bin/tiddlywiki /home/user/tdwiki/mywiki --server 8080 $:/core/save/all text/plain text/html user xxxxxxx  &

6. To permanent add it as sysv service in 14.04. I created the following  3 scripts for init.d service to start the service called "mywiki" automatically upon rebooting.


user:~/tdwiki$ cat

nohup /usr/local/bin/tiddlywiki /home/user/tdwiki/mywiki --server 8080 $:/core/save/all text/plain text/html user xxxxxxx   &

user:~/tdwiki$ cat

ps -fu user |grep mywiki |grep 8080 |awk '{ print $2 }' | xargs kill

#Note here the scipt name /etc/init.d/mywiki should not have the suffix ".sh"

user:~/tdwiki$ cat /etc/init.d/mywiki
#! /bin/sh
# Provides: daoqidao wiki
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: for daoqidao tiddlywiki service
# Description: This file starts and stops tiddlywiki server

case "$1" in
   su user -c /home/user/tdwiki/
   su user -c /home/user/tdwiki/
   sleep 1
   ps -fu user |grep mywiki |grep 8080
   su user -c /home/user/tdwiki/
   sleep 2
   su user -c /home/user/tdwiki/
   echo "Usage: mywiki {start|stop|restart}" >&2
   exit 3

7. If all goes well then register the script as an init script:

sudo update-rc.d mywiki defaults

8. Reboot the machine and make sure that Tomcat has started.


9. I also created a such service in one Ubuntu 15.04, which uses systemd instead to manage the service. The script is different.

user:~/tdwiki/ubuntu15.04$ cat /etc/tiddlywiki.conf
OPTS="$:/core/save/all text/plain text/html"

user:~/tdwiki/ubuntu15.04$ cat tiddlywiki.service

ExecStart=/usr/local/bin/tiddlywiki $WIKI --server $PORT $OPTS $USER $PWD $IP


10. move the file tiddlywiki.service to /etc/systemd/system and ran sudo systemctl enable tiddlywiki.service to create link scripts.

11. Restart server for verification

Friday, September 25, 2015

running tiddlywiki on windows as a service

Referenced below two links:

But they are not detai enough for me, so list down my steps after spending half an hour on the setup.

1. download node.js from and installed it.

2. now I have npm.exe to install tiddlywiki.

C:\Users\liqy>npm install -g tiddlywiki
C:\Users\liqy\AppData\Roaming\npm\tiddlywiki -> C:\Users\liqy\AppData\Roaming\npm\node_modules\tiddlywiki\tiddlywiki.js
tiddlywiki@5.1.9 C:\Users\liqy\AppData\Roaming\npm\node_modules\tiddlywiki

Note that tiddlywiki.js is installed under AppData sub-directory by default.


3. now initialize the notebook named "mywiki". The step should be followed, which same as on Linux platform.

Note that the directory for notebook "mywiki" should be empty.

C:\Users\liqy\AppData\Roaming\npm\node_modules\tiddlywiki>node .\tiddlywiki.js "
D:\mydoc\pp\sync\mywiki" --init server
Error: Wiki folder is not empty

--this is due to I put a local copy of tiddlywik html file there.

--after remove it , and try again

C:\Users\liqy\AppData\Roaming\npm\node_modules\tiddlywiki>node .\tiddlywiki.js "
D:\mydoc\pp\sync\mywiki" --init server
Copied edition 'server' to D:\mydoc\pp\sync\mywiki

3.2 If not, I hit below error when I try to start the service

C:\Users\liqy\AppData\Roaming\npm\node_modules\tiddlywiki>node .\tiddlywiki.js "
D:\mydoc\pp\sync\mywiki" --server 88 --verbose --rendertiddler $:/core/save/all
mywiki.html text/plain
Warning: Wiki folder 'D:\mydoc\pp\sync\mywiki' does not exist or is missing a ti file
Serving on
(press ctrl-C to exit)

        if($tw.boot.wikiInfo.plugins.indexOf("tiddlywiki/tiddlyweb") === -1 || $
tw.boot.wikiInfo.plugins.indexOf("tiddlywiki/filesystem") === -1) {
TypeError: Cannot read property 'plugins' of null
    at Command.execute ($:/core/modules/commands/server.js:304:22)
    at Commander.executeNextCommand ($:/core/modules/commander.js:82:14)
    at Commander.execute ($:/core/modules/commander.js:46:7)
    at Object.exports.startup ($:/core/modules/startup/commands.js:34:12)
    at $tw.boot.executeNextStartupTask (C:\Users\liqy\AppData\Roaming\npm\node_m
    at $tw.boot.executeNextStartupTask (C:\Users\liqy\AppData\Roaming\npm\node_m
    at $tw.boot.executeNextStartupTask (C:\Users\liqy\AppData\Roaming\npm\node_m
    at $tw.boot.executeNextStartupTask (C:\Users\liqy\AppData\Roaming\npm\node_m
    at $tw.boot.executeNextStartupTask (C:\Users\liqy\AppData\Roaming\npm\node_m
    at $tw.boot.startup (C:\Users\liqy\AppData\Roaming\npm\node_modules\tiddlywi

4.  Try to start the service to see if any error, before adding as a service

The command
node .\tiddlywiki.js "D:\mydoc\pp\sync\mywiki" --server 88 --verbose --rendertiddler $:/core/save/all mywiki.html text/plain

This is to start the tiddly service listening on localhost port 88 , for notebook named "mywiki"

C:\Users\liqy\AppData\Roaming\npm\node_modules\tiddlywiki>node .\tiddlywiki.js "
D:\mydoc\pp\sync\mywiki" --server 88 --verbose --rendertiddler $:/core/save/all
mywiki.html text/plain
Serving on
(press ctrl-C to exit)
Boot log:
  Startup task: load-modules
  Startup task: info after: load-modules before: startup
  Startup task: startup after: load-modules
  Startup task: story after: startup
  Startup task: commands platforms: node after: story
Executing command: rendertiddler $:/core/save/all mywiki.html text/plain
syncer-server: Dispatching 'save' task: $:/StoryList
FileSystem: Saved file D:\mydoc\pp\sync\mywiki\tiddlers\$__StoryList.tid
syncer-server: Dispatching 'save' task: $:/StoryList
FileSystem: Saved file D:\mydoc\pp\sync\mywiki\tiddlers\$__StoryList.tid

5. Confirmed no issue with method, pressed CTRL+C to stop it , and invoke the nssm installed to add service to the windows registry.

D:\tools\nssm\win32>nssm install tiddlywiki
Service "tiddlywiki" installed successfully!

The startup directory in my case is:


The arguments in my case is :

.\tiddlywiki.js "D:\mydoc\pp\sync\mywiki" --server 88 --verbose --rendertiddler $:/core/save/all mywiki.html text/plain

By the way, command to edit the tiddlywiki is
D:\tools\nssm\win32>nssm edit  tiddlywiki

6.Verify that "tiddlywiki" service is added in "control panel/services"

7. Finally I see it in my web browser with address "http://localhost:88"

8. If there is existing tiddlers in a single html file, I believe tiddlywiki upload command can help to migrate existing tiddlers.

Monday, September 21, 2015

Migrate Centos 5.11 in my dual boot system

2nd round to migrate this CentOS after I bought a 3TB HDD, on top of one 120GB SSD, one 1TB and one 2TB HDD.  Now I want to decommission the 1TB HDD to save energy.

First round the CentOS5 was migrated to the new HDD 3TB,but failed to boot even I re-generate its UUID. After one week's think and research, finally I found that my motherboard doesn't have UEFI support.  The error message is like below.

So the solution is to migrate it to the 2TB HDD.  The steps are simple.

1. create new partition for / and swap.
2. Use gparted to copy the partition from 1TB HDD to the 2TB HDD partition /dev/sdb2 as shown below.

Before the copy, I gave beautiful label to the partition /dev/sdb2 (CentOS5_Root) and /dev/dba5 (CentOS5_Swap). In fact, these two labels will create new problem for me.

3. regenerate UUID for /dev/sdb2

4. I use GURB2 of ubuntu 15.04 as boot loader installed in SSD, so after copy centos5 I don't need to take care of the grub on this disk /dev/sdb .  Was a doubt in my mind.  To recognize the centos5 in /dev/sdb2, just issue sudo update-grub2
in Ubuntu, after which I see the /dev/sdb2 entry in the boot menu.

However, because I changed the two partition's LABEL and I didn't remember Volume Group was created in CentOS, caused I hit subsequent errors and spent me another two hours in the midnight.

mount: could not find filesystem '/dev/root'

Notice here not able to find root location /dev/root. As original "LABEL=/" is updated to Ubuntu grub.cfg. This seems Ubuntu grub doesn't know the LABEL being created in gparted.

After I updated root to use "LABEL=/CentOS5_Root", the booting process moved one step further.

This time, I learned faster and revert the two partitions' LABEL to original value.  And finally it brings me the clean GUI.


BIOS ACHI screenshots

when the SATA contorl mode =IDE

2 HDD, 1 SSD and  1 DVD ROM

After change the mode to ACHI

Notice the sequence changed, luckily I have already convert my dual boot system not to use the standard partition name, instead , most of my mount points are using by-id.

Sunday, September 20, 2015

few issues with Centos 7.1 installation and BIOS upgrade

1. failed to boot from USB for installation.

followed dd command in to create a bootable thumdrive without error, but the USB thumdrive is not detected in the BIOS.  My motherboard is GA-P55A-UD3. So the easier way for me is to burn the ISO to a DVD disc.

[ Added Later on ] during BIOS upgrade from version F10 to F11 , I found out the USB thumdrive was not detected due to the extendible USB cable was plugged into USB3.0 port. When I changed to USB2.0 port, my thumdrive is back.

2. I have two hard disks : 2TB and 3TB. Attempted to install on the newly bought 3TB hard disk. Remembered hit kind of internal error.  So I decided to install it on the 2TB hard disk.

3. This time round, I choose the software set GNOME-Desktop instead of default minimal installation, which gave me no network, no GUI. That was troublesome.

4. When I install the centos 7.1, the SATA control mode is ACHI. I had Ubuntu 15.04 and CentOS5.11 installed in this computer.  The installation finally completed successfuly.  And luckily, it didn't touch the GURB2 bootloader of my existing Ubuntu's.

5. However when I boot centos7.1, it panic at "no floppy controller found" and failed to show the GUI. I had no floppy driver and it is shown None in BIOS.

 6. Luckily, when I change the SATA controller mode to IDE. The centos7.1 finally boots up. That's is the workaround for the time being.  Ubuntu 15.04 will be still the main workstation.

[ Added Later on ] After BIOS upgrade from version F10 to F11, this issue is gone too. Worth it the upgrade.  I can stay with ACHI finally.

By upgrading the BIOS, I also gained the stability of Memory, to let my 4x4GB pieces of memory to run at 1600Mhz, and overclocking the CPU from 2.8Ghz to higher frequency @ 3.2GHz.  In Ubuntu, tools like hddtemp, sensors, psensor can tell the temperature inside.
cat /proc/cpuinfo helps to tell CPU speed.

This is article introduce rufus and helped to create a bootable MS-DOS in USB drive. In fact, I don't need it. It only after BIOS upgrade, I found there is Q-flash can do the upgrade without needing to boot into any OS.