connection using sqlplus [message #250117] |
Sun, 08 July 2007 02:26  |
cgk_js
Messages: 48 Registered: December 2005
|
Member |
|
|
i can able to connect using the connection descriptor
how can i connect without that...
eg sqlplus user_adm/user_pwd@prod
need to connect as sqlplus user_adm/user_pwd
|
|
|
|
Re: connection using sqlplus [message #250120 is a reply to message #250118] |
Sun, 08 July 2007 02:52   |
cgk_js
Messages: 48 Registered: December 2005
|
Member |
|
|
actually i can able to connect in production machine,
i cannot do the same in the testing machine.
i had added the ORACLE_SID in the .profile, still i cannot connect and when i run unix jobs,for connection oracle using
pro*c EXEC SQL CONNECT :userid identify by :passwd;
i am getting this error|12154
>>>>> oerr ora 12154
12154, 00000, "TNS:could not resolve the connect identifier specified"
// *Cause: A connection to a database or other service was requested using
// a connect identifier, and the connect identifier specified could not
// be resolved into a connect descriptor using one of the naming methods
// configured. For example, if the type of connect identifier used was a
// net service name then the net service name could not be found in a
// naming method repository, or the repository could not be
// located or reached.
// *Action:
// - If you are using local naming (TNSNAMES.ORA file):
// - Make sure that "TNSNAMES" is listed as one of the values of the
// NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
// (SQLNET.ORA)
// - Verify that a TNSNAMES.ORA file exists and is in the proper
// directory and is accessible.
// - Check that the net service name used as the connect identifier
// exists in the TNSNAMES.ORA file.
// - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
// file. Look for unmatched parentheses or stray characters. Errors
// in a TNSNAMES.ORA file may make it unusable.
// - If you are using directory naming:
// - Verify that "LDAP" is listed as one of the values of the
// NAMES.DIRETORY_PATH parameter in the Oracle Net profile
// (SQLNET.ORA).
// - Verify that the LDAP directory server is up and that it is
// accessible.
// - Verify that the net service name or database name used as the
// connect identifier is configured in the directory.
// - Verify that the default context being used is correct by
// specifying a fully qualified net service name or a full LDAP DN
// as the connect identifier
// - If you are using easy connect naming:
// - Verify that "EZCONNECT" is listed as one of the values of the
// NAMES.DIRETORY_PATH parameter in the Oracle Net profile
// (SQLNET.ORA).
// - Make sure the host, port and service name specified
// are correct.
// - Try enclosing the connect identifier in quote marks.
//
// See the Oracle Net Services Administrators Guide or the Oracle
// operating system specific guide for more information on naming.
|
|
|
|
|
|
Re: connection using sqlplus [message #250555 is a reply to message #250521] |
Tue, 10 July 2007 07:38   |
cgk_js
Messages: 48 Registered: December 2005
|
Member |
|
|
Hi anacedent,
i have tried by using TWO_TASK in the .profile file and i can able to connect to oracle by sqlplus user_name/password with the connection description.
Thanks for the valuable advice.
Gopal
|
|
|
|
|
|
Re: connection using sqlplus [message #256746 is a reply to message #250117] |
Mon, 06 August 2007 08:50  |
alkhirbash
Messages: 1 Registered: August 2007
|
Junior Member |
|
|
you can connect by :-
1- go to tnsnames.ora file open it and write this in the end of
file:
service_name =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = servername)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
save and close the file
you can change (service_name) by any name you want
host = (servername) write the name of your server instead of servername
service_name= (orcl) change it by your oralce_sid in server
the go to registery form run
in form home : for example if it (home1) in right side create new string and change it name to local after that click double click on local it will show small box write in your (servicename) that you did in the tnsnames.ora file.
|
|
|