Max use of database

Hi,
how i can know the max number of session connected to database?
and transaccion x seconds?
read and write to disc x sec ?
thanks to all
Pippo

Hi,
>>how i can know the max number of session connected to database?
I'm not sure if this below is that you want, but Oracle 10g database keeps the usage statistics of various database attributes at its highest usage point. Information includes the size of the largest segment, the number of tables, the number of indexes, the maximum number of partitions per table/index, and the maximum concurrent sessions. You can query the information using the DBA_HIGH_WATER_MARK_STATISTICS view.
SQL> select name, highwater, last_value from dba_high_water_mark_statistics;
NAME                                 HIGHWATER      LAST_VALUE
USER_TABLES                              28821           24744
SEGMENT_SIZE                        4136632320      4136632320
PART_TABLES                                  4               0
PART_INDEXES                                 4               0
USER_INDEXES                             28676           24348
SESSIONS 70 52
DB_SIZE                           105614671872    105614671872
DATAFILES                                   15              15
TABLESPACES                                 15              15
CPU_COUNT                                    2               2
QUERY_LENGTH                            162441            5595
SERVICES                                     3               3
>>and transaccion x seconds?
You also could get this information querying on v$sysstat dynamic performance view.
SQL> select startup_time "Startup",
  2     sum(value) "Transactions",
  3     sum(value)/decode(sum(trunc(sysdate-startup_time)),0,1,sum(trunc(sysdate-startup_time))) "Avg per day",
  4     sum(value)/decode(sum(trunc(sysdate-startup_time)),0,1,sum(trunc(sysdate-startup_time)))/24 "Avg per hour",
  5     sum(value)/decode(sum(trunc(sysdate-startup_time)),0,1,sum(trunc(sysdate-startup_time)))/1440 "Avg per min"
  6  from v$sysstat,v$instance
  7  where name in ('user commits','user rollbacks')
  8  group by startup_time;
Startup    Transactions Avg per day Avg per hour Avg per min
10/04/2008      4785273  44308.0833   1846.17014  30.7695023Cheers
Legatti

