Showing posts with label TimesTen. Show all posts
Showing posts with label TimesTen. Show all posts

Friday, September 25, 2009

Read Oracle SQL Developer Release 2.1

Oracle SQL Developer 2.1 Early Adopter is now available. (24th September '09 ).

Read about New Features.
By the way I'm so happy, when I used it with Timesten 11g. I saw packages/procedures/functions.

Nice ;)

Thursday, September 17, 2009

Test to use FreeRadius with TimesTen (OCI)

On TimesTen 11.2.1, TimesTen OCI depends on the Oracle client library and the TimesTen ODBC libraries. TimesTen OCI support enables you to run many existing OCI applications with TimesTen in direct mode or client/server mode.

TimesTen Release 11.2.1 OCI is based on Oracle Release 11.1.0.7 OCI and supports the contemporary OCI 8 style APIs.

tns_entry = (DESCRIPTION =(CONNECT_DATA =(SERVICE_NAME = dsn)(SERVER = timesten_direct | timesten_client)))

So, I want to compile freeradius to use OCI connect to TimesTen(testing):

- Setup TimesTen on radius Server by using "Client/Server and Data Manager" components.
# tar xvf timesten112120.linux8664.tar.gz
# cd linux8664
# ./setup.sh

[...]
Please choose an instance name for this installation? [ tt1121 ]
Instance name will be 'tt1121'.
Is this correct? [ yes ] y

Of the three components:

[1] Client/Server and Data Manager
[2] Data Manager Only
[3] Client Only

Which would you like to install? [ 1 ] 1
Where would you like to install the tt1121 instance of TimesTen? [ /opt ] /oracle
Installing into /oracle/TimesTen/tt1121 ...
Creating /oracle/TimesTen/tt1121 ...
Uncompressing ...
[...]
I need library only, so stop TimesTen daemon:
# /oracle/TimesTen/tt1121/startup/tt_tt1121 stop
Stopping TimesTen Daemon : [ OK ]
- Install freeradius
# cd SRC
# tar zxf freeradius-server-2.1.7.tar.gz
# cd freeradius-server-2.1.7
# ./configure && make && make install
I installed freeradius, but no driver. So build driver by using "rlm_sql_oracle"
# cd src/modules/rlm_sql/drivers/rlm_sql_oracle/
# vi Makefile
--- Begin Makefile ---

include ../../../../../Make.inc

TARGET = rlm_sql_oracle
SRCS = sql_oracle.c
INSTDIR = /oracle/TimesTen/tt1121
COMMDIR = $(INSTDIR)/quickstart/sample_code/common
TTORACLE_HOME = $(INSTDIR)/ttoracle_home/instantclient_11_1
OCIINCS = $(TTORACLE_HOME)/sdk/include
CC = gcc
PLATCFLAGS = -Os -finline-functions
LDFLAGS =
EXTRALIBS = -lpthread -lm -lrt
INCS = -I$(OCIINCS) -I$(INSTDIR)/include -I$(COMMDIR)
RLM_SQL_CFLAGS = $(INCLTDL) $(PLATCFLAGS) $(INCS)
TTLINK = -L$(INSTDIR)/lib -L$(TTORACLE_HOME) -Wl,-rpath,$(INSTDIR)/lib,-rpath,$(TTORACLE_HOME)
RLM_SQL_LIBS = $(TTLINK) -lclntsh $(EXTRALIBS)

include ../rules.mak

--- End Makefile ---
# make

SRC/freeradius-server-2.1.7/libtool --mode=compile gcc -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I../.. -ISRC/freeradius-server-2.1.7/src/ -ISRC/freeradius-server-2.1.7/libltdl -Os -finline-functions -I/oracle/TimesTen/tt1121/ttoracle_home/instantclient_11_1/sdk/include -I/oracle/TimesTen/tt1121/include -I/oracle/TimesTen/tt1121/quickstart/sample_code/common -c sql_oracle.c
mkdir .libs
gcc -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I../.. -ISRC/freeradius-server-2.1.7/src/ -ISRC/freeradius-server-2.1.7/libltdl -Os -finline-functions -I/oracle/TimesTen/tt1121/ttoracle_home/instantclient_11_1/sdk/include -I/oracle/TimesTen/tt1121/include -I/oracle/TimesTen/tt1121/quickstart/sample_code/common -c sql_oracle.c -fPIC -DPIC -o .libs/sql_oracle.o
[...]
gcc -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I../.. -ISRC/freeradius-server-2.1.7/src/ -ISRC/freeradius-server-2.1.7/libltdl -Os -finline-functions -I/oracle/TimesTen/tt1121/ttoracle_home/instantclient_11_1/sdk/include -I/oracle/TimesTen/tt1121/include -I/oracle/TimesTen/tt1121/quickstart/sample_code/common -c sql_oracle.c -o sql_oracle.o >/dev/null 2>&1
SRC/freeradius-server-2.1.7/libtool --mode=link gcc -release 2.1.7 \
-module -export-dynamic -o rlm_sql_oracle.la \
-rpath /usr/local/lib sql_oracle.lo -L/oracle/TimesTen/tt1121/lib -L/oracle/TimesTen/tt1121/ttoracle_home/instantclient_11_1 -Wl,-rpath,/oracle/TimesTen/tt1121/lib,-rpath,/oracle/TimesTen/tt1121/ttoracle_home/instantclient_11_1 -lclntsh -lpthread -lm -lrt
gcc -shared .libs/sql_oracle.o -L/oracle/TimesTen/tt1121/lib -L/oracle/TimesTen/tt1121/ttoracle_home/instantclient_11_1 -lclntsh -lpthread -lm -lrt -Wl,-rpath -Wl,/oracle/TimesTen/tt1121/lib -Wl,-rpath -Wl,/oracle/TimesTen/tt1121/ttoracle_home/instantclient_11_1 -Wl,-soname -Wl,rlm_sql_oracle-2.1.7.so -o .libs/rlm_sql_oracle-2.1.7.so
(cd .libs && rm -f rlm_sql_oracle.so && ln -s rlm_sql_oracle-2.1.7.so rlm_sql_oracle.so)
ar cru .libs/rlm_sql_oracle.a sql_oracle.o
ranlib .libs/rlm_sql_oracle.a
creating rlm_sql_oracle.la
(cd .libs && rm -f rlm_sql_oracle.la && ln -s ../rlm_sql_oracle.la rlm_sql_orac

# make install
# ls -l /usr/local/lib | grep oracle
lrwxrwxrwx 1 root root 17 Sep 17 15:57 rlm_sql_oracle-2.1.7.la -> rlm_sql_oracle.la
-rwxr-xr-x 1 root root 27880 Sep 17 15:57 rlm_sql_oracle-2.1.7.so
-rw-r--r-- 1 root root 32296 Sep 17 15:57 rlm_sql_oracle.a
-rwxr-xr-x 1 root root 967 Sep 17 15:57 rlm_sql_oracle.la
lrwxrwxrwx 1 root root 23 Sep 17 15:57 rlm_sql_oracle.so -> rlm_sql_oracle-2.1.7.so
- Configure freeradius to use "rlm_sql_oracle"
# cd /usr/local/etc/raddb
# vi radiusd.conf
Uncomment in radiusd.conf file:
[...]
$INCLUDE sql.conf
[...]
Add "sql" in radiusd.conf file:
[...]
instantiate {

sql
}
[...]
- Modify "sql.conf" to connect TimesTen database
# vi sql.conf
In sqlconf file:

database = "oracle"
login = "radius"
password = "password"
radius_db = "(DESCRIPTION=(CONNECT_DATA = (SERVICE_NAME = db01CS)(SERVER = timesten_client)))"

- Modify odbc in /etc/odbc.ini file.
# vi /etc/odbc.ini
In odbc.ini file:

[db01CS]
TTC_SERVER=timesten_server
TTC_SERVER_DSN=db01

- Test to start freeradius
# radiusd -X

[...]
rlm_sql (sql): Driver rlm_sql_oracle (module rlm_sql_oracle) loaded and linked
rlm_sql (sql): Attempting to connect to radius@localhost:/(DESCRIPTION=(CONNECT_DATA = (SERVICE_NAME = db01CS)(SERVER = timesten_client)))
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_oracle #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql (sql): starting 1
rlm_sql (sql): Attempting to connect rlm_sql_oracle #1
rlm_sql (sql): Connected new DB handle, #1
rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_oracle #2
rlm_sql (sql): Connected new DB handle, #2
rlm_sql (sql): starting 3
rlm_sql (sql): Attempting to connect rlm_sql_oracle #3
rlm_sql (sql): Connected new DB handle, #3
rlm_sql (sql): starting 4
rlm_sql (sql): Attempting to connect rlm_sql_oracle #4
rlm_sql (sql): Connected new DB handle, #4
}
[...]
A freeradius connected to TimesTen server.

