1 2 3 4 Previous Next 49 Replies Latest reply: Mar 11, 2011 9:11 AM by Chrisjenkins-Oracle RSS

    TimesTen Caching Newbie

    780991
      Hi,

      I am trying to make an application having feature of DB caching, for this my seniors has guided me that Oracle will be the main Database and TimesTen will do this caching part. So, my question is can anybody tell me where to start from, I am all new to this caching concept. I need some practical small working examples.
      I have installed TimesTen and Oracle on my machine and both are working.



      TIA,
      Vikas
        • 1. Re: TimesTen Caching Newbie
          634805
          Hi Vikas,

          You can find small practical example in documentation (http://download.oracle.com/docs/cd/E13085_01/welcome.html), Oracle® In-Memory Database Cache User's Guide, Chapter 2 Getting Started or you can go to OTN (http://www.oracle.com/technetwork/database/timesten/overview/index.html) and to see Quick Start Guide and Tutorials section.
          • 2. Re: TimesTen Caching Newbie
            729213
            for start quickstart is good solution http://download.oracle.com/otn_hosted_doc/timesten/1121/quickstart/index.html
            • 3. Re: TimesTen Caching Newbie
              780991
              Hi Gennady,

              Thanks for the quick reply. Now,
              I am trying to setup cache database from [http://download.oracle.com/otn_hosted_doc/timesten/1121/quickstart/html/admin/cache_grid_create.html]
              I am stucked at Step 4. Associate the Oracle Cache Administration user with the Cache Database

              I am getting error

              5220: Permanent Oracle connection failure error in OCIServerAttach(): ORA-12154
              : TNS:could not resolve the connect identifier specified rc = -1
              5935: Could not validate Oracle login: uid = CACHEADM, pwd = HIDDEN, OracleNetS
              erviceName = PortalPu, TNS_ADMIN = "D:\TimesTen\IMDBDir", ORACLE_HOME= ""
              The command failed.


              could u pls help me in this or possibly tell me where I am doing mistake ???



              TIA,
              Vikas
              • 4. Re: TimesTen Caching Newbie
                634805
                Hi Vikas,

                Did you install Oracle Database Client? If didn't, you should install it.
                You should set TNS_ADMIN in your Oracle Home.

                After that you can test connection through sqlplus utility, like sqlplus CACHEADM/HIDDEN@PortalPu
                • 5. Re: TimesTen Caching Newbie
                  780991
                  hi Gennady,

                  yes i have Oracle DB 10g client on my machine.
                  and what is this TNS_ADMIN ??? pardon me as i am new to this database thing
                  i have proper TNSora entry


                  Thanks,
                  Vikas
                  • 6. Re: TimesTen Caching Newbie
                    634805
                    Hi Vikas,

                    Example: if you client Oracle HOme is /app/oracle/product/11.2.0/client_1 you should set this path in TNS_ADMIN.
                    For doing that you should run TT_HOME/bin/ttModInstall utility.

                    If you want to use Cache Connect functionality you should set TNS_ADMIN variable in your Oracle Database client home.
                    • 7. Re: TimesTen Caching Newbie
                      780991
                      hi,

                      Thanks for the explanation I have set the TNS_ADMIN in eviornmet variable till /...../ client_1

                      but still giving same error


                      Thanks,
                      Vikas
                      • 8. Re: TimesTen Caching Newbie
                        634805
                        Could you post error output now please?

                        Command sqlplus CACHEADM/HIDDEN@PortalPu is working fine?

                        End trying set environment variable ORACLE_HOME (same as TNS_NAME value).

                        Could you post the path Oracle client home?
                        • 9. Re: TimesTen Caching Newbie
                          Chrisjenkins-Oracle
                          A couple of points:

                          1. The only Oracle client that you should use for TimesTen <-> Oracle connectivity is the 11.2.1 instantclient that is bundled and installed with TimesTen. use of other client versions is not supported and may not work correctly.

                          2. As well as correctly setting TNS_ADMIN in the user's environment you need to make sure it is correctly set in the TimesTen daemon's environment. You can check/change this by using the ttModINstall utility. If you change the value then you need to stop and start the TimesTen daemon for the changed value to take effect.

                          Please check/verify both these points and see if that fixes the issue.

                          Chris
                          • 10. Re: TimesTen Caching Newbie
                            780991
                            Hi Gennady,

                            error output after doing changes as u mentioned:
                            Command> call ttcacheuidpwdset ('cacheadm','cacheadm');
                            5220: Permanent Oracle connection failure error in OCIServerAttach(): ORA-12154
                            : TNS:could not resolve the connect identifier specified rc = -1
                            5935: Could not validate Oracle login: uid = CACHEADM, pwd = HIDDEN, OracleNetS
                            erviceName = PortalPu, TNS_ADMIN = "D:\TimesTen\IMDBDir;D:\Oracle\product\10.1.0
                            \Client_1\NETWORK\ADMIN", ORACLE_HOME= "D:\TimesTen\IMDBDir;D:\Oracle\product\10
                            .1.0\Client_1\NETWORK\ADMIN"
                            The command failed.




                            1. I am able to connect cacheadm/hidden@PortalPu using sqlplus.
                            2. setted ORACLE_HOME same as TNS_ADMIN = D:\TimesTen\IMDBDir;D:\Oracle\product\10.1.0\Client_1\NETWORK\ADMIN
                            3. oracle client home D:\Oracle\product\10.1.0\Client_1
                            • 11. Re: TimesTen Caching Newbie
                              634805
                              Hi Vikas,

                              Trying to set ORACLE_HOME = D:\Oracle\product\10.1.0\Client_1 and TNS_ADMIN = D:\Oracle\product\10.1.0\Client_1
                              • 12. Re: TimesTen Caching Newbie
                                Chrisjenkins-Oracle
                                You can't specify multiple locations in ORACLE_HOME or TNS_ADMIN. These must refer to just one location.

                                TNS_ADMIN should point to the directory where you have a tnsnames.ora file that defiens the servcie name that TimesTen will use to connect to Oracle (i.e. the same value as is specified for OracleNetServiceName in the datastore DSN definition.

                                ORACLE_HOME is not necessary for TimesTen and in general should not be set. If you do set it it should point to the 11g instant client installed with Timesten not to an older 10g client nor to an 11gR2 client.

                                Similarly, PATH and LD_LIBRARY path should only include the relevant directories from the 11g instant client installed with TimesTen.

                                Please check that the value for TNS_ADMIn that you set with ttModInstall (a) only specifiees one location and (b) is correctly present in the file <tt_install_dir>/info/ttendaemon.options.

                                Chris
                                • 13. Re: TimesTen Caching Newbie
                                  780991
                                  Hi Chris,

                                  What I have understood from Gennady's reply is that I have to install tt and oracle client independently, but from your reply it's like oracle client will get installed with timesten if its so then how i will be able to chkoracle 11.2.1 instanclient is installed on my machine ???


                                  TIA,
                                  Vikas
                                  • 14. Re: TimesTen Caching Newbie
                                    Chrisjenkins-Oracle
                                    Hi Vikas,

                                    If you are using TimesTen 7.0 or earlier then you should install a separate 10gR2 client and use that. Since 7.0 is very pold now and there is no reason why you would be using that I will assume that you are using TimesTen 11.2.1.

                                    For Timesten 11.2.1, there is a full installation of the oracle 11gR1 InstantClient bundled with, and installed automatically with, TimesTen. Please look in <tt_install_dir>/ttoracle_home/instantclient_11_1 and you will find it there.

                                    On one of my systems, I have TimesTen 11.2.1.7.0 installed in /timesten/TimesTen/tt1121 and I have a separate directory (/timesten/TimesTen/tnsadmin) to hold the tnsnames.ora file (as it is shared between multiple TimesTen installations). Here are my environment settings:

                                    TNS_ADMIN=/timesten/TimesTen/tnsadmin

                                    PATH=/timesten/TimesTen/tt1121/bin;/timesten/TimesTen/tt1121/plsql/bin;/timesten/TimesTen/tt1121/ttoracle_home/instantclient_11_1;/timesten/TimesTen/tt1121/ttoracle_home/instantclient_11_1/sdk;...

                                    LD_LIBRARY_PATH=/timesten/TimesTen/tt1121/lib;/timesten/TimesTen/tt1121/ttoracle_home/instantclient_11_1;...

                                    ORACLE_HOME is not set

                                    and in the file /timesten/TimesTen/tt1121/info/ttendaemon.options I have the setting:

                                    -tns_admin /timesten/TimesTen/tnsadmin

                                    which was set there by ttModInstall

                                    You need to check that you have things set equivalently, restart the TT daemon and then try again. If everything is set properly then it should work just fine. Be sure that you do not have any remnant of any other Oracle client installation in PATH, LD_LIBRARY_PATH etc . as this will in general cause problems.

                                    Chris
                                    1 2 3 4 Previous Next