Check your TNSNAMES.ora. What are the settings for your service?
should be similar: (this is from my tnsnames.ora. Of course I changes the SID and HOST strings)
(ADDRESS = (PROTOCOL = TCP)(HOST = computername)(PORT = 1521))
(SERVER = DEDICATED)
(SERVICE_NAME = sidname)
See what your computer is named for the HOST setting.
goto Control Panel/System/Computer Name and use the full name shown on the screen.
Caution:DO NOT USE the IP Address in Windows unless you know for sure that the address is STATIC. Most IP addresses in the Windows environemts are Dynamic – in other words, they CHANGE, possibly every time you bootup. (see note about 127.0.0.1)
IP address of the server or the name as specified by the Admin
NOTE: I believe you can also use 127.0.0.1 instead of the computer name for the HOST setting. This I.P. looking address signifies LOCAL.
That should do it. If the manual tnsnames entry doesn’t work for some reason, use the Net Configuration Assistant to set the SID, HOST and Protocol strings. Use the defaults at first.
To connect to the database, use the following syntax:
at a DOS or UNIX prompt:
DOS C: sqlplus system/manager@orcl
UNIX ?: sqlplus system/manager@orcl
(check for configuration of SQLPLUS:
DOS C: sqlplus
UNIX ?: which sqlplus
If you don’t get a response with a path or get an error (in DOS), you do not have SQLPLUS installed properly, usually not listed in your in your PATH statement)
SQLPLUS: conn / as SYSDBA
The last entry will connect you as SYS if required.
It is not recommended to do anything in the database as SYS unless necessary. This user is very powerful and unless you really like to recover or reinstall Oracle, you can really mess things up if you are not careful. Do all you work as SYSTEM or even better, create a USER for yourself and give it the privileges/permissions that you need.
Always login as yourself and connect as other users after initiating the SQLPLUS session.
Most important – BE PATIENT! Oracle is not the easiest application to use if done improperly. It takes time and effort to efficiently use and a long time to master. Have fun.
Hope this helped,