Monday 22 September 2008

Finding a table name

select *
from dba_tables
where table_name like '%<table_name>';

Creating a Database Link

I always forget the syntax for this one...


CREATE DATABASE LINK
CONNECT TO
IDENTIFIED BY
USING '';


For example: -


CREATE DATABASE LINK HR89TST
CONNECT TO FBLOGGS
IDENTIFIED BY FR3DD13
USING 'HR89TST';

Note that if you have special characters in your password, you should enclose it in double quotes or you may get an error message.

To list existing database links, use: -

select * from dba_db_links;
or

Select * from ALL_DB_LINKS;


To drop a database link use: -

DROP DATABASE LINK linkname;