Home » RDBMS Server » Networking and Gateways » TNS adapter error (Windows Pro 7, Oracle XE)
TNS adapter error [message #641323] Thu, 13 August 2015 06:06 Go to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
Hi

I have Oracle XE on a server, and on the workstation my software works fine. My software can login as its user. I can TNSPING the XE and my own service.

But when I want to take an export backup (EXP) or login at the command prompt, using my user or using SYSTEM I get the error:

C:\app\administrator\product\11.2.0\client_1\BIN>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on To Aug 13 12:53:35 2015

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: aquser
Enter password:
ERROR:
ORA-12560: TNS: protokolladapterfel (protocoll adapter error)

I have googled and tried several things (TNS_NAMES in Environment variables etc) but not succeeded.

Any suggestions? Thanks!!!

Per-Olof

Re: TNS adapter error [message #641329 is a reply to message #641323] Thu, 13 August 2015 06:47 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
What do the following commands return?
C:\> sc query OracleServiceXE

C:\> echo %ORACLE_SID%


[Edit: typo]

[Updated on: Thu, 13 August 2015 06:48]

Report message to a moderator

Re: TNS adapter error [message #641331 is a reply to message #641329] Thu, 13 August 2015 07:29 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
C:\> sc query OracleServiceXE

No service installed (The Oracle database is on a server, not on the workstation)

C:\> echo %ORACLE_SID%

xe
Re: TNS adapter error [message #641332 is a reply to message #641331] Thu, 13 August 2015 07:32 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Are you doing your export on the workstation? (Not the database server?)

If so, on the workstation:
C:\> tnsping xe

Also, on the server:
C:\> sc query OracleServiceXE

Re: TNS adapter error [message #641334 is a reply to message #641332] Thu, 13 August 2015 07:38 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
I tried to export (EXP) on the workstation, but this is what failed and made me realize something is wrong.

tnsping xe works fine, and I still can use my system (which logs in as its own user).

I cannot at the moment access the server (will need to get the password for it). But since I can use my software system which accesses the server it should be fine?
Re: TNS adapter error [message #641335 is a reply to message #641334] Thu, 13 August 2015 07:44 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
So try this:
C:\> exp system/<system_password>@XE ....

Note: @XE after the password with no space in between.
Re: TNS adapter error [message #641336 is a reply to message #641335] Thu, 13 August 2015 07:49 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
EXP starts running, when it asks for the file name I get an error: failed to open xxx.dmp for write

I tried several names, same error!

Re: TNS adapter error [message #641337 is a reply to message #641336] Thu, 13 August 2015 07:56 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
That is not your original error.

Please show us what you are doing. Copy and Paste the whole session including the "exp" command you use until the error message, please.

[Edit: typo]

[Updated on: Thu, 13 August 2015 07:56]

Report message to a moderator

Re: TNS adapter error [message #641339 is a reply to message #641337] Thu, 13 August 2015 07:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

... and create a new topic in the "Server Utilities" for this problem.
In this topic, just thank people who spent time to help you to solve your problem.

Re: TNS adapter error [message #641340 is a reply to message #641339] Thu, 13 August 2015 08:05 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
Here is my session


C:\app\administrator\product\11.2.0\client_1>cd bin

C:\app\administrator\product\11.2.0\client_1\BIN>exp

Export: Release 11.2.0.1.0 - Production on To Aug 13 12:34:18 2015

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.


Username: aquser
Password:

EXP-00056: ORACLE error 12560 encountered
ORA-12560: TNS: protokolladapterfel
EXP-00000: Export terminated unsuccessfully

C:\app\administrator\product\11.2.0\client_1\BIN>services.msc

C:\app\administrator\product\11.2.0\client_1\BIN>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on To Aug 13 12:40:49 2015

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: system
Enter password:
ERROR:
ORA-12560: TNS: protokolladapterfel

C:\app\administrator\product\11.2.0\client_1\BIN>path
PATH=C:\ProgramData\Oracle\Java\javapath;C:\app\administrator\product\11.2.0\cli
ent_1\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS
Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Syste
m32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;
C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Intel\Intel
(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management
Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Co
mponents\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\
IPT;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Common Files\Lenovo;C:\Program F
iles\TortoiseSVN\bin;C:\MSE\uniPaaS_1.9\cvs_client;C:\Program Files (x86)\Common
Files\lenovo\easyplussdk\bin


C:\app\administrator\product\11.2.0\client_1\BIN>tnsping aquila

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 13-AUG-2
015 12:44:27

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Used parameter files:
C:\app\administrator\product\11.2.0\client_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.10.20)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = XE)))
OK (30 msec)

C:\app\administrator\product\11.2.0\client_1\BIN>tnsping xe

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 13-AUG-2
015 12:44:41

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Used parameter files:
C:\app\administrator\product\11.2.0\client_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.10.20)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = XE)))
OK (0 msec)

C:\app\administrator\product\11.2.0\client_1\BIN>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on To Aug 13 12:51:16 2015

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: system
Enter password:
ERROR:
ORA-12560: TNS: protokolladapterfel

C:\app\administrator\product\11.2.0\client_1\BIN>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on To Aug 13 12:51:52 2015

Copyright (c) 1982, 2010, Oracle. All rights reserved.

ERROR:
ORA-12560: TNS: protokolladapterfel


C:\app\administrator\product\11.2.0\client_1\BIN>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on To Aug 13 12:53:35 2015

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: aquser
Enter password:
ERROR:
ORA-12560: TNS: protokolladapterfel

C:\app\administrator\product\11.2.0\client_1\BIN>sc query OracleServiceXE
[SC] EnumQueryServicesStatus:OpenService MISSLYCKADES 1060:

Angiven tjänst är inte installerad.


C:\app\administrator\product\11.2.0\client_1\BIN>echo %ORACLE_SID%
xe

C:\app\administrator\product\11.2.0\client_1\BIN>exp system/oracle@xe

Export: Release 11.2.0.1.0 - Production on To Aug 13 14:47:36 2015

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Productio
n
Enter array fetch buffer size: 4096 >

Export file: EXPDAT.DMP > c:\aquila150813.dmp

EXP-00028: failed to open c:\aquila150813.dmp for write
Export file: EXPDAT.DMP >

EXP-00028: failed to open EXPDAT.DMP for write
Export file: EXPDAT.DMP > aquila.dmp

EXP-00028: failed to open aquila.dmp for write
Export file: EXPDAT.DMP >
Re: TNS adapter error [message #641341 is a reply to message #641340] Thu, 13 August 2015 08:12 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Quote:

Export file: EXPDAT.DMP > c:\aquila150813.dmp

There is your problem. You're not specifying the path correctly. Try:
Export file: EXPDAT.DMP > c:\temp\aquila150813.dmp

Note: C:\and sub-directory TEMP

[Edit: clarification]

[Updated on: Thu, 13 August 2015 08:14]

Report message to a moderator

Re: TNS adapter error [message #641342 is a reply to message #641341] Thu, 13 August 2015 08:13 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
same error

(thanks for helping!)
Re: TNS adapter error [message #641343 is a reply to message #641342] Thu, 13 August 2015 08:14 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Sorry, I mis-typed. Try in a sub directory, not C:\
Re: TNS adapter error [message #641344 is a reply to message #641343] Thu, 13 August 2015 08:20 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
tried subdirectory, same error..


From my system I have a backup funktion that the ordinary users runs, which sends the command.
C:\app\administrator\product\11.2.0\client_1\BIN\EXP USERID=aquser/aqpw@XE FILE=C:\aquila\backup\aquser150813.dmp

This has always worked, for many years, both with the database on a separate server, and when it is on the same computer.

Per-Olof
Re: TNS adapter error [message #641345 is a reply to message #641344] Thu, 13 August 2015 08:48 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Productio
multiple ORACLE_HOME exists
Problem is misconfiguration of OS environment
Re: TNS adapter error [message #641347 is a reply to message #641345] Thu, 13 August 2015 08:59 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
Why has it then worked several years and now suddenly not?
Re: TNS adapter error [message #641349 is a reply to message #641347] Thu, 13 August 2015 09:09 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
perherman wrote on Thu, 13 August 2015 06:59
Why has it then worked several years and now suddenly not?


something changed

Is system hardware 64-bit?
Re: TNS adapter error [message #641350 is a reply to message #641349] Thu, 13 August 2015 09:10 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
Yes, 64-bit

Re: TNS adapter error [message #641352 is a reply to message #641350] Thu, 13 August 2015 09:14 Go to previous messageGo to next message
perherman
Messages: 12
Registered: May 2005
Location: Sweden
Junior Member
Thanks for helping out; I need to go from the computer now but will continue tomorrow afternoon...

Per-Olof
Re: TNS adapter error [message #641375 is a reply to message #641352] Thu, 13 August 2015 16:04 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is one of your unsuccessful attempts to connect to the XE database using SQL*Plus:Per-Olof

C:\app\administrator\product\11.2.0\client_1\BIN>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on To Aug 13 12:53:35 2015

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: aquser
Enter password:
ERROR:
ORA-12560: TNS: protokolladapterfel

What happens if you - when prompted for username - enter aquser@xe (i.e. username + @ + database alias) instead of just username)? And, of course, its password.


As of you being unable to create the DMP file: Windows 7 might not allow you to write to root directory of the C: disk. Someone had already suggested to use a subdirectory, such as c:\exports\my_export.dmp. Make sure that subdirectory exists. Try to create it from the command prompt (not through Windows Explorer), such as
C:\>mkdir exports

C:\>exp scott/tiger@ora10 file=c:\exports\scott.dmp

Export: Release 11.2.0.2.0 - Production on ╚et Kol 13 23:02:40 2015

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Export done in EE8MSWIN1250 character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SCOTT
...

Any improvement?
Re: TNS adapter error [message #641377 is a reply to message #641375] Thu, 13 August 2015 18:29 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
C:\app\administrator\product\11.2.0\client_1\BIN>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on To Aug 13 12:51:16 2015

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: system
Enter password:
ERROR:
ORA-12560: TNS: protokolladapterfel
=======================================================
Getting TNS error when no SQL*Net should be involved typically is an OS misconfiguration on DB Server system
Are both OS Services for listener & database running?

If you create new Windows file system directories, make sure that OS protection mask is such that any OS user can write news files into it.
Previous Topic: ORA-12170 TNS: Time-out of connection
Next Topic: Oracle LDAP connection fails over SSL with wallet
Goto Forum:
  


Current Time: Thu Mar 28 03:35:40 CDT 2024