Announcement: This blog is now moved to new domain: CeeKam.com

Tuesday, July 11, 2006

Quick Hands-on Oracle

After a long time, I got change to setup Oracle 10g on Windows. The task was to setup Cognos8 with Oracle connectivity. Thanks to my ex-colleague (Riaz Ahmed), who helped me to recollect the basic commands in Oracle:

1) Creating a Database:
- Used Database Configuration Assistant (dbca)

2) Creating new users for Database:

Using SQL*Plus, login as SYSTEM user to the DB Instance and use the command
SQL> CREATE USER crn8 IDENTIFIED BY crn8;
SQL> GRANT CONNECT, RESOURCE, DBA to crn8;

3) Restore a Oracle Dump File that comes as Cognos Samples:
From Command Prompt, use the command

imp fromuser=crn8 touser=crn8
file=filepath.dmp
commit=y
log=filename.log

The tnsnames.ora needs to be configured at the Client PC to communicate with the Oracle Database Server. This file is usually found at ORACLE_HOME\network\admin folder.

Some more additional command to verify the Oracle Server/Instance status:

- lsnrctl status
- lsnrctl status DB_NAME
- tnsping DB_NAME

No comments: