I'm trying to access DB2 on AS400 from oracle database using oracle gateway for ODBC.
I'm using the IBM i Access for windows as ODBC driver.
my initdg4odbc.ini gateway configuration is:
HS_FDS_CONNECT_INFO = DSN_name
HS_LANGUAGE=ARABIC_AMERICA.AR8MSWIN1256
Database character set is : ARABIC_AMERICA.AR8MSWIN1256
when I query column with Arabic characters it returns in reversed order:
any suggestions please?
thanks
Related
I am looking to create a jdbc connection to an ibm db2 as400 using sqlalchamy in python
I think you can use sqlalchemy-jdbcapi 1.2.2. It says IBM DB2 and IBM DB2 for mainframes is supported
I don't seem to have the format of url string correct. Does anyone please have an example of the connection url or connection string for the create_engine
I can connect using jaydebeapi as follows
conn = jaydebeapi.connect(
jclassname='com.ibm.as400.access.AS400JDBCDriver',
url=host_url,
driver_args=[user_name,password],
jars=driver_location
)
I can do a conn.cursor() so I am assuming I am connected
When I try to create an sqlalchamy engine as follows
engine=create_engine("jdbcapi+jdbc:as400//{}:{}#{};JDBC_DRIVER_PATH='{}'".format(username, password,host_thatworks_elsewhere,driver_location)
It keeps on giving me sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string when I think the host is correct. I've tried // in front of the host a port after it. I copied the host from my DB tool that i have a connection created with and there is no port number specified there
I am assuming you follow this format for the connection string and add the JDBC_DRIVER_PATH so something like
create_engine("jdbcapi+jdbc:as400//username:password#HOST:1521/Database;JDBC_DRIVER_PATH ='x'")
other than that I guess try to connect using ibm-db-sa 0.3.7 and pyodbc. It can not find my odbc driver there and yes I installed it
Is it possible to create a connection to OBIEE from Oracle SQL Developer?
I know it is possible to create an ODBC connection to the Oracle BI server within the Windows ODBC Data Source Administrator, and that other ODBC client tools can use that ODBC connection to run SQL against the BI server, but I don't see any way for SQL Developer to use that ODBC connection.
I'm on OBIEE 12.2.1.4 and SQL Developer 17.3.0.271.
UPDATE
Based on Robin Moffatt's article at https://rmoff.net/2016/03/28/connecting-to-obiee-via-jdbc-with-jisql/, I used jisql (https://www.xigole.com/software/jisql/jisql.jsp) to set up a connection to OBIEE using the JDBC driver that ships with the OBIEE client -- bijdbc.jar, which is located at $ORACLE_HOME/bi/bifoundation/jdbc/.
Following is a screenshot showing how jisql is able to successfully connect to my OBIEE server via the bijdbc.jar driver and run an example SQL statement; the Oracle-specific connection details are outlined in red:
Screenshot 1: OBIEE JDBC connection test using jisql
My next step was to try to implement this same successful JDBC connection in SQL Developer. To that end, I added bijdbc.jar to SQL Developer's third-party JDBC drivers:
Screenshot 2: bijdbc.jar added to SQL Developer third-party JDBC drivers
After adding the JDBC driver, I did not see a new tab in SQL Developer's connection dialog. (By comparison, in the past, when I have added other third-party JDBC drivers, such as the jTDS and MySQL drivers also seen in screenshot 2, new tabs had become available.)
Since there was not a new tab in SQL Developer's connection dialog, I tried setting the Oracle tab's connection type to Advanced and inserting the JDBC connection string as the Custom JDBC URL. Testing that connection leads to a "String index out of range: -1", as seen in this screenshot:
Screenshot 3: Error using custom JDBC URL in SQL Developer
Since that same JDBC connection string works in jisql, I suspect that either I'm doing something wrong, or SQL Developer does not support connecting to OBIEE via that bijdbc driver.
Ok, fair enough. Have a look at what Andrew did to make the ODBC drivers usable in Excel - it's basically down to manipulating things in Windows:
https://www.rittmanmead.com/blog/2017/02/working-with-obiee-data-in-excel-using-odbc/
Just adding a final answer here in case anyone stumbles upon this page asking the same question:
No, SQL Developer does not currently support connecting to an OBIEE server, although other tools can be used to connect to the server using either ODBC or JDBC.
Am evaluating options other than either Sybase's DirectConnect or IBM's DB2Connect to connect to DB2 running on z/OS. From what our findings have shown us so far, we need to connect and also do format translation from ASCII to EBCDIC and vice versa. We are currently seeking an open source (not necessarily community edition) to help us achieve this. Any thoughts will always help.
The DB2 Data Server Client allows you to connect to a DB2 database on z/OS using JDBC without requiring DB2 Connect in between. However, you will still need a DB2 Connect license, contained in the db2jcc_license_cisuz.jar file that comes with any DB2 Connect product.
I need connect to Oracle database use jdbc driver. I look on structure URL string to connect and not see, where i xan set charSet to connect.
Help me please.
You shouldn't need to set the character set. Java uses Unicode internally and the data from the database should be converted from the database character set to UTF-16 by the JDBC driver.
Can we connect from excel (excel-VBA) to oracle(in a remote server) without
installing oracle client in the client system... I tried all the options
below but it is throwing error as oracle client should be installed.
below is the connectionstring i have used
1)strConnection = "Provider=OraOLEDB.Oracle;Data Source=SourceName;User Id=Username;
Password=password;"
2)strConnection = "Provider=MSDAORA;Data Source=SourceName;UserId=Username;
Password=password;"
3)strConnection = "Provider=MSDAORA.1;User ID=Username/password;Data
Source=SourceName;Persist Security Info=False"
4)strConnection = "Driver={Microsoft ODBC for Oracle};SERVER=(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)(PORT=1521)
)(CONNECT_DATA (SERVICE_NAME=SERVICEName)));uid=Username;
pwd=password;Uid=Username;Pwd=password;"
5)strConnection = "SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)
(PORT=1521))(CONNECT_DATA =(SERVICE_NAME=SERVICEName)));
uid=Username;pwd=password;"
You need some form of client to connect to an Oracle database, local or remote.
You have two choices:
Install an Oracle SQL*Net client. If your server is Oracle 10g or higher you don't need the full-blown client: you can use the more lightweight Instant Client.
Buy an n-tier ODBC driver which supports generic connectivity. OpenLink is one, there are others.
".can we not connect to the oracle
database with only the Drivers or
providers present in our OS(Windows
XP).."
Think of it this way: the ODBC drivers do not connect to the database, they connect to SQLNet. Then SQLNet connects to the database.
"what is the difference between
Drivers,providers with the client. "
The Oracle provided drivers are better tuned for Oracle than the ones MS provides, but in this context they are the same: both require the presence of an Oracle client to work.