Failed to open database: QOCI: Unable to logonORA-12154: TNS:could not resolve the connect identifier specified
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland cd oci make -f MakefileMAKE Version 5.2 Copyright (c) 1987, 2000 Borland ilink32 @MAKE0000.@@@Turbo Incremental Link 5.60 Copyright (c) 1997-2002 BorlandError: Unresolved external '_OCILogoff' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIHandleFree' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCITransStart' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIErrorGet' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCITransCommit' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCITransRollback' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIAttrGet' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIParamGet' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCILogon' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIServerVersion' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIDescriptorFree' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIHandleAlloc' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIStmtPrepare' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIBindByName' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIBindByPos' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIAttrSet' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIDescriptorAlloc' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIDefineByPos' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIStmtExecute' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIStmtFetch2' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIStmtGetPieceInfo' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIStmtSetPieceInfo' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIStmtFetch' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCILobGetLength' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCILobCharSetForm' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCILobRead' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJError: Unresolved external '_OCIEnvCreate' referenced from C:\QT\3.3.6\PLUGINS\SRC\SQLDRIVERS\OCI\OBJ\QSQL_OCI.OBJ** error 2 ** deleting ..\..\..\sqldrivers\qsqloci.dll** error 1 ** deleting sub-oci** error 1 ** deleting sub-sqldrivers** error 1 ** deleting sub-pluginsThe build process failed!
000029E0 390 0185 OCILogoff00002724 320 013F OCIHandleFreeи т.д.
SALES = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.8.254)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sales) ) )aaaaa = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.8.254)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sales) ) )
TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 19-ФЕВ-2007 15:18:54Copyright (c) 1991, 2005, Oracle. All rights reserved.System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\listener.oraLog messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.logTrace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trcTrace level is currently 0Started with pid=1412Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.211.219)(PORT=1521)))Listener completed notification to CRS on startTIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODEListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))19-ФЕВ-2007 15:19:48 * service_register * xe * 019-ФЕВ-2007 15:20:00 * service_update * xe * 019-ФЕВ-2007 15:20:18 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\test\test.exe)(HOST=NOTEBOOK)(USER=Tuki-Tuki))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.211.219)(PORT=1393)) * establish * XE * 019-ФЕВ-2007 15:20:18 * service_update * xe * 019-ФЕВ-2007 15:20:21 * service_update * xe * 019-ФЕВ-2007 15:20:33 * service_update * xe * 019-ФЕВ-2007 15:21:06 * service_update * xe * 019-ФЕВ-2007 15:21:40 * service_update * xe * 0
#include <qapplication.h>#include <qsqldatabase.h>#include <qsqlquery.h>#include <iostream.h>#include "form1.h"#define DB_ORDERS_DRIVER "QOCI8"#define DB_ORDERS_DBNAME "XE"#define DB_ORDERS_USER "ASONIKA_CH"#define DB_ORDERS_PASSWD "NADEGNOST"#define DB_ORDERS_HOST "192.168.211.219" bool createConnections() { QSqlDatabase *oracle = QSqlDatabase::addDatabase( DB_ORDERS_DRIVER, "ORACLE" ); oracle->setDatabaseName( DB_ORDERS_DBNAME ); oracle->setUserName( DB_ORDERS_USER ); oracle->setPassword( DB_ORDERS_PASSWD ); oracle->setHostName( DB_ORDERS_HOST ); if ( ! oracle->open() ) { qWarning( "Failed to open orders database: " + oracle->lastError().text() ); return FALSE; } return TRUE; }int main( int argc, char ** argv ){ QApplication a( argc, argv ); Form1 w; createConnections(); w.show(); a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ); return a.exec();}
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = XE) (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = XE) (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server) (PROGRAM = extproc) ) )LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.211.219)(PORT = 1521)) ) )DEFAULT_SERVICE_LISTENER = (XE)
XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.211.219)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) )EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )
19-ФЕВ-2007 21:27:56 * service_register * xe * 019-ФЕВ-2007 21:28:07 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\test\test.exe)(HOST=NOTEBOOK)(USER=Tuki-Tuki))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.10.0.2)(PORT=1138)) * establish * XE * 019-ФЕВ-2007 21:28:08 * service_update * xe * 019-ФЕВ-2007 21:28:14 * service_update * xe * 019-ФЕВ-2007 21:28:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\test\test.exe)(HOST=NOTEBOOK)(USER=Tuki-Tuki))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.10.0.2)(PORT=1139)) * establish * XE * 019-ФЕВ-2007 21:28:32 * service_update * xe * 019-ФЕВ-2007 21:28:35 * service_update * xe * 019-ФЕВ-2007 21:28:38 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\test\test.exe)(HOST=NOTEBOOK)(USER=Tuki-Tuki))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.10.0.2)(PORT=1140)) * establish * XE * 019-ФЕВ-2007 21:28:38 * service_update * xe * 019-ФЕВ-2007 21:28:41 * service_update * xe * 019-ФЕВ-2007 21:28:43 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\test\test.exe)(HOST=NOTEBOOK)(USER=Tuki-Tuki))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.10.0.2)(PORT=1141)) * establish * XE * 019-ФЕВ-2007 21:28:44 * service_update * xe * 019-ФЕВ-2007 21:28:47 * service_update * xe * 0