TNS adapter error [message #641323] |
Thu, 13 August 2015 06:06 |
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 #641331 is a reply to message #641329] |
Thu, 13 August 2015 07:29 |
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 |
gazzag
Messages: 1119 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:
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 |
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 |
gazzag
Messages: 1119 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 |
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 #641340 is a reply to message #641339] |
Thu, 13 August 2015 08:05 |
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 |
gazzag
Messages: 1119 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 #641344 is a reply to message #641343] |
Thu, 13 August 2015 08:20 |
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 #641375 is a reply to message #641352] |
Thu, 13 August 2015 16:04 |
|
Littlefoot
Messages: 21823 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 asC:\>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 |
|
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.
|
|
|