==================================================================== LAEISS-DEV (eLAMS - as connecting dB) ==================================================================== -bash-3.00$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 26 08:52:04 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 With the Partitioning, OLAP and Data Mining options SQL> show user USER is "SYS" SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- laeiss SQL> select * from global_name; GLOBAL_NAME ------------------------------------------------------------ LAEISS.REGRESS.RDBMS.DEV.US.ORACLE.COM NAME TYPE VALUE -------------------------- ----------- --------------------- global_names boolean FALSE db_domain string SQL> select username from dba_users 2 where username = 'NCBCARRE'; USERNAME ------------------------------ NCBCARRE SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 With the Partitioning, OLAP and Data Mining options -bash-3.00$ . oraenv ORACLE_SID = [laeiss] ? -bash-3.00$ -bash-3.00$ sqlplus lams SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 26 10:01:25 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 With the Partitioning, OLAP and Data Mining options SQL> show user USER is "LAMS" SQL> create user NCBCARRE 2 identified by pass1234 3 default tablespace USERS 4 temporary tablespace TEMP 5 profile DEFAULT; User created. SQL> grant CONNECT to NCBCARRE; Grant succeeded. SQL> grant RESOURCE to NCBCARRE; Grant succeeded. SQL> grant CREATE DATABASE LINK to NCBCARRE; Grant succeeded. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 With the Partitioning, OLAP and Data Mining options -bash-3.00$ -bash-3.00$ sqlplus NCBCARRE SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 26 09:45:36 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter password: pass1234 Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 With the Partitioning, OLAP and Data Mining options SQL> show user USER is "NCBCARRE" SQL> create database link LTD.WORLD 2 connect to NCBCARRE identified by pass1234 3 using 'LTD'; Database link created. SQL> select count(*) from REG_TAXPAYERS@ltd; select count(*) from REG_TAXPAYERS@ltd * ERROR at line 1: ORA-12545: Connect failed because target host or object does not exist SQL> select count(*) from REG_TAXPAYERS@LTD.WORLD; select count(*) from REG_TAXPAYERS@LTD.WORLD * ERROR at line 1: ORA-12154: TNS:could not resolve the connect identifier specified SQL> select count(*) from its.REG_TAXPAYER_LOCATIONS@LTD; select count(*) from its.REG_TAXPAYER_LOCATIONS@LTD * ERROR at line 1: ORA-02019: connection description for remote database not found