Pages

Saturday 22 October 2011

Create database link in Oracle

If database is on the same machine(linux/window):
conntion string : 'sid'
Query to use:
>>CREATE DATABASE LINK   linkName CONNECTED TO username IDENTIFIED BY password USING 'sid'
where
 sid: service id or host string of the databaes

Oracle Caller interface using C


Using the C interface OCI for connectivity with Oracle Database

Steps :
1.      Check if OCI (Oracle Call Interface) exists at the Oracle home directory, for example : E:\oracle\ora92\product\9.2.0.1.0\db_1\oci

2.      Create a database ada1, with a table adatab (id integer, PartNumber varchar(20), Nomenclature varchar(20)); and insert some values into the table.

3.      Create a test file for testing the connectivity to Oracle database and for Fetching data from the database, called Test.c at say, D:\Temp\Test.c.

4.      Information about Oracle Database Connection :
- For each connection to Oracle DB you need to create one pair of LDA and HDA data structures.
- LDA stands for Logon Data Area.
- HDA stands for Host Data Area.
- Function olog() used to established connection to Oracle DB.
- Function oerhms() returns the text of an Oracle error message, given the error code.

MongoDb: Install

MongoDB: document oriented database management system.

MongoDB is high performance, reliable document oriented dbms, which solve horizontal scaling problem of large database.

Installation steps on window:
Download the zip as per your system configuration. I've downloaded for 32-bit window.
Extract it anywhere on your system.

Pre-Installation Step
MongoDB need to be told where to create and store database files.
so,  create  /data/db directory anywhere on your system.
I've created it inside the mongodb extracted files as it make more sense. :P

mkdir data
mkdir ./data/db