Wednesday, July 29, 2009

play install TimesTen 11.2.1.2.0


I'd like to know How I install/setup it, it differ from old versions, doesn't it?

I downloaded and started Install ("oracle" user):
$ ls timesten112120.linux8664.tar.gz
timesten112120.linux8664.tar.gz

$ tar zxvf timesten112120.linux8664.tar.gz
linux8664/
linux8664/doc/
linux8664/doc/doc.zip
linux8664/3rdparty/
linux8664/3rdparty/jms-1_1-fr-apidocs.tar.bz2
linux8664/3rdparty/ant-1.6.2-bin.tar.bz2
linux8664/behaviorchanges.txt
linux8664/setup.sh
linux8664/uninst.sh
linux8664/LINUX8664/
linux8664/LINUX8664/timesten.tar.bz2
linux8664/LINUX8664/unzip
linux8664/LINUX8664/ttpatchinst
linux8664/LINUX8664/ttserver.tar.bz2
linux8664/LINUX8664/manifest
linux8664/LINUX8664/perl
linux8664/LINUX8664/common.tar.bz2
linux8664/LINUX8664/bzip2
linux8664/LINUX8664/ttclient.tar.bz2
linux8664/README.html
linux8664/install.pl

$ cd linux8664
$ ./setup.sh

ERROR: The /etc/TimesTen directory needs to be created for the instance registry
and its ownership and permissions set appropriately.
Please refer to the installation guide for assistance.
Oop! I used oracle user, so...
$ su - root
# mkdir /etc/TimesTen
# chown -R oracle:oinstall /etc/TimesTen
Try Again:
$ ./setup.sh
NOTE: Each TimesTen installation is identified by a unique instance name.
The instance name must be a non-null alphanumeric string, not longer
than 255 characters.

Please choose an instance name for this installation? [ tt1121 ] ttmb
Instance name will be 'ttmb'.
Is this correct? [ yes ]

Of the three components:

[1] Client/Server and Data Manager
[2] Data Manager Only
[3] Client Only

Which would you like to install? [ 1 ]
Where would you like to install the ttmb instance of TimesTen? [ /home/oracle ] /u02/TimesTen
Where would you like to create the daemon home directory? [ /u02/TimesTen/ttmb/info ]
Installing into /u02/TimesTen/ttmb ...
Uncompressing ...

NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
daemon port number must be the same across all TimesTen installations
managed by Oracle Clusterware.

NOTE: All installations that replicate to each other must use the same daemon
port number that is set at installation time. The daemon port number can
be verified by running 'ttVersion'.

The default port number is 53388.

Do you want to use the default port number for the TimesTen daemon? [ yes ]
The daemon will run on the default port number (53388).

NOTE: For security, we recommend that you restrict access to the
TimesTen installation to members of a single OS group. Only members of
that OS group will be allowed to perform direct mode connections to
TimesTen, and only members of that OS group will be allowed to perform
operations that access TimesTen data stores, TimesTen files and shared
memory. The OS group defaults to the primary group of the instance
administrator. You can default to this group, choose another OS group
or you can make this instance world-accessible. If you choose to make
this instance world-accessible, all database files and shared memory
are readable and writable by all users.

Restrict access to the the TimesTen installation to the group 'oinstall'? [ yes ]

NOTE: Enabling PL/SQL will increase the size of some TimesTen libraries.

Would you like to enable PL/SQL for this instance? [ yes ]

