Also, no need for quotes. Just use:
sqlplus / as sysdba
But, I've no idea what sql* plus is.
Main Topics
Browse All TopicsI have windows xp profession installed and have oracle 10g Relase1 ,oracle 10g Release2. when I'm connecting with Run -> cmd
c:> set ORACLE_SID=xyz
c:> sqlplus "/ as sysdba"
than its connecting but when i'm trying to connect with sql* plus its giving me error
ora-12154 tns: could not resolve the connect identifier specified
even after specifying username , password and host string
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
C:\>set ORACLE_SID=oracle10g1
C:\>sqlplus / as sysdba
SQL*Plus: Release 10.1.0.2.0 - Production on Wed Sep 23 08:57:25 2009
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from v$instance;
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
--------------------------
VERSION STARTUP_T STATUS PAR THREAD# ARCHIVE LOG_SWITCH
----------------- --------- ------------ --- ---------- ------- ----------
LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST
---------- --- ----------------- ------------------ ---------
1 oracle10g1
HP
10.1.0.2.0 23-SEP-09 OPEN NO 1 STOPPED
ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL
SQL>
-------------------------
when i'm trying to connect with sql*plus by specifying username,password and host string its showing me error
ora-12154 tns: could not resolve the connect identifier specified
""when i'm trying to connect with sql*plus by specifying username,password and host string its showing me error
ora-12154 tns: could not resolve the connect identifier specified""
that is what we want to see as copy nad paste ?
how did you do it?
and have you sat the oracle_sid and oracle_home too?
as you may have more than one home or more tha one SID
Yes sir, i have multiple oracle databases on my system. but i can set ORACLE_SID and ORACLE_HOME if i connect from "cmd" prompt but if i would like to connect from SQL*plus byspecifying "USERNAME,PASWORD and HOStSTRING" how can i connect,is there any way with SQL*PLUS or else i have to connect from "cmd" prompt only for multiple databases in windows XP
I also recommend its time to move to SQL Developer or Toad. The sqlplus you are talking about is the windows version (not the command line version) and is not included in 11g (deprecated as far as I know). The replacement is SQL Developer, it is free, check Oracle's site for a download.
http://www.oracle.com/tech
You can connect with SQL*PLUS with the username, password and hoststring.
The hoststring here indicates the tns entry in tnsnames.ora file.
Under your ORACLE_HOME\network\admin\
Example for tnsnames.ora file entry:
Ora10gR1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <Windows XP machine name>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = <10gR1>)
)
)
Ora10gR2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <Windows XP machine name>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = <10gR2>)
)
)
Now you can connect with the following connect strings in SQL*PLUS
1. Under Username give UserName/Password@Ora10gR1
2. Under Username give UserName/Password@Ora10gR2
If you would like to connect as sysdba, you sys/sysPassword@Ora10gR1 as sysdba or sys/sysPassword@Ora10gR2 as sysdba.
Business Accounts
Answer for Membership
by: it-rexPosted on 2009-09-22 at 17:20:39ID: 25398976
what do you mean by "than its connecting but when i'm trying to connect with sql* plus its giving me error"
wuld you please post a copy and paste from your cmd;for both a succeful login and a failed one