You need to:
1. Decide what tables/data you want to cache in IMDB Cache and what kind of caching you wish to use (READONLY, write through etc.).
2. Create the necessary cache groups in IMDB Cache and, where appropriate, pre-load the data from Oracle DB (LOAD CACHE GROUP etc.)
3. Point WLS datasource at TimesTen and/or Oracle DB fas appropriate based on which data the application needs to access.
4. Ensure that the application works okay with TimesTen cache in terms of query consistency, transactional consistency etc. (since you now have two separate databases being kept in sync by the TimesTen cache mechanisms).
Thanks for your reply. I need a small clarification on the last disconnect to unload the databse from the memory.
How does TimesTen come to know whether it is a last disconnect to unload the database from the memory?
Thanks in adavance.
The 'load on first connection' and 'unload on last disconnection' behaviour only applies if the ramPolicy for the database is set to the default of 'inUse' which is usually not a good idea in a production environment. ramPolicy manual is usually the best choice.
Anyway, with ramPolicy inUse a database is not loaded into memory until something (application, utility, replication agent, cache agent) connects to it. When something connects the database is loaded into memory and becomes usable. It will remain in memory until everything disconnects; when the last open connection is closed the database will be unloaded from memory. You can view the current connections using the ttStatus utility; note that the 'subdaemon' connections do not count as 'connections' for the purpose of loading/unloading - they are 'special' internal connections.
This behaviour is okay for small databases but is really not very good if your database is more than a few hundred MB. Using ramPolicy manual allows you to explicitly control when the database gets loaded into/unloaded from memory.
While configuring datasource in WebLogic application server, we will be entering the values for TimesTen database name, hostname, port, username and password as part of the connection properties. Who is this user? Is it cache manager user or cache table user or cache administration user or someone else? Can you please provide me with more clarity on this user we are giving as part of the connection properties?
Thanks in advance.
TimesTen, like Oracle database and indeed like most databases, allows you to define many users and their associated passwords and to assign various privileges to those users. Some users are 'special' (cache admin user for example) and have special privileges while others are just regular users. The username/password you specify in the WebLogic setup is the user that WLS will use to connect to TimesTen. Generally this should be a regular user with only the minimum privileges they need to perform the operations (SQL statements) that the application must execute. But at the end of the day it depends on how you have arranged things, what users you have created, privileges you have granted to them, whether he SQL issued by the application includes explicit owner names or uses plain table names and so on. Also, if you are goign to use PassThrough then this user also has to exist in Oracle (and have any necessary privileges there) and you must specify the OraclePWD attribute as part of the connection string.
Hope that helps clarify.
Thanks a lot Chris.
As per the TimesTen guide, we should grant system and data access privileges to the cache administration user, who sits at Oracle database side. What type of system privileges are these? Generally and mostly, we do not grant any system privileges to any user. If there are any such type of privileges in our environments, there are the audit jobs which detects and revokes such type of privileges automatically. Can you please provide more details on these system privileges?
As per the TimesTen guide, the cache table user, who sits at TimesTen database side, should be created in TimesTen database with the same user name used in Oracle database (owner of Oracle caching tables). Is this user should be created in TimesTen database with the same password whatever used in Oracle database?
In TimesTen database, where are these passwords, used while creating users, getting stored and in which format (text or encrypted)? Is it in any properties file?
Can we install TimesTen as a single common instance and get used in multiple places (applications & databases) with their respective instance, like the way we install WebLogic?
Is it required to install TimesTen databases as many as Oracle databases? Is it like one TimesTen database per one Oracle database? Or is it possible to configure multiple Oracle databases in a single TimesTen database?
Is TimesTen a physical database, like Oracle database, since we do not allow installing the physical databases on a machine (OS) where the WebLogic is installed upon which the applications are deployed?
Thank you very much Chris for your valuable answers.
Most of this information is in the TimesTen documentation. I would recommend you to study it carefully. There is a detailed list of the privileges that must be granted to the cache administrator user in the Oracle database. The exact privileges depend partly on the kind of cache groups you will be creating. Please consult the documentation for the explicit details. If you are unable or unwilling to grant these privileges then you cannot use TimesTen IMDB Cache.
The users(s) who own the cache tables in TimesTen must be created in TimesTen before you create the cache groups. The passwords can be different to the same user's password in Oracle if desired.
TimesTen stores the user's passwords, in encrypted form, within the TimesTen database (same as Oracle database does).
I'm not sure I fully understand what you are asking with this question: Can we install TimesTen as a single common instance and get used in multiple places (applications & databases) with their respective instance, like the way we install WebLogic?
An 'instance' (intallation) of TiemsTen can support multiple databases and these can be accessed both locally and remotely. So I think the answer to thsi question is yes but maybe you can explain in a bit more detail exactly what you are asking?
A single TimesTen database may only cache data from a single backend Oracle database. You may have multiple separate TimesTen databases cacheing data from the same Oracle database. Essentially it is a one (Oracle DB) to many (TimesTen DB) relationship.
TimesTen is a database (not sure what 'physical' means in this context). When deployed as IMDB Cache it is still essentially a database. it is stroign data in database form and persisting it to the local filesystem. For best performance it is strongly recommended to install TimesTen / IMDB Cache on the same machine as WLS. If that is absolutely not possible then you should consider deploying TimesTen in a separate 'cacheing tier' of machines but in this configuration you will not see the maximum benefit from TimesTen due to all the network round trips. It is not recommended to install TimesTen on the same machine as the Oracle database as you will likely then get resoucre contention (CPU, memory and maybe I/O) between TimesTen and Orcle database.
Thank you very much Chris for you quick response.
Let me put my 2 questions as following.
1. I have 10 applications which are deployed on 10 WebLogic application servers with 10 respective Oracle databases. Here, 10 WebLogic servers are installed on 10 different operating systems, and 10 Oracle databases on 10 different operating systems.
In this context, can I install TimesTen database on a separate OS other than above mentioned operating systems and followed by installing 10 different TimesTen instances on 10 different operating systems where in above mentioned WebLogic servers are installed?
Note: I would like to purchase a single license for a TimesTen database which is installed on a separate OS other than those operating systems upon which WebLogic servers are installed and running.
2. I have 10 applications which are deployed on 10 WebLogic application servers with 10 respective Oracle databases. Here, 10 WebLogic servers are installed on 10 different operating systems, and 10 Oracle databases on 10 different operating systems.
Here, I would like to have a single TimesTen database which should allow me configuring above mentioned 10 Oracle databases. With this configuration I should be able to cache the required tables from the above mentioned 10 different Oracle databases in order to serve the above mentioned 10 different applications separately. Is it possible?
Note: For the sake of example, I have used "10" applications, WebLogic servers, and databases. It can be "N" number of applications, WebLogic servers, and databases.
Thanks a lot in advance.