I'm getting
ora-12560: TNS:Protocol Adapter Error
while trying to lo-gin to Oracle 11g. I did not find OracleServiceORCL file in services.msc. How to start this service? Please help me.
Try ORADIM -NEW -SID ORCL
As far as i know this won't create a problem. If the service is already available it will throw error.
Related
I needed to change the SID of an Oracle XE database (not the Service Name) to match a production database.
When I tried searching online, most of the pages were describing changing or adding a service name through tnsnames.ora; that's not what I needed to do.
The asktom article has the answer, but the formatting and verbosity makes it hard to follow, so here's a summary:
[XE_HOME] means where Oracle XE is installed. Normally this is C:\oraclexe\app\oracle\product\10.2.0\server.
Make sure you have Administrator privileges or the procedure will fail.
Configure the SPFILE (you can remove the old file if you want)
copy [XE_HOME]\dbs\spfileXE.ora [XE_HOME]\dbs\spfileNEW_SID_NAME.ora
copy [XE_HOME]\database\initXE.ora [XE_HOME]\database\initNEW_SID_NAME.ora
Edit [XE_HOME]\database\initNEW_SID_NAME.ora: It should contain a single line like this: SPFILE='[XE_HOME]\server\dbs/spfileNEW_SID_NAME.ora'
Shutdown and replace the old service with a new:
sqlplus / as sysdba and execute shutdown
lsnrctl stop
oradim -new -sid NEW_SID_NAME -startmode auto -pfile [XE_HOME]\database\initNEW_SID_NAME.ora
oradim -delete -sid XE
lsnrctl start
Update the ORACLE_SID environment property (System Settings > Advanced > Environment)
Force Oracle to register with listener
sqlplus / as sysdba and execute alter system register;
You can verify that the SID was changed by executing the following query: select instance_name from v$instance;
I had some problems with the solution posted by Johannes, so I had to do some extra steps.
When trying to connect to oracle (step 4) by doing sqlplus / as sysdba I got:
ERROR: ORA-12560: TNS:protocol adapter error
The solution for this was executing the following line:
oradim -start -sid NEW_SID_NAME
Then connecting with / worked fine, but trying to connect to NEW_SID_NAME with system or HR got me another problem:
ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I checked that with the query select instance_name from v$instance; that the listener would be NEW_SID_NAME, and so did. But running lsnrctl status in the command line or querying select name from dba_services; didn't show NEW_SID_NAME as a listener.
The solution of this problem was executing the followind sentence on sqlplus:
alter system set service_names='NEW_SID_NAME';
Maybe you'll need to execute alter system register; after this also.
After doing this two steps I can connect to the NEW_SID_NAME with system and HR.
Hope it helps
In version 11g, all of the previous solution didn't work... I always get the following error when trying to do the sqlplus / as sysdba :
ERROR: ORA-12560: TNS:protocol adapter error
Luckily I found a script to do what I wanted to do under [XE_HOME]\config\scripts. The script is named XE.bat and it will instantiate a new database from scratch asking you for the sysPassword along the process. So what I did was :
Stop and remove the existing service if any:
oradim -delete -sid XE
Stop the listener
Configure the SPFILE as explained by Johannes
Make a copy of the script XE.bat, you can name it whatever you want
Edit the copy of the script as follows :
Change line "set ORACLE_SID=XE" to "set ORACLE_SID=NEW_SID_NAME"
Change wherever you see "-sid XE" to "-sid NEW_SID_NAME"
Update the line where it calls the "orapwd.exe" command to point to a file called PWDNEW_SID_NAME.ora instead of PWDXE.ora
Update the line that echos the spfileXE.ora into the initXE.ora to echo spfileNEW_SID_NAME.ora into initNEW_SID_NAME.ora (this part may render the step 3 useless but I prefer to do it anyway, just in case...)
Execute the script... It will prompt you for the SYSTEM password a few times saying
Enter value for 1:
or
Enter value for 2:
That's it, the new database with your NEW_SID_NAME is up and running!!
I'm running ORACLE 11gR2 through Windows server 2008 R2. Because of some reason shutdown database with "shutdown immediate" command, but when I need to startup again database, this error message is appear:
"ORA-12560: TNS:protocol adapter error"
about ORA 12560 I consumed many time through internet for finding soloution but all of the is very basic guide that could not solve my problem. please consider to my problem with following below image:
1. when I want to startup database:
set oracle_sid in command prompt and check in windows environment variables:
check lsnrctl status:
tnsping:
check windows oracle service:
so, according those images everything looks fine but my database wont to start again I will be thankful if I have your clear, correct and tested solution for my problem
There are a multitude of things that might be happening here.
I continue to have issues with databases registering properly with the listener. Make a backup of the listener.ora file %ORACLE_HOME%\network\admin\listener.ora and add an entry similar to the following to the SID_LIST. Your ORACLE_HOME path will most likely be different than mine:
(SID_DESC =
(GLOBAL_DBNAME = RDEV.world)
(ORACLE_HOME = D:\Oracle\product\12.2.0\dbhome_1)
(SID_NAME = RDEV)
)
Restart the listener and see if you can connect:
lsnrctl stop
lsnrctl start
The following entry added to the sqlnet.ora file also helps. Again, backup before editing
NAMES.DEFAULT_DOMAIN = WORLD
This allows you to reference the database as ORCL or ORCL.WORLD
These fixes have worked on Oracle 11 and 12 databases.
I have tried restarting multiple times the services but I failed. Because of this error I cant install oracle apex.
Try sys as sysdba. Look at this tutorial.
I just Installed Oracle 11g on windows 7 64bit, and when I tried to ping using tnsping I faced this error TNS-12541: TNS:no listener.
So, I tried to start the listener using LSNRCTL> start also I faced this error:
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
Set ORACLE_HOME and try starting the Listener again.
I needed to change the SID of an Oracle XE database (not the Service Name) to match a production database.
When I tried searching online, most of the pages were describing changing or adding a service name through tnsnames.ora; that's not what I needed to do.
The asktom article has the answer, but the formatting and verbosity makes it hard to follow, so here's a summary:
[XE_HOME] means where Oracle XE is installed. Normally this is C:\oraclexe\app\oracle\product\10.2.0\server.
Make sure you have Administrator privileges or the procedure will fail.
Configure the SPFILE (you can remove the old file if you want)
copy [XE_HOME]\dbs\spfileXE.ora [XE_HOME]\dbs\spfileNEW_SID_NAME.ora
copy [XE_HOME]\database\initXE.ora [XE_HOME]\database\initNEW_SID_NAME.ora
Edit [XE_HOME]\database\initNEW_SID_NAME.ora: It should contain a single line like this: SPFILE='[XE_HOME]\server\dbs/spfileNEW_SID_NAME.ora'
Shutdown and replace the old service with a new:
sqlplus / as sysdba and execute shutdown
lsnrctl stop
oradim -new -sid NEW_SID_NAME -startmode auto -pfile [XE_HOME]\database\initNEW_SID_NAME.ora
oradim -delete -sid XE
lsnrctl start
Update the ORACLE_SID environment property (System Settings > Advanced > Environment)
Force Oracle to register with listener
sqlplus / as sysdba and execute alter system register;
You can verify that the SID was changed by executing the following query: select instance_name from v$instance;
I had some problems with the solution posted by Johannes, so I had to do some extra steps.
When trying to connect to oracle (step 4) by doing sqlplus / as sysdba I got:
ERROR: ORA-12560: TNS:protocol adapter error
The solution for this was executing the following line:
oradim -start -sid NEW_SID_NAME
Then connecting with / worked fine, but trying to connect to NEW_SID_NAME with system or HR got me another problem:
ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I checked that with the query select instance_name from v$instance; that the listener would be NEW_SID_NAME, and so did. But running lsnrctl status in the command line or querying select name from dba_services; didn't show NEW_SID_NAME as a listener.
The solution of this problem was executing the followind sentence on sqlplus:
alter system set service_names='NEW_SID_NAME';
Maybe you'll need to execute alter system register; after this also.
After doing this two steps I can connect to the NEW_SID_NAME with system and HR.
Hope it helps
In version 11g, all of the previous solution didn't work... I always get the following error when trying to do the sqlplus / as sysdba :
ERROR: ORA-12560: TNS:protocol adapter error
Luckily I found a script to do what I wanted to do under [XE_HOME]\config\scripts. The script is named XE.bat and it will instantiate a new database from scratch asking you for the sysPassword along the process. So what I did was :
Stop and remove the existing service if any:
oradim -delete -sid XE
Stop the listener
Configure the SPFILE as explained by Johannes
Make a copy of the script XE.bat, you can name it whatever you want
Edit the copy of the script as follows :
Change line "set ORACLE_SID=XE" to "set ORACLE_SID=NEW_SID_NAME"
Change wherever you see "-sid XE" to "-sid NEW_SID_NAME"
Update the line where it calls the "orapwd.exe" command to point to a file called PWDNEW_SID_NAME.ora instead of PWDXE.ora
Update the line that echos the spfileXE.ora into the initXE.ora to echo spfileNEW_SID_NAME.ora into initNEW_SID_NAME.ora (this part may render the step 3 useless but I prefer to do it anyway, just in case...)
Execute the script... It will prompt you for the SYSTEM password a few times saying
Enter value for 1:
or
Enter value for 2:
That's it, the new database with your NEW_SID_NAME is up and running!!