Similar Messages

  • 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

  • Pb of transmitio​n of a message on CAN bus with MAX using a CANdb file (.dbc)

    Hello,
    I tried to transmit a message on the CAN bus with MAX, I used a database.
    I have tried to transmitsome datas with the "NI CAN channel test pannel" (right click on a channel of a message), I put my value i click on "start", then "send" and when I look at the "Bus Monitor" (right click on CAN0) I see messaged that are received but I don't see my message transmit...
    Why my message are not transmitted?
    Bye.

    Duplicat post: http://forums.ni.com/ni/board/message?board.id=170&message.id=247678&jump=true
    LabVIEW Champion . Do more with less code and in less time .

  • How to use Logical database in function module?

    I will create a function module in HR.
    but how to use Logical database  in function module ?  Logical database PNP always show screen.in function (RFC) code , it is a matter.

    You cannot attach the LDB to the main program of the function group.
    - So you may [SUBMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=submit&adv=false&sortby=cm_rnd_rankvalue] a report which use the LDB and get back the data (export/import), by default in the syntax of SUBMIT the selection-screen will not be displayed
    - Use [LDB_PROCESS|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=ldb_process&cat=sdn_all], fill a structured table for selection, and get data back in another table
    - Use [HR function modules to read Infotypes|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrfunctionmodulestoread+Infotypes&adv=false&sortby=cm_rnd_rankvalue].
    Regards

  • 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

  • Right way to code an AIR application that uses sqllite database

    I am developing an AIR application that uses sqllite database.I want to know the correct way in which I should create the connections and SQLstatements according to MVC pattern.For example,whether i should have a single SQLStatement object for all my sql operations or I should use separate objects for insert,delete,select etc.I know how to open connection,execute statements and all,but i want to know the professional way of writing it.

    Make a controller for connect to db and save the connection in global varible (in model). Use this connection variable whenever u wanna execute the sql statements. Create seperate dao's for each table. Queries should be executed under the daos. You can call the method under the dao for execute the query from controller and show the result in view.

  • Can we use different Databases (Oracle & SQL Server) in one report?

    Post Author: venki5star
    CA Forum: .NET
    Hi there.
    Can we use different databases (Oracle & SQL Server) in a same report?
    If possible how?
    Another question,
    Can we change the Provider Name at runtime of the given report. If so the above question is useless...
    Thanks in Advance.

    I tried this using Oracle Provider for OLEDB (the one that supplied by Oracle Client) and Crystal Reports 9. you can drag the column into designer but the image does not appear in preview.
    I guess it's because CR does not recognized it as image, and there are no information that the blob data is an image at all.

  • How can I use two database in Dataset in SSRS?

    Hi,
    I am using one query to generate my SSRS report. In that query I am using subquery. Now I am pulling data from multiple tales.
    DB used in sub query is different than the rest of the tables DB.(So total I am using 2 DB(Database))
    So I see that in SSRS, I can connect query(In DataSet Properties) to one DATA_SOURCE only, how can I use other database which is I used in sub-query?
    I have to move this SSRS into PROD and I can't hard code that sub-query's DB name in my query.
    Please give me suggestion. Thanks!!
    Vicky

    In SSRS 2008 R2 you can use the Lookup function (http://technet.microsoft.com/en-us/library/ee210531.aspx ) and LookupSet function (http://technet.microsoft.com/en-us/library/ee240819.aspx
    Depending on your security set up, you can reference a table in a second database on the same server using a three part name:  database.schema.table.  This is more likely to work for you if you wrap your SQL command in a stored procedure.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • How to host one application using different database connection on OAS?

    Hi,
    Jdeveloper - 10.1.3.4
    Application - ADF/BC
    Oracle Application Server - 10.1.3
    Above our the specifications for our application,
    We have two database schemas different for development and production therfore we have different databse connections for the two,
    we have one application which is in production and enhacements on the same application are done by the development team.
    Since we have two different schemas for developement and prduction we use different database connections for the application on development and production.
    The problem is our Model and View Controller project are same, only the database connection file changes that's why we are able to host only on application at a time on our OAS. This is probably because the URL generated by OAS for developemnt and prodyction application is same.
    Is there a way we can host two instances of the same application with two different database connections on the a single OAS.
    Thanks & Regards,
    Raksha

    Use different deployment profiles each with a different context root for your application?
    See: http://one-size-doesnt-fit-all.blogspot.com/2009/02/configuring-separate-dev-test-prod-urls.html

  • How to use another database schema in Dictionary project

    Problem description:
    1)     I want to use Developer Studio to create my own J2EE project. Then I have to use Dictionary Project to maintain my database.  My database is Oracle.
    2)     I created tables in Dictionary project and deployed to database
    3)     After that I found my tables were deployed into SAPSR3DB schema.
    Question:
          What can I do if I want to deploy my tables into another schema other than SAPSR3DB?  In real cases I want to separate my tables from the WAS system tables.

    Hi Chaoran,
    If you want to use external database with Java dictionary tables..
    Right click on the Java Dictionary Table, from the menu select <b>Create DDL script</b>, then select to which data base you want to generate scripts. It will generate .sql scripts, use this scripts in your database to create tables. But the same time you need to create Data sources in Visual Administrator for your oracle system.
    Regards
    Abhilash

  • How can I delete a row in access using the database toolkit?

    I want to delete just one row of a access table using the database toolkit. Can it be done and if so How?

    Take a look at page A-1 of the database connetivity manual. It has information on making a sql query that will delete. You will need to use this command with the dbtools execute query function. Look in the shipping examples for an example with this function.

  • Not able to create a database link using the database gateway of oracle 11g

    HI,
    While trying to create a database link to SQL server from Oracle ,using the database gateway provided with 11g, i am getting the following error while making use of it in selecting columns from tables :
    Error starting at line 1 in command:
    select * from test1@dblink
    Error at Command Line:1 Column:20
    Error report:
    SQL Error: ORA-28513: internal error in heterogeneous remote agent
    ORA-02063: preceding line from DBLINK
    These are the steps i have followed for setting up:
    1.Ran the set up for the Database gateway.and mentioned the SQL server name and database .ALos set up a listener.
    2. Added the following in the Listener.ora of Oraclehome 11/NETWORK/ADMIN:
    LISTENER_SQL_FCD =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =localhost) (PORT = 1541)
    SID_LIST_LISTENER_SQL_FCD =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=dg4msql)
    (ORACLE_HOME= D:\app\20537\product\11.1.0\db_3)
    (PROGRAM=dg4msql)
    3.Added the following in tnsnames.ora inOracle home/NETWORK/ADMIN:
    dg4msql=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1541))
    (CONNECT_DATA=(SID=dg4msql))
    (HS=OK)
    4. Following is the entry in initdg4msql.ora in C:\product\11.1.0\tg_5\dg4msql\admin:
    HS_FDS_CONNECT_INFO=10.148.45.242:1433//SalesDemo
    HS_FDS_TRACE_LEVEL=DEBUG
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    5. Created the database link :
    create database link dblink
    connect to "sa" identified by "<pswd>"
    using 'dg4msql'
    On running :select * from test1@dblink i get the following error:
    Error starting at line 1 in command:
    select * from test1@dblink
    Error at Command Line:1 Column:20
    Error report:
    SQL Error: ORA-28513: internal error in heterogeneous remote agent
    ORA-02063: preceding line from DBLINK
    Is there any issue with the set or definition that I get the above error?

    What is the version of the Oracle database in which you have specified/and use the database link?
    If it is for example 10.2.0.3.0 you need to apply the mandatory patch for RDBMS bug 5965763 first before being able to use an 11g gateway. Have a look at MetaLink note 457808.1 for details about this patch.
    Regards,
    Ed

  • How to generate a single report  using multiple Databases

    Hi All
    Is it possible to create a single report using multiple databases
    I am working on Database A to generate reports usually,, but now i have a second database for which the data is coming from flat files now i have to use few tables from
    Database B to generate a single report,,,,, can any one help with the process

    Hi,
    i didn't see this properly in your post:
    but now i have a second database for which the data is coming from flat files if you have ETL then make flat files as source then create target tables in db:B itself.. .Now, import them in the rpd..
    If not, import both those tables into rpd with different connections..
    Create physical joins by selecting those tables and perform joins operations over db's in physical layer..

  • When using the Database Connectivity Toolset, reads and writes with long binary fields are incompatible.

    I am trying to write LabVIEW Variants to long binary fields in a .mdb file using the Database Connectivity Toolset. I get errors when trying to convert the field back to a variant after reading it back from the database.
    I next tried flattening the variant before writing it and ultimately wound up doing the following experiments:
    1) If I use DB Tools Insert Data to write an ordinary string and read it back using a DB Tools Select Data, the string is converted from ASCII to Unicode.
    2) If I use DB Tools Create Parameterized Query to do an INSERT INTO or an UPDATE operation, specifying that the data is BINARY, then read it back using a DB Tools Select Data,
    the length of the string is prepended to the string itself as a big-endian four-byte integer.
    I can't think of any way to do a parameterized read, although the mechanism exists to return data via parameters.
    Presuming that this same problem affects Variants when they are written to the database and read back, I could see why I get an error. At least with flattened strings I have the option of discarding the length bytes from the beginning of the string.
    Am I missing something here?

    David,
    You've missed the point. When a data item is flattened to a string, the first four bytes of the string are expected to be the total length of the string in big-endian binary format. What is happening here is that preceding this four-byte length code is another copy of the same four bytes. If an ordinary string, "abcdefg" is used in place of the flattened data item, it will come back as <00><00><00><07>abcdefg. Here I've used to represent a byte in hexadecimal notation. This problem has nothing to do with flattening and unflattening data items. It has only to do with the data channel consisting of writing to and reading from the database.
    I am attaching three files that you can use to demonstrate the problem. The VI file c
    ontains an explanation of the problem and instructions for installing and operating the demonstration.
    Ron Martin
    Attachments:
    TestLongBinaryFields.vi ‏132 KB
    Sample.UDL ‏1 KB
    Sample.mdb ‏120 KB

  • How to make a virtual channel in MAX using DAQmx ?

    I want to measure the CJC temperature on the TBX 1328 ( attached to SCXI 1121). I want to create a virtual channel in MAX using DAQmx. I have right clicked on DAQmx but there is no option for virtual channel. Ther is the option of 'Traditional virtual channel' which i dont want.
    I used the VI to make the virtual channel but i want to knowhow to doit inMAX.
    thanks

    Here are 2 ways that you can create a DAQmx channel that appears in MAX.
    1) In MAX, right click on "Data Neighborhood" and select "Create New...". Then click "NI-DAQmx Global Channel" (or "NI-DAQmx Task" -- a task contains the channel(s) and triggering/timing information) and click "Next". This launches the DAQ Assistant that will guide you in creating the channel or task.
    2) In LV, place a NI-DAQmx Global Channel control on your panel or constant on your diagram. Right click on the control/constant and select "New Channel(DAQ Assistant)..." (Note: You can do the same from the NI-DAQmx Task control/constant to create a NI-DAQmx Task.)
    Deborah