The daemon logs will be located in /u02/TimesTen/ttmb/info
Would you like to specify a different location for the daemon logs? [ no ] yes
Where would you like the daemon logs to be written? [ /u02/TimesTen/ttmb/info ] /u02/TimesTen/ttmb/log
The directory /u02/TimesTen/ttmb/log does not exist.
Do you want to create it? [ yes ]
Are you sure you want the daemon logs to be written to /u02/TimesTen/ttmb/log? [ yes ]
TNS_ADMIN was not set in your environment but there is a tnsnames.ora
file in /u01/oracle/product/11.1.0/db/network/admin.
Would you like to use this TNS_ADMIN setting for the In-Memory Database Cache? [ yes ]

TNS_ADMIN will be set to /u01/oracle/product/11.1.0/db/network/admin
You can change TNS_ADMIN later by running /bin/ttmodinstall.
.
.
.
Installing server components ...
What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 53389 ]
Do you want to install QuickStart and the TimesTen Documentation? [ no ] yes
Where would you like to install the quickstart and doc directories (s=skip)? [ /u02/TimesTen/ttmb ]

The TimesTen Quickstart applications can take up to 64 Mbytes of disk space.
Depending on how your system is configured, you may not want to create the
QuickStart DemoDataStore directory in the default location,
/u02/TimesTen/ttmb/info/DemoDataStore

Where would you like to create the DemoDataStore directory? [ /u02/TimesTen/ttmb/info ]
Creating /u02/TimesTen/ttmb/info/DemoDataStore ...

Installing client components ...

Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] yes
Please provide the path to the Oracle Clusterware installation on this machine (s=skip)? [ /u01/oracle/product/crs ]
Please enter a port number for the TimesTen Clusterware agent? [ 53394 ]

Executing '/u01/oracle/product/crs/bin/crsctl check cluster' ...
Oracle Clusterware is currently configured on the following nodes :
.
.
.
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.

Run the 'setuproot' script :
cd /u02/TimesTen/ttmb/bin
./setuproot -install
This will move the TimesTen startup script into its appropriate location.

The startup script is currently located here :
'/u02/TimesTen/ttmb/startup/tt_ttmb'.

The Quickstart home page can be accessed here :
'/u02/TimesTen/ttmb/quickstart/index.html'

Starting the daemon ...
TimesTen Daemon startup OK.
End of TimesTen installation.
when installed, it's time to test with it:
setup data store:
$ vi /u02/TimesTen/ttmb/info/sys.odbc.ini

[ODBC Data Sources]
mb_db01=TimesTen 11.2.1 Driver

[mb_db01]
Driver=/u02/TimesTen/ttmb/lib/libtten.so
DataStore=/u02/TimesTen/ttmb/info/TT/mb_db01
PermSize=100
TempSize=100
PLSQL=1
DatabaseCharacterSet=US7ASCII
start data store and test create user:
$ cd /u02/TimesTen/ttmb/bin
$ mkdir /u02/TimesTen/ttmb/info/TT
$ ./ttisql

Copyright (c) 1996-2009, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.


Command> connect "dsn=mb_db01";
Connection successful: DSN=mb_db01;UID=oracle;DataStore=/u02/TimesTen/ttmb/info/TT/mb_db01;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/u02/TimesTen/ttmb/lib/libtten.so;PermSize=100;TempSize=100;TypeMode=0;
(Default setting AutoCommit=1)

Command> create user tt01 identified by password;
User created.

Command> GRANT CREATE TABLE TO tt01;
Command>

Command> connect "DSN=mb_db01;uid=tt01";
Enter password for 'tt01':
15107: User lacks CREATE SESSION privilege; logon denied
The command failed.

none: Command> connect "DSN=mb_db01" ;
Connection successful: DSN=mb_db01;UID=oracle;DataStore=/u02/TimesTen/ttmb/info/TT/mb_db01;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/u02/TimesTen/ttmb/lib/libtten.so;PermSize=100;TempSize=100;TypeMode=0;
(Default setting AutoCommit=1)
con1: Command>
con1: Command>
con1: Command> grant create session to tt01;
con1: Command> grant create procedure to tt01;
con1: Command> connect "DSN=mb_db01;uid=tt01";
Enter password for 'tt01':
Connection successful: DSN=mb_db01;UID=tt01;DataStore=/u02/TimesTen/ttmb/info/TT/mb_db01;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/u02/TimesTen/ttmb/lib/libtten.so;PermSize=100;TempSize=100;TypeMode=0;
(Default setting AutoCommit=1)
and Test PL/SQL (sample):
con1: Command>set serveroutput on

con1: Command> create or replace procedure hello_world as
begin
dbms_output.put_line('Hello World!');
end;
/

con1: Command> begin
> hello_world;
> end;
> /
Hello World!
That 's just simple to install , read more at doc, best practices

Tuesday, July 28, 2009

Oracle TimesTen Release 11.2.1.2.0


After I read Oracle Announces Oracle® TimesTen In-Memory Database 11g and Oracle In-Memory Database Cache 11g and go to Oracle TimesTen download.
Oracle changed Oracle TimesTen Release from 7.0.5.2.0 to 11.2.1.2.0 for download.

Read Release Notes , by the way this version support PL/SQL.

The release numbering system has been changed. In the release number
a.b.c.d.e, a.b.c represents the TimesTen release (11.2.1), d represents the
patch release (2) and e represents the port patch (0).

Tuesday, March 25, 2008

write C connect TimesTen

I develope C on linux connect TimesTen. I had problem can't connect client/server because I didn't understand library on TimesTen more.

Thank You Chris Jenkins (Director, Solution Architectures, Oracle) for idea.

When we need to write C code connect to TimesTen [TimesTen has the TT library that is linked to the application], we have two choice;

- direct mode
use libtten.so library.

- client/server
use libttclient.so library.

When we write C code, we'll create Makefile file for make code:

Example:


INSTDIR = /oracle/product/TimesTen/ttmb
COMMDIR = $(INSTDIR)/demo/common
CC = gcc
PLATCFLAGS = -Os -finline-functions
LDFLAGS =
INCS = -I$(INSTDIR)/include -I$(COMMDIR)
CSDEFS = -DTTCLIENTSERVER
CFLAGS = $(PLATCFLAGS) $(INCS)
TTLINK = -L$(INSTDIR)/lib -Wl,-rpath,$(INSTDIR)/lib
DCLIBS = $(TTLINK) -ltten $(EXTRALIBS) # For Direct Mode
CSLIBS = $(TTLINK) -lttclient $(EXTRALIBS) # For Client/Server
PROGS = test3
all: $(PROGS)
clean:
rm -f $(PROGS) *.o
test3: test3.o
$(CC) -o $@ $(LDFLAGS) test3.o $(CSLIBS)
test3.o: test3.c
$(CC) $(CFLAGS) -o $@ -c test3.c


