Skip to main content

Posts

A JDBC Application to Copy Data Across Databases

Requirement It is required to copy data stored in one data source to another data source having the schema structure using JDBC. Whatever data is present in selected tables of origin data source should be copied to destination data source. Challenges Different JDBC drivers require somewhat different URLs and drivers. Even though Java.sql.DriverManager simplifies need to specify correct JDBC driver by looking at the URL, it is still necessary to make sure required driver is in classpath. Furthermore Driver Manager will not be able to load sun’s JdbcOdbcDriver when it is required to access Odbc Data Sources like MS Access DB files, thus it should explicitly be loaded at application startup.  Also there might be situations as it is in MS Access, which requires matching DSN configuration, additional configurations might be necessary.  As to JDBC URLs, since they are not completely standard among different drivers, user needs to know correct construction of req...

Accessing MS Access using JDBC

Since Microsoft does not provide 64 bit drivers for Access; it becomes a nuisance to access MS Access under 64 bit platforms.   For a successfull connection to  MS Access DB File (*.mdb)  with  JDBC  under 64 bit platforms, follow following steps: 1-        Make sure Access drivers are installed. If access is installed it is already there, else download from  this  link and install. 2-        Configure  Data Source Name  using 32 bit  ODBC Data Source Administrator . Use the executable at c:\windows\sysWOW64\odbcad32.exe. 3-        System DSN->Add->Microsoft Access Driver (*.mdb) -            Specify a Data Source Name -            Specify a description -            L...

Exporting MS Access to MySQL

To export an access database ( mda  file) to  MySQL  database is quiet easy. All needed is to download 32 bit  MySQL Connector/ODBC  driver  from  http://dev.mysql.com/downloads/connector/odbc/  and follow steps below. 1-      Select the table to export. 2-      From  External Data  tab select  ODBC Database . See picture below. Picture  1  ODBC Database Export 3-        Specify table name to export onto. Typically the same name as the access table name. 4-         From  Select Data Source  dialog select  Machine Data Source  tab and click  new. Picture  2  MySql OBDC Driver 5-        Select  MySQL Connector/ODBC  driver   from list. Click OK.   6-        Specify co...

Understanding Memory Usage

Working Set  is the set of actively used pages. A process needs that amount of physical memory to run properly. If there is not enough physical memory, process will spent considerable amount of time to swapping. Thus performance will be degraded. If this problem is system wide, all process are hungry for physical memory, system will spent most of time to swapping witout any actual work. This is called  thrasing . Linux top Command for Process Memory Usage Column explanations from  Understanding Process memory : ·           RES  shows the actual physical RAM used by your process. ·           VIRT  shows the actual virtual memory reserved by your process. ·           DATA  shows the amount of virtual private anonymous memory reserved by your process. That memory may or may not be mapped to physical RAM. It c...

Virtual Memory

Introduction In simple and straightforward terms: Modern Operating Systems (OS) controls access to memory. Process demands memory and OS provides. Each process thinks it has a large consecutive space of memory which is called  virtual memory .  For a 32 bit system virtual address space is 4G wide. For a  64 bit system virtual address space size is 256TB . Virtual memory brings some very important advantages. Each process can address whole address space available; however, system may not have that much physical memory. Each process has its own private virtual memory space which other process cannot access. Virtual memory concept also lets operating system map files. Finally virtual memory concept sharing similar memory areas between processes. Paging Virtual address space is divided into small fixed size consecutive address blocks which are called  pages . Usually a page is 4 kilobytes in size. Similarly physical address space is divided into such blocks wh...