|
Re: What is host string? [message #112022 is a reply to message #112018] |
Tue, 22 March 2005 08:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/42800.jpg) |
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
-- Host string is the name you assign for tns COnnectivity in tnsnames.ora
-- these entries typically identify the machine and portnumber and sid of the database you
-- are trying to connect.
-- for example i am using these entries in tnsnames.ora
-- here 'mutation' i have named the hoststring as mutation
-- i can name anything i want
bash-2.03$ tail -7 tnsnames.ora
mutation =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost )(PORT = 1521)))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mutation))))
--
-- if the client and database are in same machine, you dont need a hoststring.
--
bash-2.03$ sqlplus mag/mag
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Mar 22 08:24:34 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
mag@mutation_mutation > exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
--
-- if you intend to use the hoststring ( for a local database or remote database)
-- you should use it like this.
-- by this your sql cleint will talk to the database identified by hoststring.
bash-2.03$ sqlplus mag/mag@mutation
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Mar 22 08:24:54 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
mag@mutation_mutation > exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
bash-2.03$
|
|
|