Enjoy!

Wednesday, March 12, 2008

Idea using FreeRadius with Timesten

FreeRADIUS(http://www.freeradius.org/) is the premiere open source RADIUS server.

I need to use freeradius connect Timeten DB. I don't know any idea.

I found "rlm_sql" on freeradius and unixodbc example.

So I have a good idea to create driver to support Timesten on freeradius.(Wish somebody develope it)

Note:
freeradius-server-2.0.2
timesten-7.0.3
SOURCE_DIR = freeradius source
TIMESTEN_DIR=/oracle/product/TimesTen/ttmb/

1. I copied SOURCE_DIR/src/modules/rlm_sql/drivers/rlm_sql_unixodbc to SOURCE_DIR/src/modules/rlm_sql/drivers/rlm_sql_timesten

2. modified rlm_sql_timesten DIR (replaced sql_unixodbc to sql_timesten)
$cd SOURCE_DIR/src/modules/rlm_sql/drivers/rlm_sql_timesten/
$ ls
configure configure.in Makefile Makefile.in sql_timesten.c

- Modified Makefile.in
include ../../../../../Make.inc
INSTDIR = --with-timesten-dir
COMMDIR = $(INSTDIR)/demo/common
CC = gcc
PLATCFLAGS = -Os -finline-functions
LDFLAGS =
INCS = -I$(INSTDIR)/include -I$(COMMDIR)
CSDEFS = -DTTCLIENTSERVER
CFLAGS = $(PLATCFLAGS) $(INCS)
TTLINK = -L$(INSTDIR)/lib -Wl,-rpath,$(INSTDIR)/lib
DCLIBS = $(TTLINK) -ltten $(EXTRALIBS)
CSLIBS = $(TTLINK) -lttclient $(EXTRALIBS)
TARGET = @targetname@
SRCS = sql_timesten.c
RLM_SQL_CFLAGS = @sql_timesten_cflags@ $(INCLTDL) $(INCS)
RLM_SQL_LIBS = @sql_timesten_ldflags@ $(DCLIBS)
#RLM_SQL_LIBS = @sql_timesten_ldflags@ $(CSLIBS)
include ../rules.mak

- Modified sql_timesten.c file (changed code to support ODBC programming http://www.oracle.com/timesten).

#include "rlm_sql.h"

typedef struct rlm_sql_timesten_sock {
SQLHENV env_handle;
SQLHDBC dbc_handle;
SQLHSTMT stmt_handle;
SQL_ROW row;
void *conn;
} rlm_sql_timesten_sock;
.
.
.
static int sql_init_socket(SQLSOCK *sqlsocket, SQL_CONFIG *config) {
rlm_sql_timesten_sock *timesten_sock;
long err_handle;

if (!sqlsocket->conn) {

sqlsocket->conn = (rlm_sql_timesten_sock *)rad_malloc(sizeof rlm_sql_timesten_sock));
if (!sqlsocket->conn) {
return -1;

}
}

timesten_sock = sqlsocket->conn;
memset(timesten_sock, 0, sizeof(*timesten_sock));

/* Allocate Environment */
err_handle = SQLAllocEnv(&timesten_sock->env_handle);

if (sql_state(err_handle, sqlsocket, config)) {

radlog(L_ERR, "rlm_sql_timesten: Unable to allocate an environment handle\n");
SQLFreeEnv(timesten_sock->env_handle);
return -1;

}

/* Allocate Connection */

err_handle = SQLAllocConnect(timesten_sock->env_handle, &timesten_sock->dbc_handle);

if (sql_state(err_handle, sqlsocket, config)) {

radlog(L_ERR, "rlm_sql_timesten: Can't allocate connection handle\n");
SQLFreeEnv(timesten_sock->env_handle);
return -1;

}

/* Set Connect Options */

SQLSetConnectOption(timesten_sock->dbc_handle, SQL_LOGIN_TIMEOUT, 5);

/* Connect to db */

err_handle = SQLConnect(timesten_sock->dbc_handle, (SQLCHAR*) config->sql_db, strlen(config->sql_db), (SQLCHAR*) config->sql_login, strlen(config->sql_login), (SQLCHAR*) config->sql_password,strlen(config->sql_password));

if (sql_state(err_handle, sqlsocket, config)) {

radlog(L_ERR, "rlm_sql_timesten: Connection failed\n");
SQLFreeConnect(timesten_sock->dbc_handle);
SQLFreeEnv(timesten_sock->env_handle);
return -1;

}

timesten_sock->stmt_handle = SQL_NULL_HSTMT;

/* Allocate Statement */
err_handle = SQLAllocStmt(timesten_sock->dbc_handle, &timesten_sock->stmt_handle);

if (sql_state(err_handle, sqlsocket, config)) {
radlog(L_ERR, "rlm_sql_timesten: Can't allocate the statement\n");
SQLDisconnect(timesten_sock->dbc_handle);
SQLFreeConnect(timesten_sock->dbc_handle);
SQLFreeEnv(timesten_sock->env_handle);
return -1;

}

return 0;
}
.
.
.

3. Mofidied SOURCE_SIR/src/modules/rlm_sql/stable file.

rlm_sql_iodbc
rlm_sql_mysql
rlm_sql_postgresql
rlm_sql_oracle
rlm_sql_unixodbc
rlm_sql_timesten

4. Modified SOURCE_DIR/src/main/Makefile.in file.

SUB_MODULES += rlm_sql_db2 rlm_sql_iodbc rlm_sql_mysql
SUB_MODULES += rlm_sql_oracle rlm_sql_postgresql rlm_sql_sybase rlm_sql_unixodbc rlm_sql_timesten

5. installed freeradius

$ cd SOURCE_DIR
$ ./configure --with-timesten-dir=/oracle/product/TimesTen/ttmb
$ make
$ ls src/modules/rlm_sql/drivers/rlm_sql_timesten/
config.log configure Makefile rlm_sql_timesten.la sql_timesten.lo
config.status configure.in Makefile.in sql_timesten.c sql_timesten.o
$ su root
$ make install
$ vi /etc/ld.so.conf
.
.
.
/usr/local/lib
/oracle/product/TimesTen/ttmb/lib/


$ ldconfig

$ ls /usr/local/lib/rlm_sql_timesten.so
/usr/local/lib/rlm_sql_timesten.so

6. example Timesten data source (sys.odbc.ini)

[ttmb_demo3]
Driver=/oracle/product/TimesTen/ttmb/lib/libtten.so
DataStore=/oradata/TimesTen/ttmb_demo3
DatabaseCharacterSet=TH8TISASCII
PermSize=1000
TempSize=1000
UID=timesten_tmp
Authenticate=1
TempWarnThreshold=85
PermWarnThreshold=85

$ ttisql ttmb_demo3
Copyright (c) 1996-2007, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.

connect "DSN=ttmb_demo3";
Enter password for 'timesten_tmp':
Connection successful: DSN=ttmb_demo3;UID=timesten_tmp;DataStore=/oradata/TimesTen/ttmb_demo3;DatabaseCharacterSet=TH8TISASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/oracle/product/TimesTen/ttmb/lib/libtten.so;PermSize=1000;TempSize=1000;PermWarnThreshold=85;TempWarnThreshold=85;TypeMode=0;(Default setting AutoCommit=1)

7. configured FreeRadius

$ cd /usr/local/etc/raddb/
$ cp sql.conf timesten.conf

- Modified timesten.conf file.
.
.
.
database = "timesten"
driver = "rlm_sql_${database}"
server = "localhost"
login = "timesten_tmp"
password = "password"
radius_db = "ttmb_demo3"

8. Edited radiusd.conf file.

$INCLUDE ${confdir}/sql.conf

Replace this line with:

$INCLUDE ${confdir}/timesten.conf

and =>

#
# Look in an SQL database. The schema of the database
# is meant to mirror the "users" file.
#
# See "Authorization Queries" in sql.conf
# sql

Uncomment out the sql entry:

#
# Look in an SQL database. The schema of the database
# is meant to mirror the "users" file.
#
# See "Authorization Queries" in sql.conf
sql
-
$ cd /usr/local/etc/raddb/sql
$ cp -rp oracle/ timesten/

9. Created tables on Timesten DB (Mofified from oracle schema)

CREATE TABLE radacct ( radacctid INT PRIMARY KEY,
acctsessionid VARCHAR(32) NOT NULL,
acctuniqueid VARCHAR(32),
username VARCHAR(64) NOT NULL,
groupname VARCHAR(32) NOT NULL,
realm VARCHAR(30),
nasipaddress VARCHAR(15) NOT NULL,
nasportid VARCHAR(15),
nasporttype VARCHAR(32),
acctstarttime DATE, acctstoptime DATE,
acctsessiontime NUMERIC(19),
acctauthentic VARCHAR(32),
connectinfo_start VARCHAR(50),
connectinfo_stop VARCHAR(50),
acctinputoctets NUMERIC(19),
acctoutputoctets NUMERIC(19),
calledstationid VARCHAR(50),
callingstationid VARCHAR(50),
acctterminatecause VARCHAR(32),
servicetype VARCHAR(32),
framedprotocol VARCHAR(32),
framedipaddress VARCHAR(15),
acctstartdelay NUMERIC(12),
acctstopdelay NUMERIC(12),
XAscendSessionSvrKey VARCHAR(10)
);


CREATE UNIQUE INDEX radacct_idx1
ON radacct(acctsessionid,username,acctstarttime, acctstoptime,nasipaddress,framedipaddress);

CREATE TABLE radcheck (
id INT PRIMARY KEY,
username VARCHAR(30) NOT NULL,
attribute VARCHAR(30),
op VARCHAR(2) NOT NULL,
value VARCHAR(40)
);

CREATE SEQUENCE radcheck_seq START WITH 1 INCREMENT BY 1;

CREATE TABLE radgroupcheck (
id INT PRIMARY KEY,
groupname VARCHAR(20) UNIQUE NOT NULL,
attribute VARCHAR(40),
op CHAR(2) NOT NULL,
value VARCHAR(40)
);

CREATE SEQUENCE radgroupcheck_seq START WITH 1 INCREMENT BY 1;

CREATE TABLE radgroupreply (
id INT PRIMARY KEY,
GroupName VARCHAR(20) UNIQUE NOT NULL,
Attribute VARCHAR(40),
op CHAR(2) NOT NULL,
Value VARCHAR(40)
);

CREATE SEQUENCE radgroupreply_seq START WITH 1 INCREMENT BY 1;

CREATE TABLE radreply (
id INT PRIMARY KEY,
UserName VARCHAR(30) NOT NULL,
Attribute VARCHAR(30),
op CHAR(2) NOT NULL,
Value VARCHAR(40)
);

CREATE INDEX radreply_idx1 ON radreply(UserName);

CREATE SEQUENCE radreply_seq START WITH 1 INCREMENT BY 1;

CREATE TABLE radusergroup (
id INT PRIMARY KEY,
UserName VARCHAR(30) UNIQUE NOT NULL,
GroupName VARCHAR(30)
);

CREATE SEQUENCE radusergroup_seq START WITH 1 INCREMENT BY 1;

CREATE TABLE realmgroup
( id INT PRIMARY KEY,
RealmName VARCHAR(30) UNIQUE NOT NULL,
GroupName VARCHAR(30));

CREATE SEQUENCE realmgroup_seq START WITH 1 INCREMENT BY 1;

CREATE TABLE realms (
id INT PRIMARY KEY,
realmname VARCHAR(64),
nas VARCHAR(128),
authport INT,
options VARCHAR(128));

CREATE SEQUENCE realms_seq START WITH 1 INCREMENT BY 1;

Remark: Timesten does not support Trigger.

10. Inserted Data for Testing

INSERT INTO
radgroupcheck ( ID, GroupName, Attribute, Value, op )
VALUES ( 1, 'easy', 'Auth-Type', 'Local', ':=' )

INSERT INTO
radcheck(ID, UserName, Attribute, Value, op )
VALUES(1, 'easyuser', 'password', 'easypass', '==' )

INSERT INTO
radusergroup(ID, UserName, GroupName )
VALUES(1, 'easyuser', 'easy' )

11. Test

- Start free radius
$ radiusd -X

Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on proxy address * port 1814
Ready to process reques

and :

$ radtest easyuser easypass localhost 1 testing123

Sending Access-Request of id 17 to 127.0.0.1 port 1812
User-Name = "easyuser"
User-Password = "easypass"
NAS-IP-Address = 192.168.1.10
NAS-Port = 1

rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=17, length=20


Note: This is only idea to develope for someone use FreeRadius with Timesten



Thursday, February 14, 2008

What is "Autorefresh Clean Up" script on Timesten?

Before I was going to the vacation. I thought I should find some stories to update my Blogs.
TimesTen released 7.0.4 version for 7 days ago. Anyway It could't support PL/SQL. I asked on the oracle forums, they told me next next... next version. wait wait... and wait!

I didn't come here to tell anyone about new feature on 7.0.4 version.

But I interested about cleaning up Autorefresh Object on Oracle, when you created cache group that timesten automatically creates a trigger and a log table for each Oracle base table specified in a READONLY cache group or a cache group with AUTOREFRESH INCREMENTAL attribute. The objects are dropped when the cache group is dropped.

If a Timesten data store becomes unavailable without dropping the cache groups, autorefresh objects continue to exist on Oracle.

TimesTen provides a script that can be used to clean up the autorefresh objects in the Oracle database. The location of the script is: install_dir/bin/autorefreshCleanUp.sql

The script removes autorefresh objects related to the data store and host that you specify when you run the script. It does not affect autorefresh objects for other data stores.
Using the autorefresh cleanup script

Use SQL*Plus to run the autorefresh cleanup script on the Oracle database. You must be connected to the Oracle database as a cache administration user to run the script. The autorefresh cleanup script requires two input parameters: the host name where TimesTen is running and the data store path name. The strings for the hostname and the data store path name must be identical to the strings stored onOracle. You can run the autorefreshChangeLogInfo.sql script, located in install_dir/bin, to determine the correct host name and data store path name. On Windows, enter the host name and data store name in lower case. Pass the host name and the data store path name to the script from the command line or from a SQL*Plus session:

• From the command line:

$ sqlplus cache_admin_uid@oracle_id @install_dir/bin/autorefreshCleanUp.sql
"host_name" "data_store_path_name"

• From a SQL*Plus session:

SQL> @install_dir/bin/autorefreshCleanUp.sql "host_name"
"data_store_path_name"
If you do not specify the parameters, the script prompts for them. “Parameter 1” is the host name; “parameter 2” is the data store path name.
The script displays the SQL that it executes on Oracle to clean up the autorefresh objects.

Example:

$ sqlplus user@DB @install_dir/bin/autorefreshCleanUp.sql
Enter value for 1: timesten01
old 6: host1 varchar(200) := '&1';
new 6: host1 varchar(200) := 'timesten01';
Enter value for 2: /oradata/TimesTen/ttmb_demo1
old 7: datastore1 varchar(257) := '&2';
new 7: datastore1 varchar(257) := '/oradata/TimesTen/ttmb_demo1';
*****************************OUTPUT**************************************
Performing cleanup for object_id: 18110 which belongs to table :TIMESTEN_TMP.TEMP_DATA5
Executing: delete from tt_03_agent_status where host = timeten01 and datastore =
/oradata/TimesTen/ttmb_demo1 and object_id = 18110
Executing: update tt_03_user_count set usercount = :usecount,usecount = 2
**************************************************************************

I think that's a great. However I have one script else to tell ... is: install_dir/bin/autorefreshChangeLogInfo.sql

This script help to get Autorefresh Log informations.
Example:
$ sqlplus user@DB @install_dir/bin/autorefreshChangeLogInfo.sql
****************************
Host name: timesten01
Timesten datastore name: /oradata/TimesTen/ttmb_demo3
Cache table name: TIMESTEN_TMP.TEMP_DATA5
Change log table name: tt_03_18110_L
Number of rows in change log table: 19459
Maximum logseq on the change log table: 87
Timesten has autorefreshed updates upto logseq: 87
Number of updates waiting to be autorefreshed: 0
Number of updates that has not been marked with a valid logseq: 0

****************************

Host name: timesten02

Timesten datastore name: /oradata/TimesTen/ttmb_demo3

Cache table name: TIMESTEN_TMP.TEMP_DATA5

Change log table name: tt_03_18110_L

Number of rows in change log table: 19459

Maximum logseq on the change log table: 87

Timesten has autorefreshed updates upto logseq: 83

Number of updates waiting to be autorefreshed: 19459

Number of updates that has not been marked with a valid logseq: 0


Wow...

Tuesday, December 25, 2007

Example Oracle TimesTen Connected programming

We would like to develope Oracle Timesten. We should understand ODBC programming and Oracle Timesten Architecture.
Anyway Let me show example to connect Oracle Timesten.

sample odbc file:
[ttmb_demo3]
Driver=/oracle/product/TimesTen/ttmb/lib/libtten.so
DataStore=/oradata/TimesTen/ttmb_demo3
DatabaseCharacterSet=TH8TISASCII
OracleId=TESTDB
PermSize=1000
TempSize=1000
UID=timesten_tmp
Authenticate=1
OraclePWD=password
TempWarnThreshold=85
PermWarnThreshold=85

[cc1]
TTC_SERVER=timeten01
TTC_SERVER_DSN=ttmb_demo3
UID=timesten_tmp
PWDCrypt=9629dc02d3c811e6368b4820e364a0d8f1a470cd
Authenticate=1

sample table:
Command> desc TEMP_DATA5;
Table TIMESTEN_TMP.TEMP_DATA5:
Columns:
*ID NUMBER NOT NULL
DATA VARCHAR2 (400) NOT INLINE
REMARK VARCHAR2 (255) NOT INLINE
1 table found.

Example Data>>>
< 41001, TEST, <NULL> >
< 41002, TEST, <NULL> >
< 41003, TEST, <NULL> >
< 41004, TEST, <NULL> >
< 41005, TEST, <NULL> >
< 41006, TEST, <NULL> >
< 41007, TEST, <NULL> >
< 41008, TEST, <NULL> >
< 41009, TEST, <NULL> >
< 41010, TEST, <NULL> >

We would like to query "select * from TIMESTEN_TMP.TEMP_DATA5" by C program.
"test.c" file >>>
#include <sqlunix.h>
#include <sql.h>
#include <sqltypes.h>
#include <sqlext.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
#include <time.h>

#define MAXCOLS 3
#define COL_LEN_MAX 100
#define DATA_SIZE 400
#define REMARK_SIZE 255
void print_err(HDBC hdbc, HSTMT hstmt, SQLHENV henv);
int main()
{
SQLHENV henv = SQL_NULL_HENV;
/* Environment handle */
SQLHDBC hdbc = SQL_NULL_HDBC;
/* Connection handle */
SQLHSTMT hstmt;
SQLRETURN rc;
int i;
SQLSMALLINT numCols;
SQLCHAR colname[32];
SQLSMALLINT colnamelen, coltype, scale, nullable;
SQLULEN collen [MAXCOLS];
SQLLEN outlen [MAXCOLS];
SQLCHAR* data [MAXCOLS];
UCHAR Sdata[DATA_SIZE];
SDWORD Sid;
UCHAR Sremark[REMARK_SIZE];
SQLLEN Cid,Cdata,Cremark;
rc = SQLAllocEnv(&henv);
rc = SQLAllocConnect(henv, &hdbc);
rc = SQLConnect(hdbc, "ttmb_demo3", SQL_NTS,
"timesten_tmp", SQL_NTS,
"timesten", SQL_NTS);
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO)
print_err(hdbc, SQL_NULL_HSTMT, henv );
/* other declarations, and program set-up here */
hstmt = SQL_NULL_HSTMT;
rc = SQLAllocStmt(hdbc, &hstmt);
/* Prepare the SELECT statement */
rc = SQLPrepare(hstmt,
(SQLCHAR*) "SELECT * FROM TIMESTEN_TMP.TEMP_DATA5",
SQL_NTS);
/* Determine number of columns in result rows */
rc = SQLNumResultCols(hstmt, &numCols);
/* Describe and bind the columns */
for (i = 0; i < numCols; i++) {
rc = SQLDescribeCol(hstmt,
(SQLSMALLINT) (i + 1),
colname,(SQLSMALLINT)sizeof(colname), &colnamelen, &coltype, &collen[i],
&scale, &nullable);
/* ... */
data[i] = (UCHAR*) malloc (collen[i] +1);
rc = SQLBindCol(hstmt, (SQLSMALLINT) (i + 1),
SQL_C_CHAR, data[i],
COL_LEN_MAX, &outlen[i]);
/* ... */
// printf ("%d\n",rc);

}
/* Execute the SELECT statement */
rc = SQLExecute(hstmt);
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO)
print_err(hdbc, hstmt, henv );
/* ... */
/* Fetch the rows */
if (numCols > 0) {
SQLBindCol(hstmt, 1, SQL_C_SLONG, &Sid, 0, &Cid);
SQLBindCol(hstmt, 2, SQL_C_CHAR, &Sdata, DATA_SIZE, &Cdata);
SQLBindCol(hstmt, 3, SQL_C_CHAR, &Sremark, REMARK_SIZE, &Cremark);
while ((rc = SQLFetch(hstmt)) == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) {
printf(" %d,%s,%s\n ", Sid,Sdata,Sremark);
/* ... "Process" the result row */
} /* end of for-loop */
if (rc != SQL_NO_DATA_FOUND)
fprintf(stderr,
"Unable to fetch the next row\n");
/* Close the cursor associated with the SELECT statement */
rc = SQLFreeStmt(hstmt, SQL_CLOSE);
}
SQLFreeStmt(hstmt, SQL_DROP);
SQLDisconnect(hdbc);
SQLFreeConnect(hdbc);
SQLFreeEnv(henv);
printf ("DisConnected\n");
}

