Link to home
Start Free TrialLog in
Avatar of Imbeginner
Imbeginner

asked on

ORA-12560: TNS:protocol adapter error

Hi,
I installed Oracle 9i Software but i didnt Create a Db Manually.
I want to Create Its DB with Sql Statements.
For it I want to Connect to Sql-plus For entering My Sql StateMents.
But i Cant Connect To it For Creating A DB.
If I entered this information on Login Page:
User name:System
Password :Manager
Host String:       <-- Blank

This Error was raised:
"ORA-12560: TNS:protocol adapter error"


How can I solve This Error?

Best Regards
Avatar of Pierrick LOUBIER
Pierrick LOUBIER
Flag of France image

At a prompt (same procedure for UNIX-like and Windows) :

sqlplus "/ as sysdba"
then
startup nomount pfile='path/to/init.ora'

Finally execute your scripts.
If you are on Windows you will need to create the service first, using ORADIM
Just type in ORADIM at the command prompt to get the syntax.

Should be something like: ORADIM -NEW -SID ORCL

Not needed if you are on Unix.
ASKER CERTIFIED SOLUTION
Avatar of Pierrick LOUBIER
Pierrick LOUBIER
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aalapsharma
aalapsharma

Hello Imbeginner,

You need to create an entry for the database u r connecting to, in TNSnames.ora
The file resides here: C:\oracle\ora92\network\ADMIN\tnsnames.ora
or at some similar place, please search for it.

Then you need to create an entry for your database.

<HOST_NAME> =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <IP_ADDRESS>)(PORT = <PORT>))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = <SID>)
    )
  )

NOTE:
<HOST_NAME> : This is the name which you will use as host string when you connect to the database.
                          EX:  username/password@hostname

<IP_ADDRESS> : This is the IP address of the database server on which you r trying to connect.
                          If it is on the same machine then give 127.0.0.1

<PORT>           : This is the port number to which the client connects with the database. Default should be 1521,
                          but if you had changed at the time of installation, then you must specify that.

<SID>              : This is the service identifier of the database you want to connect to.



Aalap Sharma :)
Avatar of Imbeginner

ASKER


Many Thanks for Comments,
>oradim -new -sid %ORACLE_SID% -pfile c:\path\to\some\init.ora
what is the Mean of c:\path\to\some\init.ora ?
My purpose is what is the "path","to", or "some" keywords in this statement?
The path should be :

C:\oracle\ora92\dbs\init.ora

if you installed Oracle in C:\oracle\ora92\
I didnt See init.ora in this directory:
Should i configure My init.ora before Executing upper statement?
I saw InitDw.ora in below Directory
F:\oracle\ora90\
Yes you must do it BEFORE executing create statements.
The file you found could help you to build your own.
Can you Bring a init.ora configuration sample for this issue?
I increased points From 50 to 75.
Can you Bring a init.ora configuration sample for this issue?
I increased points From 50 to 75.
There should be one in
<Oracle_Home>\ora90\admin\sample\pfile\initsmpl.ora

And the one you talked about must be another.
>Yes you must do it BEFORE executing create statements
My purpose is before executing a oradim statement Not before
Executing Create database .
Many Thanks For Your Helps
Ploubier:
You will give All points(may be with another Extra points)
But give me some times for doing what you propose me.
I m in house and I will go to my office at sunday.
I have oracle 8.0.5 in house.