Trying to connect to AS400 from Oracle = ORA-28545
Hello,
I woul like to connect to an AS400 DB from an Oracle DB (OS: Windows Server 2003 SP2 - 32 bits, DB: Oracle DB 10g Release 10.2.0.1.0).
To that, I have done the following steps:
1) Create System DSN
Name: AS400_DTA
Driver: iSeries Access ODBC Driver
2) Edit tnsnames.ora:
SID_LIST_LISTENER =
(SID_DESC =
(SID_NAME = AS400_DTA)
(ORACLE_HOME = D:\oracle\bise1\db)
(PROGRAM = hsodbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = HOST)(PORT = 1521))
3) Edit listener.ora:
(SID_DESC =
(SID_NAME = AS400_DTA)
(ORACLE_HOME = D:\oracle\bise1\db)
(PROGRAM = hsodbc)
4) create initAS400_DTA in D:\oracle\bise1\db\hs\admin:
(SID_DESC =
(SID_NAME = AS400_DTA)
(ORACLE_HOME = D:\oracle\bise1\db)
(PROGRAM = hsodbc)
5) Restart the listener
6) Create DB link:
create public database link AS400_DTA connect to "user" identified by "pwd" using 'AS400_DTA';
In this step I have the following error:
Link : "CRPDTA.REGRESS.RDBMS.DEV.US.ORACLE.COM"
Error : ORA-28545: error diagnosticado por Net8 al conectar a un agente
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: 2 lines precediendo a DTA
What I am doing wrong? How can I solve the issue?
How can I test the ODBC drivers to ensure that connectivity is made to the AS400 database?
If I execute > tnsping AS400_DTA, the result is:
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 15-JUN-2011 15:05:37
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Archivos de parámetros utilizados:
D:\oracle\bise1\db\network\admin\sqlnet.ora
Adaptador TNSNAMES utilizado para resolver el alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.18.125.103)(PORT = 1521))) (CONNECT_DATA = (SID = AS400_CRPDTA)) (HS = OK))
TNS-12541: TNS:no hay ningún listener
I appreciate any idea/suggestion.
Thank you in advance!
Regards,
Mónica.
Monica,
The error reported from the tnsping is -
Adaptador TNSNAMES utilizado para resolver el alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.18.125.103)(PORT = 1521))) (CONNECT_DATA = (SID = AS400_CRPDTA)) (HS = OK))
TNS-12541: TNS:no hay ningún listener
so looks like a problem with the listener and it is also reporting the SID as AS400_CRPDTA and not AS400_DTA as you have in the tnsnames.ora. Are you accessing the correct tnsnames.ora file ?
Also, the listener.ora entry is -
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = HOST)(PORT = 1521))
Are you using the actual host name in the HOST entry instead of (HOST = HOST) ?
What is the output from issuing -
lsncrtl
then the 'status' and 'services' command ?
And an obvious question - did you stop and start the listener after adding the new entry ?
Also, this is completely incorrect -
4) create initAS400_DTA in D:\oracle\bise1\db\hs\admin:
(SID_DESC =
(SID_NAME = AS400_DTA)
(ORACLE_HOME = D:\oracle\bise1\db)
(PROGRAM = hsodbc)
The initAS400_DTA.ora file should only have these entries -
HS_FDS_CONNECT_INFORMATION =AS400_DTA
HS_FDS_TRACE_LEVEL=debug
And finally, 10.2 HSODBC is now desupported and you should install and use the replacement product which is the 11g Database Gateway for ODBC (DG4ODBC).
The following note has links to further information -
Note.1083703.1 Master Note for Oracle Gateway Products
If you want to continue to use HSODBC then refer to this note -
Note 109730.1 How to setup generic connectivity (HSODBC) for Windows NT
but we strongly recommend you install and use DG4ODBC so that you are on a fully supported version.
Regards,
Mike
Similar Messages
-
Connect to PostgreSQL from Oracle 11gR2
Hi folks!
Trying to connect to PostgreSQL from Oracle 11.2.0.3(RAC). My configuration files are:
initRT.ora:
# HS init parameters
HS_FDS_CONNECT_INFO = RT
HS_FDS_TRACE_LEVEL = ON
HS_FDS_TRACE_FILE_NAME = /tmp/odbc_trace.log
HS_FDS_TRACE_LEVEL = 4
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
# ODBC specific environment variables
set ODBCINI=/etc/unixODBC/odbc.inilistener.ora:
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME =/u01/app/oracle/product/11.2/db)
(PROGRAM = extproc)
(SID_DESC=
(SID_NAME = RT)
(ORACLE_HOME = /u01/app/oracle/product/11.2/db)
(PROGRAM = dg4odbc)
(ENVS = "LD_LIBRARY_PATH=/usr/lib64:/u01/app/oracle/product/11.2/db/lib:/u01/app/oracle/product/11.2/db/hs/lib")
)tnsnames.ora:
RT = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SID=RT))(HS = OK))
isql rt rt3 passw
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> quit
oracle@hostname: psql -h rt rt3 passw
Welcome to psql 8.3.9, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
rt3=>As you can see, I can connect to PostgreSQL. Then in DB I've created DB link as follows:
CREATE DATABASE LINK "RT"
CONNECT TO "RT3" IDENTIFIED BY "passw"
USING 'RT';
oracle@hostname: sqlplus rt3/passw
SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 15 03:46:12 2011
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
Data Mining and Real Application Testing options
rt3@sid1> select * from users@rt;
select * from users@rt
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from RT
Elapsed: 00:00:00.01
rt3@sid1>Don'tunderstand why I can't connect from Oracle? Thanks in advance.
Regards,
Pavel.Hi, sure:
odbc.ini:
[ODBC Data Sources]
RT=RT Database
[RT]
Description = RT Database
Driver = /usr/lib64/psqlodbcw.so
Database = rt3
TraceFile = /u01/app/oracle/diag/rdbms/trace/odbc_rt.trc
Trace = Yes
Servername = rt.domain.com
Port = 5432
Protocol = 6.4
ReadOnly = Yes
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =
Debug = 0
CommLog = 0
oracle@host:> lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-NOV-2011 04:09:23
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 15-NOV-2011 03:30:50
Uptime 0 days 0 hr. 38 min. 32 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/host/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=IP)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=IP)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "RT" has 1 instance(s).
Instance "RT", status UNKNOWN, has 1 handler(s) for this service...
Other servicesListener.log for PROGRAM=dg4odbc is empty. There are a lot of entries for other services.
Regards,
Pavel.
Edited by: Pavel E. on 15.11.2011 13:13 -
Ora-12154 when trying to connect to database from fortran application
I am trying to connect to database and run an simple select query to a table(without any where clause) using pro*fortran code.
the connect strng is like
exec sql connect :uidpwd
where uidpwd = username/password@SID
SID and tnsnames connect string are the same.
The fortran (profortran) code is placed in the database server and there are no errors when make is run.
Tnsping is working fine, also i am able to conect using sql*plus and run the same query.
Please help
Thanks and Regards
NitinHi Nitin
Thanks for the helpful! With your point I'm now Pro! Great thanks.
By the way have your seen that?
Files such as LISTENER.ORA, TNSNAMES.ORA, SQLNET.ORA, if configured manually, or copied and edited from earlier releases of Oracle Database may have record attributes that are incompatible with Oracle Database 10g release 2. The software cannot read such files. The required record format is stream_lf and the record attributes are carriage_control and carriage_return.
This may result in:
Inability to start the listener
Services not registered with the listener
Inability to connect to other databases
ORA-12154: TNS:could not resolve service name
Run the following command on each file affected:
$ DIR/FULL filename
An output similar to the following may be displayed:
Record format: Variable length, maximum 255 bytes
Record attributes: Carriage return carriage control
If the output includes the preceding entries, then run the following command:
$ CONVERT/FDL=SYS$INPUT filename filename
RECORD
CARRIAGE_CONTROL CARRIAGE_RETURN
FORMAT STREAM_LF
^Z
Otherwise herewith an interesting metalink note. Doc ID: Note:437597.1
Subject: Ora-12154 When Executing Pro*Fortran Code Compiled With Oracle 10g.
Hope this will also help you...
Cheers
Hubert -
Getting exception ORA-12705 while trying to connect to database from forms 9i
Hello All,
I have installed 9i database and I gave path for oracle home as Oracle_path while installing. then I installed 9i dev suite, Installer forced me to use different Oracle home, so I gave Odev_path as path.
I have created server alias name from dev suite to Oracle database and I could connect to database from froms 9i. suddenly it started giving me the following exception when I try to connect database from forms 9i.
ORA-12705 invalid or unknown NLS parameter value specified
could some one help toresolve the issue.
Thanks in advance
RajI have already seen this document and tried it out, but it didn't work. And I have tried out numerous other tips that I have found in different places on the web.
Is the client installation of any relevance? I notice that this user has a different installation from the one that I have, and that he amongst other things doesn't have sql plus installed. -
Trying to connect Excel 2010 to Oracle
Hello,
I am trying to connect Excel 2010 directly to the Oracle database at work. I was hoping to combine VBA and SQL to automate queries without having to use SQL Developer or the bespoke enterprise software to then export the data into a spreadsheet. I have downloaded the ODBC driver and installed it onto my PC. I have tried to configure the connection and the tnsnames.ora file but it will not connect (I can get the exact error from work tomorrow).
I have an XML file that contains all of the connection details (such as the ports, passwords and the server name) for the databases that I need to access. There isn’t anyone who can help me at work as the former IT manager has left and my current manager has very little technical knowledge.
The network is managed by a different part of the business at an external site containing all of the servers. Although I have an administrator account, it is very restricted so I cannot use the command prompt but I can install software.
I would be grateful for any advice. If it helps the operating system I am using is Windows Vista 32-Bit. I am unsure which version of Oracle we are using (it might be 10g but is there anything I could type into SQL Developer that would display the version of Oracle I am using?).
Many thanks in advance and sorry for probably not explaining things very well,
MattI think I am going to give in with ODBC for the time being and I don’t want to waste any of your time.
Just to make everything clear in case I missed something important out:
I ran the select banner from v$version statement and retreived:
Oracle Database 10g Release 10.2.0.5.0 - 64bit Production
PL/SQL Release 10.2.0.5.0 - Production
"CORE 10.2.0.5.0 Production"
TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
I originally installed the latest version of 11g ODBC and reinstalled it as I didn't think it was working. I then installed 10g version today but I couldn't find ODBC.exe file like I could in the 11g version.
I can't get the tnsnames.ora file off the database server as I can't connect to it. I know the server name but I think I may be restricted from accessing it as the network and user accounts are really locked down. I read somewhere when I was searching that there was a way of generating the tnsnames.ora file which would be quite useful as there wouldn't be any mistakes.
Like I have mentioned before I can’t access the command prompt and the only way I can connect to the database is through SQL Developer (which I have all the connections for in an XML file).
I tried the ADO method and it didn't work, but after getting home and trying something I know how to resolve the ActiveX Objects related error I was getting, so maybe I could get this method to work.
It is just frustrating that I know this could work but things aren’t as simple as I thought although the advice I have received has been really useful. Thanks for all the help. -
Can't connect to MySQL from Oracle 11g R1
Hello Oracle's guru.
Sorry for my English it's not my native langauge
Enviroments: Oracle 11g R1, Windows 7, ODBC Driver 5.1.8
I have a some problem with creation gateway to connection to MySQL, and I hope somebody can help me.
So,
1) ODBC name - MYSQLDSN
2) initMYSQLDSN.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = MYSQLDSN
HS_FDS_TRACE_LEVEL = 0
3) listener.ora
# listener.ora Network Configuration File: E:\app\voxa\product\11.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=MYSQLDSN)
(ORACLE_HOME=E:\app\voxa\product\11.1.0\db_1)
(PROGRAM=dg4odbc)
4) tnsnames.ora
# tnsnames.ora Network Configuration File: E:\app\voxa\product\11.1.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
CXWH =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CXWH)
MYSQLDSN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(CONNECT_DATA =(SID = MYSQLDSN))
(HS = OK)
Then I trying to connect to MySQL using sql*plus:
C:\Windows\system32>sqlplus
SQL*Plus: Release 11.1.0.6.0 - Production on Ср Июн 1 12:13:39 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
login: system
pass:
Connect to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create public database link MYSQLDSN
2 connect to DEMO identified by "DEMO" using 'MYSQLDSN';
Channel was created
SQL> select * from items@MYSQLDSN;
select * from items@MYSQLDSN
Error in line 1:
ORA-28500: connection with ORACLE with other system return message:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.12]You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right
syntax to use near
'"ITEMS_KEY",A1."ITEM_NAME",A1."ITEM_CATEGORY",A1."ITEM_VENDOR",A1."ITEM_SKU",A1
.' at line 1
ORA-02063: предшествующий 2 lines из MYSQLDSN
If I trying create new ODBC mobule via OWB, I had next error:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.12]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"DUAL"' at line 1
ORA-02063: предшествующий 2 lines из OWB_56
What I do wrong? Please help meHi,
You can download the 11.1.0.7 patchset from My Oracle Support -
support.oracle.com
as patch 6890831.
Once logged in click on 'Patches and Updates' and enter the patch number as 6890831 and choose whichever platform you are running.
the readme explains how to apply the patch to an existing 11.1.0.6 install.
The url you posted is only for complete product installs, but 11.1.0.7 is only a patchset that must be applied to an existing install.
Regards,
Mike -
Error while trying to connect to Database using Oracle instantclient
I have a linux box where i have downloaded"instantclient-basic-linux.x64-11.2.0.3.0.zip". I have unzipped in /opt/instantclient_11_2.
I am using this as a client in my code for connecting to the oracle 11g database which is in a different server. I have set the below env variables.
LD_LIBRARY_PATH=/opt/instantclient_11_2
CLASSPATH=/opt/instantclient_11_2:...
PATH=/opt/instantclient_11_2:...
When i run my program i am getting the below error.
java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:765)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:414)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)
I am trying to connect through a thick client as below.
Class.forName ("oracle.jdbc.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@hostname_orcl", userid, pwd);
I have seen in some forums that we need to set $ORACLE_HOME and $TNS_ADMIN env variables as well. But, here i am trying to connect to a remote database. what should i set these variables to as i don't have oracle in my machine??
Thankslooks like you didnt complete the install of the instant client. the ORACLE_HOME and TNS_ADMIN points to the location of the tnsnames if you dont have the full tns string in your jdbc connection string
https://kb.berkeley.edu/jivekb/entry.jspa?externalID=1826 -
Connect SQL Server From Oracle
Hi Experts,
I want's to made connection from Oracle 10g to Ms SQL Server 2000. I made necessary entries in receptive file, but still getting an error...
Setting info .....
*/hs/initMYSQLSERVERDSN.ora*
HS_FDS_CONNECT_INFO = MYSQLSERVERDSN
HS_FDS_TRACE_LEVEL = OFF
LISTENER.ORA
LISTENERMYSQLSERVERDSN =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)(queuesize=80)))
SID_LIST_LISTENERMYSQLSERVERDSN=
(SID_LIST=
(SID_DESC=
(SID_NAME=MYSQLSERVERDSN)
(ORACLE_HOME = E:\oracle\product\10.1.0\db_1)
(PROGRAM=hsodbc)
TNSNAME.ORA
MYSQLSERVERDSN =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
(CONNECT_DATA=(SID=MYSQLSERVERDSN))
(HS=OK)
LISTENER start successfully, and tnsping working fine.
But after createing db link , when i execute query desc spt_datatype_info@mysqlserverdsn;
I am geting an error message in listenermysqlserverdsn.log file
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
Please help me out from this issue.
Thanks in Advance
ManiYou OS ?
I have also done the same.
I did install SQL Server & Oracle on another machine with Windows.
For more pls visit.
http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
Aqeel Nawaz -
Calling stored procedure (AS400) from Oracle
From Oracle, I can't call a simple stored procedure (function created on a AS400) :
1) Let's take a basic function in AS400
CREATE FUNCTION TEST.TEST2 (x INTEGER)
RETURNS INTEGER LANGUAGE
SQL CONTAINS
SQL NO EXTERNAL ACTION DETERMINISTIC
RETURN x * 2
2) Let's test the function in AS400 with a simple SQL :
SELECT TEST.TEST2(5) FROM SYSIBM.SYSDUMMY1
The return result : 10
3) I give the maximum Grants to this function
GRANT ALL ON FUNCTION TEST.TEST2 TO PUBLIC;
4) Testing the function in ORACLE with a simple SQL (with the gateway) :
SELECT TEST.TEST2@DB2DBLINK(5) FROM DUAL
The return result : ERRORS: ORA-06571 and ORA-06512
QUESTION:
Is there any tricks or setting on the gateway to make works functions and also procedures?
Thanks if anyone can help,
MichelMichel,
This is 'expected' behavior when using an DB2/400 function, but the manual describes on how to be able to use a DB2/400 function:
Oracle® Transparent Gateway for DB2/400
Installation and User’s Guide
10g Release 2 (10.2) for IBM iSeries OS/400
Chapter 9 - Developing aplication
Paragraph - 9.6 Using DB2/400 Stored Functions with the Gateway
<snippet>
If the stored function is referenced within a SQL command, then the user must specify its name in the IFS file /HOME/MYINST/RDBMS/ADMIN/CALL_NAMES.ORA, where, MYINST is your instance name. If you attempt to use an AS/400 stored function (DB2/400 user defined function) in a SQL command without specifying that name in the above IFS file, then you will get the Oracle error 'ORA-06571: function xxxxx does not guarantee not to update database'. After changing this file, it is recommended that you bring down and then re-start the instance. Other than the declaration of the function name in the above IFS file, the gateway does not require any other special definitions in order to invoke the DB2/400 stored function.
</snippet>
The manual can be downloaded from http://docs.oracle.com :
http://download.oracle.com/docs/cd/B19306_01/gateways.102/b16222.pdf
Ed -
SQL Connect problem - migration from Oracle 7.3.4 to Oracle 8.0.6
Our development environment has just been upgraded from HP10.20
to HP11 and the database from Oracle 7.3.4.0 to Oracle 8.0.6.0.
I am now having problems with one of the PRO*C programs. The old
executable( compiled in the old enviroment HP10/Oracle734) is
working fine in the new environment. But after I successfully re-
compiled this program in the new environment, the new executable
is not working and stops at the statement: 'EXEC SQL CONNECT:
userid'. I have checked the userid and Oracle settings, they are
correct. Right after the EXEC SQL, I've tried checking the
status of connection, but it never gets there. The
only change to the make file is using
$(ORACLE8_HOME)/precomp/lib/env_precomp.mk instead of using
$(ORACLE7_HOME)/precomp/env_precomp.mk
Other PRO*C programs which are using exactly the same connecting
statemment are working fine.
Anyone have any ideas, I would appreciate them?
Thanks,I am upgrading with precisely the same varaibles that you encountered
and am receiving the same inability to do a simple CONNECT with
Pro*C. Were you able to resolve this problem? If so, please reply
with some guidance.
Thank you.
- Tad Franson
[email protected] -
How to get connected MS SQL from Oracle
I need to connect MS SQL Server (MSDE exactly) to Oracle 8.1.7
and operate it from Oracle side (some clever data imports from
client's sql server machine to bigger Oracle server). I tried to
use ODBC from client to oracle and works fine, but I need "the
other way". Any Ideas?
Please help,
yours HGhttp://asktom.oracle.com/pls/ask/f?p=4950:8:442320::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1139834557335,%7Bodbc%7D
-
I tried to display gif image from oracle to jsp but nothing appear
i tried to display image from oracle DB to jsp directly without using file processing , and i used Servlet and jsp , Servlet to get image from DB and jsp to use <img> tag , when i Run Servlet code
the image appaer on Microsoft Photo Editor , and when i run jsp the image dose not appear on jsp page , so please anyone has an idea about this broblem ,send the soluation or any information to my e-mail [email protected] , and I'll thankful about your help.
the Servlet and jsp code are below .
thank for your help
Servlet:
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.PrintWriter;
import java.io.IOException;
public class Servlet extends HttpServlet
public void init(ServletConfig config) throws ServletException
super.init(config);
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
response.setContentType("image/gif");
int id = Integer.parseInt(request.getParameter("no"));
// int id = 2 ; when Run Servlet .
ResultSet rs = null;
Connection Lcon = null;
String stmt = " select Image from ImageTable where lmage_id ="+id;
Statement sm = null;
String data1 ="";
try
Lcon = getConntcion();
sm = Lcon.createStatement();
rs = sm.executeQuery(stmt);
if(rs.next())
InputStream in = rs.getBinaryStream(1);
ServletOutputStream sout = response.getOutputStream();
int c;
while((c=in.read())!= -1)
sout.write(c);
in.close();
sout.flush();
sout.close()
}catch(Exception e)
System.out.println("error in selectValue the error is "+e);
finally
rs .close( );
sm .close( );
Lcon.close( );
public Connection getConntcion()
Connection con = null;
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection(",,,,,,,, DB Info ,username and password ,,,,,,,,,,,");
}catch(Exception e)
System.out.println("error in connection the error is "+e);
return con;
Jsp code :
<%@ page contentType="text/html"%>
<html>
<head
</head>
<title> testing image </title>
<body>
<form>
<img src="servlet/Servlet?no=2">
</form>
</body>
</html>InputStream in = rs.getBinaryStream(1);
byte[] image= null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[8192];
int bytesRead = 0;
while ((bytesRead = in.read(buffer, 0, 8192)) != -1)
baos.write(buffer, 0, bytesRead);
image= baos.toByteArray();
in.close();
ServletOutputStream sout = response.getOutputStream();
if (image != null)
sout.write(image);
sout.flush();
} -
Connect to DB2 from oracle 11g on windows 2008 server
Hi Folks,
I want to conenct to DB2 from oracle 11g using DB link.
DB2 :
user : db2user
pwd : db2pwd
database : db2database (OSBLDEV)
able to connect to db2 server (installed on machine M1) using db2 client with above details from machine M2 (where oracle is installed).
Oracle :
user : orauser
pwd : orapwd
host : orahost
port : 1521
service : oraservice
able to connect to oracle server using oracle sql developer with above details on Machine M2 (windows 2008 server)
when i execute the query with database link
select row_id from siebel.s_org_ext@OSBLDEV;
I get the message : ORA-12154: TNS:could not resolve the connect identifier specified.
could you pls check and let me know whether the below enteries are correct or not.
Pls share if you have step by step connectivity from DB2 to oracle using DB link.
1. I have created the Data source for DB2 - test successful
create database link OSBLDEV
connect to "db2user"
identified by "ldb2pwd"
using 'OSBLDEV';
1. I have made the following entry in E:\oracle\product\11.1.0\db_1\hs\admin\initosbldev.ora
HS_FDS_CONNECT_INFO = OSBLDEV
HS_FDS_TRACE_LEVEL = 0
2. I have made the following entry in E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN\tnsnames.ora
OSBLDEV =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=orahost)(PORT=1521))
(CONNECT_DATA=(SID=OSBLDEV))
(HS=OK)
3. I have made the following entry in E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN\listener.ora and releoaded the listner (lsnrctl reload)
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=orahost)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC = # this is the entry for HSODBC
(SID_NAME = OSBLDEV)
(ORACLE_HOME = e:\oracle\product\11.1.0\db_1)
(PROGRAM = hsodbc)
Thanks in advance.1. My listener.ora is placed at the below location:
E:\oracle\product\11.1.0\db_1\NETWORK\ADMIN
2. I have modifed the listener and removed the entry - hsodbc
3. stop and start the listener.
still can't see the service entry in listener status.
C:\>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.1.0.7.0 - Production on 19-JUL-2010 02:27
:08
Copyright (c) 1991, 2008, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.1.0.7.0 - Produ
ction
Start Date 19-JUL-2010 02:21:17
Uptime 0 days 0 hr. 5 min. 52 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File e:\oracle\diag\tnslsnr\DALDEVDBCRM1\listener\alert\log
.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=daldevdbcrm1.corp.nai.org)(PORT=1521
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+asm1", status READY, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+asm1", status READY, has 1 handler(s) for this service...
Service "ARIBADEV" has 1 instance(s).
Instance "ariba", status READY, has 1 handler(s) for this service...
Service "ARIBADEV_XPT" has 1 instance(s).
Instance "ariba", status READY, has 1 handler(s) for this service...
Service "ARIBAXDB" has 1 instance(s).
Instance "ariba", status READY, has 1 handler(s) for this service...
Service "aiad.corp.nai.org" has 2 instance(s).
Instance "aiad1", status READY, has 2 handler(s) for this service...
Instance "aiad2", status READY, has 1 handler(s) for this service...
Service "aiadXDB.corp.nai.org" has 2 instance(s).
Instance "aiad1", status READY, has 1 handler(s) for this service...
Instance "aiad2", status READY, has 1 handler(s) for this service...
Service "aiad_XPT.corp.nai.org" has 2 instance(s).
Instance "aiad1", status READY, has 2 handler(s) for this service...
Instance "aiad2", status READY, has 1 handler(s) for this service...
Service "aianew" has 1 instance(s).
Instance "aianew", status READY, has 1 handler(s) for this service...
Service "aianewXDB" has 1 instance(s).
Instance "aianew", status READY, has 1 handler(s) for this service...
Service "aianew_XPT" has 1 instance(s).
Instance "aianew", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\> -
Linking error while trying to connect to 10 g oracle db through OCCI
Hello experts,
Iam getting a linking error while trying to connect to 10 g through OCCI.I've tried both available Instant client versions,But no luck.now, I am using instant client 11.2.0.2 with visual studio 2005 and oracle 10 g on 32 bit XP. I get "*The procedure entry point OCILobSetContentType could not be located in the dynamic link library OCI.dll*" linking error
How can i fix this error
Thanks in advance..
Regards,
SrihariHello,
Please ensure that you are using correct PATH and ORACLE_HOME settings - for example if IC 11202 is installed in
c:\oracle\11202\instantclient_112
execute on commandline
ORACLE_HOME=c:\oracle\11202\instantclient_112
PATH=%ORACLE_HOME%;%ORACLE_HOME%\bin;%PATH%
before starting VS2005 from commandline - or generate a commandscript
Inside VS2005 please ensure that you are picking up the libraries from
%ORACLE_HOM%\oci\lib\msvc\v8\*
furtheron, copy the
%ORACLE_HOM%\oci\lib\msvc\v8\*.dll
to %ORACLE_HOME% - otherwise by default the v9 ar picked up (copied during installation)
When this has been done, build the code and test - should work
regards,
Frank
Edited by: fscherie on 11.01.2012 12:41 -
Trying to connect as sysdba results in ORA-01031
Database server runs in shared server mode,
so in tnsnames I have entry for network service
name with (SERVER = DEDICATED) option to be
able to connect as sysdba, initialization
parameter REMOTE_LOGIN_PASSWORDFILE is set to EXCLUSIVE,
in password file there is one entry for user sys.
I'm trying to connect with user sys as sysdba,
but the result is ORA-01031 error.
Can anybody tell me how can I make it to work?
Thanks for advise a lot,
P.I have recreated password file,
but it behaves like before, connecting
to database from local machine with
user not in OSDBA or OSOPER group works,
but from other machine it ends with error.
I have one more question: When I connect
from local machine using tnsnames.ora file
in network service name defined in that file
I have (SERVER = SHARED)
and I'm able to connect as sysdba, I thought that
connect as sysdba is possible only with
(SERVER = DEDICATED) when database works in
shared server mode.
Maybe you are looking for
-
I'm using Firefox 8.0 on Suse 11.4 today is 11/28/11 the past 24 hours I've been experiencing this: I always try to right click on links and open in new tab, lately when I do so and move the cursor into the dialog box the box disappears. Also if I on
-
Selecting patches from a GrooveBox
I need some help from folks who use outboard midi modules with logic. My question is below. Before I got into DAW software (GarageBand then Logic Express), I used a "groove box". The one I have is a Roland D2. It has like 600 sounds or there about, m
-
RFC issue in Triggering workflow
Hi, I am trying to trigger a custom workflow from EP in Newly set up ECC 6.0 system. Problem here is, Business object Event is getting triggered in R/3 with custom workflow as reciever, but the workflow is not going to the first stepThe event trace (
-
Hello there! I'm using XPath to parse a document, and so far It was working great! I'm having issues with namespaces though. When the DocumentBuilder is not namespace aware. It works ok. But, when it is namespaceaware. I need to prefix my xpath expre
-
Hi, I'm very junior in programming and I want to build my resume from what I learn everyday at work. Today I learned how to write an application using CF without any interface. What my app. does is to read a text file, my boss calls this file a feed