void print_err(HDBC hdbc, HSTMT hstmt, SQLHENV henv){
SQLFreeStmt(hstmt, SQL_DROP);
SQLDisconnect(hdbc);
SQLFreeConnect(hdbc);
SQLFreeEnv(henv);
printf ("Error\n");
exit (0);
}
>>>>>>>>>>>>>>>>>>>>>

Example "Makefile" file >>>
CC = gcc
INSTDIR = /oracle/product/TimesTen/ttmb
CFLAGS = -I${INSTDIR}/include
LIBS = -L${INSTDIR}/lib -ltten
LIBSDEBUG = -L${INSTDIR}/lib -lttenD
LIBSCS = -L${INSTDIR}/lib -lttclient
PROGS = test
all: $(PROGS)
clean:
rm -f $(PROGS) *.o
test:test.o
$(CC) -o test test.o $(LIBS)
>>>>>>>>>>>>>>>>>>>>>

$ make
gcc -I/oracle/product/TimesTen/ttmb/include -c -o test.o test.c
$ ls
Makefile test test.c test.o
$ ./test
41001,TEST,
41002,TEST,
41003,TEST,
41004,TEST,
41005,TEST,
41006,TEST,
41007,TEST,
41008,TEST,
41009,TEST,
41010,TEST,
DisConnected
********************************************************************

