Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Oracle Database Link

December 14, 2005 Add Comment

Oracle Database Link


In distributed Oracle environments, database links can be used to define a communications path between two databases. A database link defines a network connection, and, optionally, a username and password, to use when Oracle accesses and establishes a database session in the remote database on behalf of the local application request.

Database link enable SQL statements to be isolated from the underlying physical network topology. Thus, whenever the location of a remote database changes, only the link need be updated, and not each and every SQL queries, significantly the tasks of programmer.

Oracle database link is defined in a specific database, and may be used only by users of that database. If the same database link name was to be used from all databases in the network, the links must be defined identically with that name in each of each databases. For this scenario, the easier way is to be global database link.

Database Link Creation

Login into Oracle database (with SQL*Plus, for example) as a user who has the privilege to create a database link and execute the following command:

CREATE DATABASE LINK link_name
CONNECT TO user_name IDENTIFIED BY password
USING ‘connection_string’;

where connection_string is an entry is tnsnames.ora (usually located in $ORACLE_HOME/network/admin), which enables the Oracle to know the network path to remote database.

connection_string has the following structure:

(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP) (Host = host_name/ip_address) (Port = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = database_name)
)
)

Database Link Deletion

To delete a database link:

DROP DATBASE LINK link_name;

Oracle Database Import Error 3113/3114

November 14, 2005 Add Comment

Oracle Database Import Error 3113/3114


When trying to import the Oracle export dump into Oracle database, the following errors occur:

IMP-00003: ORACLE error 3113 encountered
ORA-03113: end-of-file on communication channel
IMP-00003: ORACLE error 3114 encountered
ORA-03114: not connected to ORACLE

The errors occur on Oracle database installed in Windows machine too. Actually the problem can occurs in any platform of Oracle database. It usually happens when try to import into new database.

The problem occurs because imp utiliy encounters error out when trying to execute some commands.

The solution to solve the problem is as following:

Login as sys in the SQLPLUS and run the following sqls

$OH/rdbms/admin/dbmsread.sql
$OH/rdbms/admin/prvtread.plb

After executing the above sql scripts, retry the import. The error should disappears.

Manual and Clean Uninstall Oracle for Windows

November 12, 2005 Add Comment

Manual and Clean Uninstall Oracle for Windows



Warning: Editing registry may cause problems to your PC.

If you facing problems trying to uninstall Oracle from your Windows workstation, or unable to uninstall Oracle installations cleanly and properly, the following steps may be used to uninstall all Oracle products currently install on the workstation:

Uninstall all Oracle components using the Oracle Universal Installer (OUI).
Delete the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE key which contains registry entries for all Oracle products by using regedit.
Delete any references to Oracle services/components in the following registry 



location: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/. Looks for key entries that starts with “Ora” which are obviously related to Oracle.



Reboot the workstation.



Delete the ORACLE_BASE directory. (i.e C:\Oracle)
Delete the C:\Program Files\Oracle directory.
Empty the temp directory.
Empty the recycle bin.
With this, the computer is more or less clear of any Oracle components, which allows you to reinstall Oracle if needed.

Check Oracle Version

September 17, 2005 Add Comment

Check Oracle Version

here are several ways where you can query or retrieve the version number of installed Oracle products:

1. If you just want to check the version information of the Oracle database, simply connect and login to the Oracle database with SQL *Plus. Upon login, you will see:

SQL*Plus: Release 9.2.0.6.0 – Production on Tue Oct 18 17:58:57 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 – 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 – Production

The first italic number is the version of the SQL*Plus client and the second italic number is the version of Oracle database which you are connected to .

2. Retrieve the version information from v$version table by using SQL*Plus. In this table you can find version information on Oracle, PL/SQL, etc.

To retrieve the version information for Oracle, you execute the following SQL statement:

select * from v$version where banner like ‘Oracle%’;

It should return something like this:

Banner
————————————————————————————–
Oracle9i Enterprise Edition Release 9.2.0.1.0 – 64bit Production

3. Version information can also be checked from Installed Products from the Oracle Universal Installer. It will tells you what products is installed on the machine and also its version information too.

In Unix, the installer is located at $ORACLE_HOME/bin/runInstaller.
In Windows, access the installer by Start -> All Programs -> Oracle Installed Products -> Universal Installer.