Maybe you are looking for

  • How can I get my iPhone 4s and my computer to sync an msn email account?

    I had a Blackberry before my IPhone.  On the BB, when I read an email received using my Windows Live account (@msn.com), which I also use as my default email on my Mac, I was asked if I wanted to delete the message from my phone only, my computer onl

  • How to find out where an alias is defined

    How can I find out where an alias is defined on my system? I am referring to the kind of alias that is used within a Terminal session launched from Mac OS X (10.6.3). For example, if I enter the alias command with no parameters at a Terminal command

  • ITunes freezes after a sync and then clicking to disconnect

    My iTunes is behaving very strangely lately.  After I've done a sync (with my iPod Nano 6th gen), which works fine, and then click the disconnect button iTunes locks-up.  It displays the spinning beach ball but never stops and I can't quit iTunes wit

  • Parameterized queries running much slower than ones with hardcoded values

    Very often there is a huge performance difference when using parameters in a query, compared to running the same code after replacing the parameters with hardcoded values: the parameterized version of the code runs much slower! The case is not parame

  • Problem with execute query

    Hi all, I am modifying a form, when i ran this form, in enter query(F7), i enter the value and do F8 but it returns no value but value exist in table in database, i do not know if i modifyed something related to (F7) and (F8) Do you have any idea? Th