We would like to query "select * from TIMESTEN_TMP.TEMP_DATA5" by JAVA program.- export CLASSPATH
$ export CLASSPATH=.:/oracle/product/TimesTen/ttmb/lib/ttjdbc5.jar
- sample java program.
"TestTimesTen.java" file >>>
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.*;
public class TestTimesTen {
public static void main(String[] args) {
try {
Class.forName("com.timesten.jdbc.TimesTenDriver");
String URL = "jdbc:timesten:client:DSN=cc1;TCP_PORT=17003";
Connection _Connection = DriverManager.getConnection(URL);
Statement stmt = _Connection.createStatement();
ResultSet rs = stmt.executeQuery(" SELECT * FROM TIMESTEN_TMP.TEMP_DATA5 ");
while (rs.next()){
System.out.println( rs.getInt(1)+"," + rs.getString(2));
}
System.out.println("Test Completed");
}
catch (SQLException ex) {
ex.printStackTrace();
}
catch (ClassNotFoundException ex) {
ex.printStackTrace();
}
}
}
>>>>>>>>>>>>>>>>>>>>>

$ /home/timesten/jdk1.6.0_03/bin/javac TestTimesTen.java
$ /home/timesten/jdk1.6.0_03/bin/java TestTimesTen
41001,TEST
41002,TEST
41003,TEST
41004,TEST
41005,TEST
41006,TEST
41007,TEST
41008,TEST
41009,TEST
41010,TEST

