Using 9iAS Database for BI Applications?

We have a 9205 Database that is serving as our data warehouse. I have created several servlets and java client classes using BI Beans and JDeveloper. I want to deploy them using 9i Application Server. The 9iAS install installs another database. Should I use the database that 9iAS installs instead of my pre-existing database, or keep using the 9205 warehouse and have two complete databases on the same machine?
Thanks

I have used HSQLDB for awhile. I have found it to be very useful, though I've mostly used it for simple, read-only databases. Definitely what I would recommend for your situation.

Similar Messages

  • Not sure if i should use a database for my application?

    Hi
    Not sure if i should post here or not..
    But my problem is that initially i planned to use a database to map my application logic so that it can keep information after the app shuts down and i would get it back the next session i open my app. My application is shared across netwrok therefore i thought it would make sense to use a database. I know i can use Serialization to keep state but that only does it for current location hence i opt to use a database.
    But now thinking back i'm not pretty sure afterall if i just have my app updating the database for no other use apart from using it to keep state from my app across network.
    So - do current software application out there use a database as a datasource alot? If so how are they using it?

    Interesting indeed..
    But saying this again: all my use of database is just mapping the application logic (model). So essentially it use is just like a backup.
    After reading that link you gave me: does that mean it is very common that most software system out there uses any database of some sort to store any information as small as smallest peice of information you get?

  • Using simple database for an application

    Hello,
    Here is my need :
    I will develop an application based on two or three gui-clients java based and a database (all on linux based system).
    What choice for the database ?
    First I had a look on javadb, I was interested by the easy to use aspect and the embedded mode. But I have two applications that have to access the database in the same time and javadb has to be used in a "framework server" to accept multi-user (and this seems to be too complex for my use).
    The database will be very simple (4 or 5 tables and 1000 lines in the biggest table) and has to be shared between 2 ou 3 apps.
    I had a look on SQLite but the use of JNI obstructs me.
    Do you have other ideas to answer to my need ? Is there a way to share the file system where the data files of javadb is (by NFS for example) ? And start two derby service using the same files in two different JVM ?
    Thanks for your help and advices.
    Jean

    I have used HSQLDB for awhile. I have found it to be very useful, though I've mostly used it for simple, read-only databases. Definitely what I would recommend for your situation.

  • I want to use Berkely database for my Dissertation

    Hello everyone,
    I am having some doubts regarding Berkely database. Actually, I am using this database for my project. The scenario of the project is, I have developed some business rules depending on the concept of Ripple Down Rules and represented the rules using Conceptual graphs. Now I want to store fire these business rules in to the Berkely database, so that my application can use these business rules from the Berkeley database.
    This is the context of my project. But, I am very new to this Berkely database. I have downloaded the Berkely database from the Oracle website and also installed it. The OS is am using is Windows XP SP2. Can anyone explain me how to store Conceptual graphs in a Berkely database.
    I am really a beginner to Berkely database. i don't even know what to do after installing the Berkely database. Please advise me about this.
    I would be very thankful to you.
    Cheers,
    Phani.

    Hi Phani,
    The simple answer is however you want. Berkeley DB doesn't put any constraints on how you store data in it. Its main purpose is to provide an efficient and scalable key/value storage and retrieval system, upon which you can build your own data storage system.
    More specifically, if you're representing graph data, the simplest way to do so is with the "edge list" paradigm. You could, for example, set up a pair of databases, one to store all your graph nodes (with associated metadata) and one for directed edges. I'm not sure what particular c structures you'll want to use for these, but I'd suggest using record numbers on both the nodes and the edges DBs, unless all your nodes have unique and meaningful names. I'd also allow duplicate records on your edges DB, and have a very simple record structure in it that simply maps from a source node id to a destination node it (the duplicates allow multiple edges from a given node.)
    If you have more specific constraints on your graph and algorithms you'd like to run on it, there are potentially more schemes you could use, such as the nested set representation for trees, and so on.
    Hope this helps,
    Daniel

  • When using Appleworks database for printing labels can I have columns of different widths?

    When using Appleworks database for printing labels can I have a column of different width?
    Case in point, the supplied avery labels in Appleworks does not have 8195. When I build one using custom design  I need a small column between column 2 and 3 to line up the info in columns 3 and 4. All the labels are 1.3/4 inch wide but I need to insert a column 1/4 wide to match up with the avery page....
    Any ideas???    
    Thanks......
    ---warren

    Well, the issue is that when you creat a custom width of 1.3/4 from the edge of the first label to the edge of label 2 all is good. The right and left margins were also set correct in AW. The Avery page, for some reason, has a small 1/4 inch column between the columns of label 2 and 3 therefore making the distance between the left edge of the label in column 2 and the right edge of the label in column 3 - a width of 2 inches and not 1.3/4.
    I guess Avery wanted the page to look even.
    I did this work around.....
    I created a custom lay out of 2 columns (not 4) with the correct width of 1.3/4 from label edge to label edge and the correct left side margin. After printing the first page I just turned the sheet 180 degress and printed the 2nd page to use all the labels on the Avery sheet. Since the upper and lower margin were the same it worked great....
    "Great minds think alike"...   thanks for your suggetion

  • Opensource database for Mobile application development

    hi.
    1. SQL CE is a database for mobile applications. Is there a similar opensource implementation available , i.e a database that i can port on my mobile application.
    2.If this is not the forum in which i must post such question ..pls let me know the link where in i should make such posts..
    Ur suggestions will be valuable..
    regards
    KARTIK

    hi.
    1. SQL CE is a database for mobile applications. Is
    there a similar opensource implementation available ,
    i.e a database that i can port on my mobile
    application.
    2.If this is not the forum in which i must post such
    question ..pls let me know the link where in i should
    make such posts..
    Ur suggestions will be valuable..
    regards
    KARTIKhttp://hsqldb.sourceforge.net/

  • Cannot use multiple database in my application

    I have written a C++/CLI wrapper for use berkeleydb without lost performance. This wrapper run perfectly with one database but when i open a second database ( i create a new instance of the wrapper ) the application crash.
    I have written a minimal pure C++ application that use the pure C++ classe of my wrapper, when a open and use only one database the code run perfectly but with two databases, the application be crazy.
    infos : compiler VC++ 2008, OS : Vista 32bit
    this the code of my berkeleydb class :
    #pragma comment (lib, "libdb47.lib")
    #if defined(WIN32) || defined(WIN64)
    #include <windows.h>
    #include <list>
    #endif
    #ifndef ParamsStructCpp
    #include "ParamsStruct.h"
    #endif
    #include <db_cxx.h>
    #include "BerkeleyMethods.h"
    using namespace std;
    using namespace stdext;
    // type
    //typedef list<ParamsStructCpp>::iterator it;
    typedef list<ParamsStructCpp> fetchbuffer;
    // Db objects
    Db * db; // Database object
    DbEnv env(0); // Environment for transaction
    u_int32_t oFlags = DB_CREATE|DB_AUTO_COMMIT|DB_READ_UNCOMMITTED; // Open flags; //
    u_int32_t env_oFlags = DB_CREATE |
    DB_THREAD |
                             DB_INIT_LOCK |
                             DB_INIT_LOG |
                             DB_INIT_MPOOL |
                             DB_INIT_TXN |
                             DB_MULTIVERSION; // Flags for environement
    // Constructeurs
    BerkeleyMethods::BerkeleyMethods()
    BerkeleyMethods::BerkeleyMethods(char * dbname, unsigned int db_cache_gbyte, unsigned int db_cache_size,
                        int db_cache_number, int db_type, char * dberr_file, char * envdir, unsigned int dbtxn_timeout,
                             unsigned int dbtxn_max)
         strcpy_s(this->db_name, strlen(_db_name)+1, dbname);
         this->db_cache_gbyte = db_cache_gbyte;
    this->db_cache_size = db_cache_size;
         this->db_cache_number = db_cache_number;
    this->db_type = db_type;
         this->db_txn_timeout = dbtxn_timeout;
         this->db_txn_max = dbtxn_max;
         strcpy_s(this->db_err_file, strlen(_db_err_file)+1, dberr_file);
         strcpy_s(this->env_dir, strlen(_env_dir)+1, envdir);
         this->Set_restoremode(false);
    // ==========
    // Fonctions
    // http://www.codeproject.com/KB/string/UtfConverter.aspx
    bool BerkeleyMethods::OpenDatabase()
         try
              std::cout << "Dbname " << this->db_name << std::endl;
              if (strlen(this->db_name) < 2) {
    throw new std::exception("Database name is unset");
              // Set database cache
              env.set_cachesize(this->db_cache_gbyte, this->db_cache_size, this->db_cache_number);
              // Set transaction timeout
              if (this->db_txn_timeout > 0) {
                   env.set_timeout(this->db_txn_timeout, DB_SET_TXN_TIMEOUT);
    // Set max opened transactions
              if (this->db_txn_max > 0) {
                   env.set_tx_max(this->db_txn_max);
              // Dupplicate key support;
              if (this->Get_dup_support()) {
    env_oFlags = env_oFlags|DB_DUPSORT;
              // Deadlokcs gesture
              env.set_lk_detect(DB_LOCK_MINWRITE);
    // Set the error file
              env.set_errfile(fopen(this->db_err_file, "w+"));
    // Error prefix
              env.set_errpfx("Error > ");
              // Open environement
              env.open(this->env_dir, env_oFlags, 0);
              // Create database object
              db = new Db(&env, 0);
              // Open the database
              switch(this->db_type)
              case 1:
                   db->open(NULL, this->db_name, NULL, DB_BTREE, oFlags, 0);
                   break;
              case 2:
                   db->open(NULL, this->db_name, NULL, DB_HASH, oFlags, 0);
                   break;
              case 3:
                   db->open(NULL, this->db_name, NULL, DB_QUEUE, oFlags, 0);
                   break;
              case 4:
                   db->open(NULL, this->db_name, NULL, DB_RECNO, oFlags, 0);
                   break;
              default:
                   throw new std::exception("Database name is unset");
                   break;
              u_int32_t gbcacheSize = 0;
    u_int32_t bytecacheSize=0;
    int ncache=0;
    env.get_cachesize(&gbcacheSize,&bytecacheSize,&ncache);
    std::cerr << "Taille du cache est:" << gbcacheSize << "Go plus " << bytecacheSize << " octets." << std::endl;
    std::cerr << "Number of caches : " << ncache << std::endl;
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
         catch(std::exception &e)
              std::cout << e.what() << std::endl;
         return false;
    bool BerkeleyMethods::CloseDatabase()
         try
              db->close(0);
              env.close(0);
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
         catch(std::exception &e)
              std::cout << e.what() << std::endl;
         return false;
    bool BerkeleyMethods::AddData(char * key, unsigned long int value)
         if (this->Get_restoremode())
              return false;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
              // Set datas
    Dbt _key(key, strlen(key)+1);
    Dbt _value(&value, sizeof(unsigned long int));
              env.txn_checkpoint(512, 2, 0);
              int exist = db->put(txn, &_key, &_value, DB_NOOVERWRITE);
              if (exist == DB_KEYEXIST) {
                   std::cout << "This record already exist" << std::endl;
              txn->commit(0);
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              std::cout << "Error" << std::endl;
              txn->abort();
         return false;
    bool BerkeleyMethods::AddData(unsigned long int key, char * value)
         if (this->Get_restoremode())
              return false;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
    Dbt _key(&key, sizeof(unsigned long int));
              Dbt _value(value, strlen(value)+1);
              env.txn_checkpoint(512, 2, 0);
              int exist = db->put(txn, &_key, &_value, DB_NOOVERWRITE);
              if (exist == DB_KEYEXIST) {
                   std::cout << "This record already exist" << std::endl;
              txn->commit(0);     
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    bool BerkeleyMethods::AddData(char * key, char * value)
         if (this->Get_restoremode())
              return false;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
    Dbt _key(key, strlen(key)+1);
              Dbt _value(value, strlen(value)+1);
              env.txn_checkpoint(512, 2, 0);
              int exist = db->put(txn, &_key, &_value, DB_NOOVERWRITE);
              if (exist == DB_KEYEXIST) {
                   std::cout << "This record already exist" << std::endl;
              txn->commit(0);     
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    bool BerkeleyMethods::AddData(unsigned long int key, unsigned long int value)
         if (this->Get_restoremode())
              return false;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
    Dbt _key(&key, sizeof(unsigned long int));
              Dbt _value(&value, sizeof(unsigned long int));
              env.txn_checkpoint(512, 2, 0);
              int exist = db->put(txn, &_key, &_value, DB_NOOVERWRITE);
              if (exist == DB_KEYEXIST) {
                   std::cout << "This record already exist" << std::endl;
              txn->commit(0);     
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    bool BerkeleyMethods::AddData(char * key, ParamsStructCpp value)
         if (this->Get_restoremode())
              return false;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
    Dbt _key(key, strlen(key)+1);
              Dbt _value(&value, sizeof(ParamsStructCpp));
              env.txn_checkpoint(512, 2, 0);
              int exist = db->put(txn, &_key, &_value, DB_NOOVERWRITE);
              if (exist == DB_KEYEXIST) {
                   std::cout << "This record already exist" << std::endl;
              txn->commit(0);     
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    bool BerkeleyMethods::AddData(unsigned long int key, struct ParamsStructCpp value)
         if (this->Get_restoremode())
              return false;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
    Dbt _key(&key, sizeof(unsigned long int));
              Dbt _value(&value, sizeof(ParamsStructCpp));
              env.txn_checkpoint(512, 2, 0);
              int exist = db->put(txn, &_key, &_value, DB_NOOVERWRITE);
              if (exist == DB_KEYEXIST) {
                   std::cout << "This record already exist" << std::endl;
              txn->commit(0);     
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    bool BerkeleyMethods::Exist(unsigned long int key)
         if (this->Get_restoremode())
              return true;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, DB_TXN_SNAPSHOT); // Bebin transaction
    Dbt _key(&key, sizeof(unsigned long int));
              int state = db->exists(txn, &_key, DB_READ_COMMITTED);
              txn->commit(0);
              if (state == 0) {
                   return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    bool BerkeleyMethods::Exist(char * key)
         if (this->Get_restoremode())
              return true;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, DB_TXN_SNAPSHOT); // Bebin transaction
              Dbt _key(key, strlen(key)+1);
              int state = db->exists(txn, &_key,DB_READ_COMMITTED);
              txn->commit(0);
              if (state == 0) {
                   return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    void BerkeleyMethods::GetData (char * pData, int nbr, unsigned long int key)
         if (this->Get_restoremode())
              return;
         DbTxn * txn;
         Dbc *dbcp;
         try
    env.txn_begin(NULL, &txn, DB_TXN_SNAPSHOT); // Bebin transaction
              db->cursor(txn, &dbcp, 0);
              Dbt _key;
              Dbt data;
              key.setdata(&key);
              key.setsize(sizeof(unsigned long int));
              dbcp->get(&_key, &data, DB_FIRST);
              char * temp = (char *)data.get_data();
    strcpy_s(pData, strlen(temp)+1, temp);
              dbcp->close();
              txn->commit(0);
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              if (dbcp != NULL)
                   dbcp->close();
              if (txn != NULL)
                   txn->abort();
         catch(...)
              if (dbcp != NULL)
                   dbcp->close();
              if (txn != NULL)
                   txn->abort();
    unsigned long int BerkeleyMethods::GetData(char * key)
         if (this->Get_restoremode())
              return 0;
         DbTxn * txn;
         Dbc *dbcp;
         try
    env.txn_begin(NULL, &txn, DB_TXN_SNAPSHOT); // Bebin transaction
              db->cursor(txn, &dbcp, 0);
    Dbt _key;
              Dbt data;
              key.setdata(key);
              key.setulen(strlen(key)+1);
              dbcp->get(&_key, &data, DB_FIRST);
    unsigned long int xdata = *((unsigned long int *)data.get_data());
              dbcp->close();
              txn->commit(0);
              return xdata;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              dbcp->close();
              txn->abort();
         catch(...)
              dbcp->close();
              txn->abort();
         return 0;
    ParamsStructCpp * BerkeleyMethods::GetData(unsigned long int key, bool null)
         if (this->Get_restoremode()) {
              return new ParamsStructCpp();
         DbTxn * txn;
         Dbc *dbcp;
         try
    env.txn_begin(NULL, &txn, DB_TXN_SNAPSHOT); // Bebin transaction
              db->cursor(txn, &dbcp, 0);
              Dbt _key;
              Dbt data;
              key.setdata(&key);
              key.setsize(sizeof(unsigned long int));
    dbcp->get(&_key, &data, DB_FIRST);
              ParamsStructCpp * temp = (ParamsStructCpp *)data.get_data();
              dbcp->close();
              txn->commit(0);
              return temp;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              dbcp->close();
              txn->abort();
         catch(...)
              dbcp->close();
              txn->abort();
         return new ParamsStructCpp();
    ParamsStructCpp * BerkeleyMethods::GetData(char * key, bool null)
         if (this->Get_restoremode()) {
              return new ParamsStructCpp();
         DbTxn * txn;
         Dbc *dbcp;
         try
    env.txn_begin(NULL, &txn, DB_TXN_SNAPSHOT); // Bebin transaction
              db->cursor(txn, &dbcp, 0);
    Dbt _key;
              Dbt data;
              key.setdata(key);
              key.setulen(strlen(key)+1);
              dbcp->get(&_key, &data, DB_FIRST);
    ParamsStructCpp * xdata = (ParamsStructCpp *)data.get_data();
              dbcp->close();
              txn->commit(0);
              return xdata;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              dbcp->close();
              txn->abort();
         catch(...)
              dbcp->close();
              txn->abort();
         return new ParamsStructCpp();
    list<ParamsStruct> BerkeleyMethods::FetchAllDatabase ()
         list<ParamsStruct> temp;
         Dbc *dbcp;
         try
              db->cursor(NULL, &dbcp, 0);
    Dbt _key;
              Dbt data;
    while(dbcp->get(&_key, &data, DB_NEXT))
                   unsigned long int key = *((unsigned long int *)_key.get_data());
                   char * datetime = (char *)data.get_data();
                   ParamsStruct p;
                   strcpy_s(p.lastaccess, strlen(datetime)+1, datetime);
                   p.downloaded
                   temp.push_back(
                   //temp.insert(Tuple(datetime, key));
         catch(DbException &e)
              std::cout << e.what() << std::endl;
         catch(...)
         return temp;
    bool BerkeleyMethods::DeleteData(unsigned long int key)
         if (this->Get_restoremode())
              return true;
         DbTxn * txn;
         try
              env.txn_checkpoint(128, 1, 0);
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
    Dbt _key;
              key.setdata(&key);
              key.setsize(sizeof(unsigned long int));
              db->del(txn, &_key, 0);
              txn->commit(0);
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;;
    bool BerkeleyMethods::DeleteData(char * key)
         if (this->Get_restoremode())
              return true;
         DbTxn * txn;
         try
              env.txn_begin(NULL, &txn, 0); // Bebin transaction
    Dbt _key;
              key.setdata(key);
              key.setulen(strlen(key)+1);
              db->del(txn, &_key, 0);
              txn->commit(0);
              return true;
         catch(DbException &e)
              std::cout << e.what() << std::endl;
              txn->abort();
         catch(...)
              txn->abort();
         return false;
    int BerkeleyMethods::Sync()
         if (this->Get_restoremode())
              return -1;
         try
              return db->sync(0);
         catch(...)
    return -1;
    int BerkeleyMethods::Count()
         if (this->Get_restoremode())
              return -1;
         Dbc *dbcp;
         int count = 0;
         try
    Dbt key;
              Dbt data;
              db->cursor(NULL, &dbcp, 0);
              while (dbcp->get(&key, &data, DB_NEXT) == 0) {
    count++;
              dbcp->close();
              return count;
         catch(...)
    return -1;
    BerkeleyMethods::~BerkeleyMethods()
         if (db) {
         db->sync(0);
    db->close(0);
         env.close(0);
    =====
    The code the use this class :
         BerkeleyMethods db("test.db", 0, 524288000, 1, 1, "log.txt", "./Env_dir", 1000000 * 5, 600000);
                   BerkeleyMethods db1("test2.db", 0, 524288000, 1, 1, "log2.txt", "./Env_dir2", 1000000 * 5, 600000);
    bool z = db.OpenDatabase();
    db1.OpenDatabase();
    if (z)
                        std::cout << "Base de données ouverte" << std::endl;
                   for (unsigned int i = 0; i < 1000; i++)
                        ParamsStructCpp p = { 10, "02/08/2008 14:46:23", 789 };
                   bool a = db.AddData(i, p);
                        db1.AddData(i, p);
    if (a)
                        std::cout << "Ajout de données ok" << std::endl;
                   for (unsigned int i = 0; i < 1000; i++)
                        ParamsStructCpp * c = db.GetData(i, false);
                        ParamsStructCpp * c1 = db1.GetData(i, false);
                        std::cout << "Donné récupéré " << c->downloaded << " : " << c->lastaccess << " : " << c->waittime << std::endl;
                        std::cout << "Donné récupéré " << c1->downloaded << " : " << c1->lastaccess << " : " << c1->waittime << std::endl;
    / ====
    The application output show that when using two database the data is not correctly set. It seems that db and db1 is the same object :|.
    For example in db i insert a key => toto with value 4, and in db1 i insert the same value nomaly have no problem. But berkeleydb say the the key toto in db1 already exist while not
    I don't understand.
    NB : sorry for my english

    Michael Cahill wrote:
    As a side note, it is unlikely that you want both
    DB_READ_UNCOMMITTED and DB_MULTIVERSION to be set.
    This combination pays a price during updates for
    maintaining multiple versions, but still requires
    (short term) locks to be held during reads. The BDB/XML Transaction Processing Guide states the following:
    [...]in addition to BDB XML's normal degrees of isolation, you can also use snapshot isolation. This allows you to avoid the read locks that serializable isolation requires.
    http://www.oracle.com/technology/documentation/berkeley-db/xml/gsg_xml_txn/cxx/isolation.html
    This seems to contradict what you're saying here.
    Is there a general guideline on whether or not to use MVCC together with a relaxed isolation degree like DB_READ_UNCOMMITTED? Should the statement in the BDB/XML TP Guide rather have "as an alternative to" instead of "in addition to"?
    Michael Ludwig

  • How can I use two database in an application?

    When I use two database like CloudscapeDB and TestDB in J2EE1.3.1, I always get some exceptions, which is unknow source about one of them.I am doing a CMP entity bean application. Can someone tell how to set up the environment and what is problem about the exceptions I met?
    Thanks.

    Hi,
    The basics for using the two databases is simple.
    For database configuration you have to provide the driver class name, url, schema name and password during the creation of the connection pools. So u can create a as many no. of connection pools as the no. of the databases.
    Hope it will work..

  • Use sql notification for console application C#

    I have developed ucma C# console application which sends IM  to users. 
    Now I want to send IM if any new entry is added in the table 
    So i want to use query notification .
    I have enabled service broker on my database .
    And I have added code for sqldepedency  in my code file.
    as follows.
    public static void Main(string[] args)
    UCMASampleInstantMessagingCall ucmaSampleInstantMessagingCall =
    new UCMASampleInstantMessagingCall();
    ucmaSampleInstantMessagingCall.connectionfunction();
    public void connectionfunction()
    string connectionString = @"Data Source=PIXEL-IHANNAH2\PPINSTANCE;User ID=sqlPPUser;Password=ppuser1;Initial Catalog=Ian;";
    SqlDependency.Stop(connectionString);
    SqlConnection sqlConnection = new SqlConnection(connectionString);
    string statement = "select * from dbo.tblTest";
    SqlCommand sqlCommand = new SqlCommand(statement, sqlConnection);
    // Create and bind the SqlDependency object to the command object.
    SqlDependency dependency = new SqlDependency(sqlCommand, null, 0);
    SqlDependency.Start(connectionString);
    dependency.OnChange += new OnChangeEventHandler(dependency_OnChange);
    private void dependency_OnChange(object sender, SqlNotificationEventArgs e)
    ucmaSampleInstantMessagingCall.run()
    private void Run() { // Initialize and startup the platform. Exception ex = null; try { // Create the UserEndpoint _helper = new UCMASampleHelper(); _userendpoint = _helper.CreateEstablishedUserEndpoint();
    Now I want to run this application in the background , so f any new entry is added it will notify my C# application and call run function.
    i tried above code but it was not working.
    Sample code is avaliableon net but it is for form application and we can see output if we run the form application .
    so if i want to run my C# application what should I do?

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Configuration;
    using System.Security.Principal;
    using System.Security.Cryptography.X509Certificates;
    using System.Net;
    using System.Threading;
    using System.Diagnostics;
    using Microsoft.Rtc.Collaboration;
    using Microsoft.Rtc.Signaling;
    using System.Runtime.InteropServices;
    //using Microsoft.Rtc.Collaboration.Sample.Common;
    namespace UserPresence
    class UCMASampleInstantMessagingCall
    #region Locals
    // The information for the conversation and the far end participant.
    // Subject of the conversation; will appear in the center of the title bar of the
    // conversation window if Microsoft Lync is the far end client.
    private static String _conversationSubject = "The Microsoft Lync Server!";
    // Priority of the conversation will appear in the left corner of the title bar of the
    // conversation window if Microsoft Lync is the far end client.
    private static String _conversationPriority = ConversationPriority.Urgent;
    // The Instant Message that will be sent to the far end.
    private static String _messageToSend = "Hello World! I am a bot, and will echo whatever you type. " +
    "Please send 'bye' to end this application.";
    private InstantMessagingCall _instantMessaging;
    private InstantMessagingFlow _instantMessagingFlow;
    //private ApplicationEndpoint _applicationEndpoint;
    private UserEndpoint _userendpoint;
    private UCMASampleHelper _helper;
    private static SqlDependency dependency;
    private static string connectionString = @"Data Source=MyServer;Initial Catalog=MyDatabase;Integrated Security=SSPI";
    // Event to notify application main thread on completion of the sample.
    private AutoResetEvent _sampleCompletedEvent = new AutoResetEvent(false);
    #endregion
    #region Methods
    /// <summary>
    /// Instantiate and run the InstantMessagingCall quickstart.
    /// </summary>
    /// <param name="args">unused</param>
    //private string _helper;
    //UCMASampleHelper _helper = new UCMASampleHelper();
    public static void Main(string[] args)
    UCMASampleInstantMessagingCall ucmaSampleInstantMessagingCall =
    new UCMASampleInstantMessagingCall();
    var connection = new SqlConnection(connectionString);
    SqlDependency.Start(connectionString);
    SqlConnection connection = new SqlConnection(connectionString);
    connection.Open();
    SqlCommand command = new SqlCommand(
    "select col1 from dbo.tblTest",
    connection);
    // Create a dependency (class member) and associate it with the command.
    dependency = new SqlDependency(command, null, 5);
    // Subscribe to the SqlDependency event.
    dependency.OnChange += new OnChangeEventHandler(onDependencyChange);
    // start dependency listener
    SqlDependency.Start(connectionString);
    //ucmaSampleInstantMessagingCall.Run();
    private static void onDependencyChange(Object o, SqlNotificationEventArgs args)
    run();
    private void Run()
    // Initialize and startup the platform.
    Exception ex = null;
    try
    // Create the UserEndpoint
    _helper = new UCMASampleHelper();
    _userendpoint = _helper.CreateEstablishedUserEndpoint();
    Console.Write("The User Endpoint owned by URI: ");
    Console.Write(_userendpoint.OwnerUri);
    Console.WriteLine(" is now established and registered.");
    List<string> _Users = new List<string>();
    _Users.Add("sip:[email protected]");
    _Users.Add("sip:[email protected]");
    foreach (string useruri in _Users)
    // Setup the conversation and place the call.
    ConversationSettings convSettings = new ConversationSettings();
    convSettings.Priority = _conversationPriority;
    convSettings.Subject = _conversationSubject;
    // Conversation represents a collection of modes of communication
    // (media types)in the context of a dialog with one or multiple
    // callees.
    //Convers conver =new ConversationParticipant
    Conversation conversation = new Conversation(_userendpoint, convSettings);
    InstantMessagingCall _instantMessaging = new InstantMessagingCall(conversation);
    // Call: StateChanged: Only hooked up for logging. Generally,
    // this can be used to surface changes in Call state to the UI
    _instantMessaging.StateChanged += this.InstantMessagingCall_StateChanged;
    // Subscribe for the flow created event; the flow will be used to
    // send the media (here, IM).
    // Ultimately, as a part of the callback, the messages will be
    // sent/received.
    _instantMessaging.InstantMessagingFlowConfigurationRequested +=
    this.InstantMessagingCall_FlowConfigurationRequested;
    // Get the sip address of the far end user to communicate with.
    //String _calledParty = "sip:" +
    // UCMASampleHelper.PromptUser(
    // "Enter the URI of the user logged onto Microsoft Lync, in the User@Host format => ",
    // "RemoteUserURI");
    // Place the call to the remote party, without specifying any
    // custom options. Please note that the conversation subject
    // overrides the toast message, so if you want to see the toast
    // message, please set the conversation subject to null.
    // _instantMessaging.Conversation()
    _instantMessaging.BeginEstablish(useruri, new ToastMessage("Hello Toast"), null,
    CallEstablishCompleted, _instantMessaging);
    catch (InvalidOperationException iOpEx)
    // Invalid Operation Exception may be thrown if the data provided
    // to the BeginXXX methods was invalid/malformed.
    // TODO (Left to the reader): Write actual handling code here.
    ex = iOpEx;
    finally
    if (ex != null)
    // If the action threw an exception, terminate the sample,
    // and print the exception to the console.
    // TODO (Left to the reader): Write actual handling code here.
    Console.WriteLine(ex.ToString());
    Console.WriteLine("Shutting down platform due to error");
    _helper.ShutdownPlatform();
    // Wait for sample to complete
    _sampleCompletedEvent.WaitOne();
    // Just to record the state transitions in the console.
    void InstantMessagingCall_StateChanged(object sender, CallStateChangedEventArgs e)
    Console.WriteLine("Call has changed state. The previous call state was: " + e.PreviousState +
    "and the current state is: " + e.State);
    // Flow created indicates that there is a flow present to begin media
    // operations with, and that it is no longer null.
    public void InstantMessagingCall_FlowConfigurationRequested(object sender,
    InstantMessagingFlowConfigurationRequestedEventArgs e)
    Console.WriteLine("Flow Created.");
    _instantMessagingFlow = e.Flow;
    // Now that the flow is non-null, bind the event handlers for State
    // Changed and Message Received. When the flow goes active,
    // (as indicated by the state changed event) the program will send
    // the IM in the event handler.
    _instantMessagingFlow.StateChanged += this.InstantMessagingFlow_StateChanged;
    // Message Received is the event used to indicate that a message has
    // been received from the far end.
    _instantMessagingFlow.MessageReceived += this.InstantMessagingFlow_MessageReceived;
    // Also, here is a good place to bind to the
    // InstantMessagingFlow.RemoteComposingStateChanged event to receive
    // typing notifications of the far end user.
    _instantMessagingFlow.RemoteComposingStateChanged +=
    this.InstantMessagingFlow_RemoteComposingStateChanged;
    private void InstantMessagingFlow_StateChanged(object sender, MediaFlowStateChangedEventArgs e)
    Console.WriteLine("Flow state changed from " + e.PreviousState + " to " + e.State);
    // When flow is active, media operations (here, sending an IM)
    // may begin.
    if (e.State == MediaFlowState.Active)
    // Send the message on the InstantMessagingFlow.
    _instantMessagingFlow.BeginSendInstantMessage(_messageToSend, SendMessageCompleted,
    _instantMessagingFlow);
    private void InstantMessagingFlow_RemoteComposingStateChanged(object sender,
    ComposingStateChangedEventArgs e)
    // Prints the typing notifications of the far end user.
    Console.WriteLine("Participant "
    + e.Participant.Uri.ToString()
    + " is "
    + e.ComposingState.ToString()
    private void InstantMessagingFlow_MessageReceived(object sender, InstantMessageReceivedEventArgs e)
    // On an incoming Instant Message, print the contents to the console.
    Console.WriteLine(e.Sender.Uri + " said: " + e.TextBody);
    // Shutdown if the far end tells us to.
    if (e.TextBody.Equals("bye", StringComparison.OrdinalIgnoreCase))
    // Shutting down the platform will terminate all attached objects.
    // If this was a production application, it would tear down the
    // Call/Conversation, rather than terminating the entire platform.
    _instantMessagingFlow.BeginSendInstantMessage("Shutting Down...", SendMessageCompleted,
    _instantMessagingFlow);
    _helper.ShutdownPlatform();
    _sampleCompletedEvent.Set();
    else
    // Echo the instant message back to the far end (the sender of
    // the instant message).
    // Change the composing state of the local end user while sending messages to the far end.
    // A delay is introduced purposely to demonstrate the typing notification displayed by the
    // far end client; otherwise the notification will not last long enough to notice.
    _instantMessagingFlow.LocalComposingState = ComposingState.Composing;
    Thread.Sleep(2000);
    //Echo the message with an "Echo" prefix.
    _instantMessagingFlow.BeginSendInstantMessage("Echo: " + e.TextBody, SendMessageCompleted,
    _instantMessagingFlow);
    private void CallEstablishCompleted(IAsyncResult result)
    InstantMessagingCall instantMessagingCall = result.AsyncState as InstantMessagingCall;
    Exception ex = null;
    try
    instantMessagingCall.EndEstablish(result);
    Console.WriteLine("The call is now in the established state.");
    catch (OperationFailureException opFailEx)
    // OperationFailureException: Indicates failure to connect the
    // call to the remote party.
    // TODO (Left to the reader): Write real error handling code.
    ex = opFailEx;
    catch (RealTimeException rte)
    // Other errors may cause other RealTimeExceptions to be thrown.
    // TODO (Left to the reader): Write real error handling code.
    ex = rte;
    finally
    if (ex != null)
    // If the action threw an exception, terminate the sample,
    // and print the exception to the console.
    // TODO (Left to the reader): Write real error handling code.
    Console.WriteLine(ex.ToString());
    Console.WriteLine("Shutting down platform due to error");
    _helper.ShutdownPlatform();
    private void SendMessageCompleted(IAsyncResult result)
    InstantMessagingFlow instantMessagingFlow = result.AsyncState as InstantMessagingFlow;
    Exception ex = null;
    try
    instantMessagingFlow.EndSendInstantMessage(result);
    Console.WriteLine("The message has been sent.");
    catch (OperationTimeoutException opTimeEx)
    // OperationFailureException: Indicates failure to connect the
    // IM to the remote party due to timeout (called party failed to
    // respond within the expected time).
    // TODO (Left to the reader): Write real error handling code.
    ex = opTimeEx;
    catch (RealTimeException rte)
    // Other errors may cause other RealTimeExceptions to be thrown.
    // TODO (Left to the reader): Write real error handling code.
    ex = rte;
    finally
    // Reset the composing state of the local end user so that the typing notifcation as seen
    // by the far end client disappears.
    _instantMessagingFlow.LocalComposingState = ComposingState.Idle;
    if (ex != null)
    // If the action threw an exception, terminate the sample,
    // and print the exception to the console.
    // TODO (Left to the reader): Write real error handling code.
    Console.WriteLine(ex.ToString());
    Console.WriteLine("Shutting down platform due to error");
    _helper.ShutdownPlatform();
    #endregion
    So i want to call run method when new entry is added in the database . and this application is not like any asp.net form application . In form application we display data when programs loads as like your RefreshDataWithSqlDependency
    function . But in my application my application will run (send IM) when any new entry is added in the database . As I need running application to achieve notification , what kind of changes are required?

  • Use Redis Cache for Multiple Applications

    Hi,
    I did some searches and could not come up with a straight forward answer so I am hoping someone here can clarify this for me.
    We have two different products that we have built in .NET that we host in Azure as websites. For each of these two products we have multiple clients. Each product and client pair has its own SQL database and its own website setup in Azure.
    We would like to start using Redis Cache for the session of these products. Do I need to:
    1) Create 1 Redis Cache and use it for all clients / products?
    2) Create 2 Redis Caches and use one per product (redis caches needed = # of products)?
    3) Create an individual Redis cache for each client / product pair (redis caches needed = # of products x # of clients)?

    You can do either of the above. It would really depend on how much load are you expecting on the Cache
    For separation and load balancing it might be better to have a Cache per Website
    For a Cache to be useful it should be closer to the Web tier, so ensure that you provision the Cache in the same region as the Website.

  • How can i use a database for practice in DOS

    i have some problems in the sqlplus.
    My OS is windows2000 server,when i intalled the Oracle 8i
    i type a command 'cmd' go to DOS.and type "sqlplus username/password@database"
    but always the system say that my database name can't be deal with.
    and i want to get a sample database for training SQL statements.How can i get it.
    is Oracle 8i have the sample database.

    It sounds like your database hasn't been started yet so do this:
    Try typing svrmgrl at the c:> -- if it doesn't work you might either have to go to the proper directory or type sqlplus to get an sql:> prompt (I don't remember it's been a while) but the rest I am pretty sure about---
    When you get the svrmgr prompt:
    use (i think) "connect internal"
    and "oracle or Oracle" as password
    once you do this
    it should say connected
    then use: svrmgr:>shutdown -- shutsdown DB
    then use: svrmgr:>startup -- starts DB
    hopefully then you can access your database through SQL Plus

  • Install Boot Camp/OS X on SSD disk, use internal harddrive for storing applications for Boot Camp

    Hello everyone!
    I have a SSD drive that I have installed Yosemite on and have the following question:
    I have an iMac with an external SSD disk on 250 GB that I have connected in a thunderbolt enclosure and have an internal hard drive on 500 GB SATA drive.
    First I wonder if it's possible to have a dual boot on OS X and Boot Camp on my SSD disk?
    But here comes the tricky part. I want to have my internal hard drive (500 GB) on my iMac to use some sharing to Windows.
    So my idea is just boot to Boot Camp and use my internal hard drive, that I want to partition to two parts (one partition for OS X and one partition for Windows) to have the applications (like games/user applications) installed on so I don't fill up my SSD drive with all that data. I just want to have the SSD disk to boot in and use the speed for the Boot Camp system.
    I also have file vault activated on Yosemite and want to have encryption activated on both volumes (OS X/ Boot Camp) so it's secured.
    So is this idea possible to do or do I need to have all the user applications / games installed directly to my Boot Camp partition?
    Sorry for my grammar, hope you understand what I want to do. If not I will try to explain better and more detailed if needed.
    Thanks so much in advanced!

    Trendchaser wrote:
    Hello everyone!
    I have a SSD drive that I have installed Yosemite on and have the following question:
    I have an iMac with an external SSD disk on 250 GB that I have connected in a thunderbolt enclosure and have an internal hard drive on 500 GB SATA drive.
    First I wonder if it's possible to have a dual boot on OS X and Boot Camp on my SSD disk?
    Please see http://bleeptobleep.blogspot.com/2013/02/mac-install-windows-7-or-8-on-external. html for installing on an external Thunderbolt disk.
    But here comes the tricky part. I want to have my internal hard drive (500 GB) on my iMac to use some sharing to Windows.
    So my idea is just boot to Boot Camp and use my internal hard drive, that I want to partition to two parts (one partition for OS X and one partition for Windows) to have the applications (like games/user applications) installed on so I don't fill up my SSD drive with all that data. I just want to have the SSD disk to boot in and use the speed for the Boot Camp system.
    You can create a FAT/exFAT partition via Disk Utility on the 500GB SATA disk. After Windows is installed, format this partition to NTFS from Windows, and use it as Windows D: (or appropriate drive letter depending on your environment) and install Games/Applications. Be careful with the read-only HFS partitions which get drive letters assigned automatically. This partition cannot be resized using Windows tools or OSX Disk tools.
    I also have file vault activated on Yosemite and want to have encryption activated on both volumes (OS X/ Boot Camp) so it's secured.
    FV2 (and any other CoreStorage volumes) are unreadable in Windows. Only HFS+ volumes are supported by the Apple read-only HFS driver provided by BC drivers. Windows volumes require BitLocker encryption, FV2 cannot be used for such volumes.

  • How can i use this color for my Application Background ?? Screen Shot Attached

    Hi ,
    I can find only plain colors on to Color Picker , but this is line mixed color
    How can use this attached Color for my Applications Background Color .
    Please find the Screen Shot attached .
    please see the background  color

    Are you trying to apply a gradient background?
    In Flex 3 in Application tag:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      backgroundColor="#666666"
      backgroundGradientColors="[#333333, #666666]">
    </mx:Application>
    In Flex 4 you need to set the backgroundColor and apply a skin for the gradient:
    -------------- mySkins/MyAppSkin.mxml -------------
    <?xml version="1.0" encoding="utf-8"?>
    <!-- containers\application\mySkins\MyAppSkin.mxml -->
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            xmlns:s="library://ns.adobe.com/flex/spark">
      <fx:Metadata>
        [HostComponent("spark.components.Application")]
      </fx:Metadata>
      <s:states>
        <s:State name="normal" />
        <s:State name="disabled" />
      </s:states>
      <!-- fill -->
      <s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
        <s:fill>
          <s:LinearGradient rotation="90">
            <s:entries>
              <s:GradientEntry color="0x333333" ratio="0" alpha="1"/>
              <s:GradientEntry color="0x666666" ratio=".66" alpha="1"/>
            </s:entries>
          </s:LinearGradient>      
        </s:fill>
      </s:Rect>
      <s:Group id="contentGroup" left="10" right="10" top="10" bottom="10">
        <s:layout>
          <s:VerticalLayout/>
        </s:layout>
      </s:Group> 
    </s:Skin>
    -------------- test.mxml -------------
    <?xml version="1.0"?>
    <!-- controls\button\PopUpButtonMenu.mxml -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   height="100%" width="100%">
      <s:SkinnableContainer skinClass="mySkins.MyAppSkin"
        width="100%" height="100%"/>
    </s:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.chikaradev.com
    Adobe Flex Development and Support Services

  • How can i use diffrent database for same file in same project?

    I want to use two database. First normal environment, second for budget. Second copy from first environment. For example 1. database name = "MRP" , 2. database name = "MRPBUDGET".When program is start, users can select database. My question how can i use which selected database name in program.
    Thanks a lot for your help,

    Hi giri,
    I test it. When i change
    cocukRowSet.setDataSourceName("java:comp/env/jdbc/mysql_dogum");
    cocukRowSet.setDataSourceName("java:comp/env/jdbc/mysql_dogum1");
    in SessionBean1.java
    i run it. But this page of project is open explorer it didn't change sun-web.xml and web.xml in projetct directory(line
    <resource-ref>
    <res-ref-name>jdbc/mysql_dogum</res-ref-name>
    <jndi-name>jdbc/mysql_dogum</jndi-name>
    </resource-ref>
    When i close this page of project from explorer , i clean and build project and then find in project "dogum1", i saw true value in sun-web.xml and web.xml. Project is running true.
    How can i change xml file when project running. Can i use drop down list for database name(which change run time)
    Thanks,

  • Can Numbers be used as database for a collection?

    Can Numbers be designed to make a database for a library of books? I have a large collection of old sheet music. The records would include keywords, comments, publication date, composer, illustrator, publisher, value, condition, purchase date -- and a scanned image of the cover artwork.

    Hi Bonita,
    I think you could use Numbers for your database. It doesn't work well as a container for graphics though. I would suggest that you keep your scanned artwork on a web service such as Dropbox so that you can record the URL in Numbers and keep the actual graphics storage on a server. The reason for this is that Numbers can't reference a file stored locally, and Numbers becomes sluggish if the graphics are stored within the document.
    When you build a database in Numbers, each row is a "record", or separate item, and each column is an particular attribute; your keywords, comments, publication date, composer, illustrator, publisher, value, condition and purchase date.
    Jerry

Maybe you are looking for