"TestTimesTen2.java" file (direct connect)>>>
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.*;
public class TestTimesTen3 {
public static void main(String[] args) {
try {
Class.forName("com.timesten.jdbc.TimesTenDriver");
String URL = "jdbc:timesten:DSN=ttmb_demo3;PWDCrypt=9629dc02d3c811e6368b4820e364a0d8f1a470cd";
Connection _Connection = DriverManager.getConnection(URL);
Statement stmt = _Connection.createStatement();
ResultSet rs = stmt.executeQuery(" SELECT * FROM TIMESTEN_TMP.TEMP_DATA5 ");
while (rs.next()){
System.out.println( rs.getInt(1)+"," + rs.getString(2));
}
System.out.println("Test Completed");
}
catch (SQLException ex) {
ex.printStackTrace();
}
catch (ClassNotFoundException ex) {
ex.printStackTrace();
}
}
}
>>>>>>>>>>>>>>>>>>>>>

$ /home/timesten/jdk1.6.0_03/bin/javac TestTimesTen2.java
$ /home/timesten/jdk1.6.0_03/bin/java TestTimesTen2
41001,TEST
41002,TEST
41003,TEST
41004,TEST
41005,TEST
41006,TEST
41007,TEST
41008,TEST
41009,TEST
41010,TEST
********************************************************************

We would like to query "select * from TIMESTEN_TMP.TEMP_DATA5" by PERL program.- install DBD-TimesTen module
- sample Perl program
"test.pl" file >>>
>>>>>>>>>>>>>>>>>>>>>
#!/usr/bin/perl -w
use DBI qw(:sql_types);
use DBD::TimesTen qw(:sql_isolation_options);
my $dbh = DBI->connect('DBI:TimesTen:DSN=cc1;TCP_PORT=17003', undef,undef
)
or die $DBI::errstr;
my $sql = qq{ SELECT * FROM TIMESTEN_TMP.TEMP_DATA5 };
my $sth = $dbh->prepare( $sql );
$sth->execute();
while ( my @row = $sth->fetchrow_array ) {
print "$row[0],$row[1]\n";
}
$sth->finish();
$dbh->disconnect();
>>>>>>>>>>>>>>>>>>>>>
$ perl test.pl
41001,TEST
41002,TEST
41003,TEST
41004,TEST
41005,TEST
41006,TEST
41007,TEST
41008,TEST
41009,TEST
41010,TEST
********************************************************************

It's funny to develope some programs with Oracle Timesten.
Anyway We need to recognise about ODBC Programming.

Wednesday, October 17, 2007

[TimesTen] No Update from Cache to RDBMS, when StandBy down

I created active standby pair with cache group write asynchonize.
When StandBy down, I found data on Timesten no update on RDBMS

When Active Down, that no auto StandBy to Active and no data on Timesten no update on RDBMS

When I ask somebody, that tell me TimesTen can't auto Active and should write script or use cluster manager to manage.

Exam:
CREATE ACTIVE STANDBY PAIR ttmb_demo1 ON "master01", ttmb_demo1 ON "master02"
STORE ttmb_demo1 ON "master01" TIMEOUT 30
STORE ttmb_demo1 ON "master02" TIMEOUT 30;

master01: Active
master02: StandBy

Case 1: master02 Down
-> master don't know master02 down So, call
Timesten> call ttRepStateSave('FAILED','ttmb_demo1', 'master02');


Case 2: master01 Down
-> standby cant auto to active and don't know master01 down, So call
Timesten> call ttRepStateSet('ACTIVE');
Timesten> call ttRepStateSave('FAILED','ttmb_demo1', 'master01');

However Thank You http://forums.oracle.com

Wednesday, May 16, 2007

[Timesten] Error group cache(Oracle native error code = 1652), when insert or delete more data

Example ERror on "tterrors.log"

13:48:22.40 Err : ORA: 1092: ora-1092-1088731504-refresh07915: Error executing Oracle statement: SELECT L."CUSID", X."LOGIN", ... FROM "XX"."CHARTTT") X WHERE L."CUSID" = X."CUSID" (+)
13:48:27.96 Err : ORA: 1092: ora-1092-1088731504-refresh07891: Failed calling OCI function: OCIStmtExecute()
13:48:27.96 Err : ORA: 1092: ora-1092-1088731504-raUtils00373: Oracle native error code = 1652, msg = ORA-01652: unable to extend t
emp segment by 128 in tablespace TEMP



So: resolve by
1. connect databse rdbms and extend temp tablespace.
or add tempfile for explain

SQL>alter tablespace temp add tempfile '+DATA' size 1G;

After add extend temp tablespace
on TT DB

COMMAND> alter cache group alter cache group XX.READONLY_CHARTTT set AUTOREFRESH state PAUSED; set AUTOREFRESH state PAUSED;

Command> refresh cache group XX.READONLY_CHARTTT commit every 256 rows;

COMMAND> alter cache group alter cache group XX.READONLY_CHARTTT set AUTOREFRESH state PAUSED; set AUTOREFRESH state ON;


For refresh...

Thursday, February 22, 2007

[TimesTen] Error autorefresh for interval 1000 ms has not finished after 60000 ms

I found error on timesten cache connection. when I update more values on rdbms.

Problem:14:07:23.88 Warn: ORA: 22151: ora-22151-1076128096-fresher00831: Last autorefresh for interval 1000 ms has not finished after 60000 ms


Resovle:

alter cache group TEST.TEST_READONLY set AUTOREFRESH state PAUSED;

refresh cache group TEST.TEST_READONLY commit every 256 rows;

alter cache group TEST.TEST_READONLY set AUTOREFRESH state on;