seting ODBC Datasource in IBM AIX server - odbc

I have develop IBM Message broker flow database application in windows xp environment. the database accessed using ODBC datasource. basically, I use compute node with esql programming to select query in database, and I set the datasource in the compute node properties.
Now want to deployed my project to AIX server. but, I dont know how to set ODBC datasource in AIX server.
can you help me to how to set odbc in AIX server, can you help me to solve my problem ??
Thanks

You need to create an odbc.ini and odbcinst.ini file which has the information about your data source in it, then setup environment variables (LD_LIBRARY_PATH, ODBCINI) to point towards your ini files, driver and driver manager binary files.

Related

Can you connect to CosmosDB from SSAS (Tabular) using the ODBC driver for Cosmos?

I have followed the instructions for setting up a new ODBC connection to CosmosDB. I would like to use this ODBC connection in an SSAS tabular project but I don't see a way to do that. I am on SSDT 15.1. When I click the "Others" data source for OLEDB/ODBC in SSAS, it only gives me build options for OLEDB. It's not clear how I would use this to connect to my CosmosDB ODBC.
Has anyone figured out how to do this? According to Microsoft it is possible but they have no instructions for it.
It is possible. Launch the "ODBC Data Sources (32-bit)" app and setup a system DSN as described in this article. Then open "ODBC Data Sources (64-bit)" and setup a system DSN with the exact same name as the 32-bit DSN. The reason is that Visual Studio is 32-bit so when performing some steps it requires a 32-bit driver, but once SSAS loads the table into memory that occurs in a 64-bit process which requires the 64-bit driver. Setup these DSNs on your workstation and on the workspace server (local if using the integrated workspace or on a dev server if using a remote workspace).
Using ODBC drivers inside Analysis Services Tabular doesn't seem to be very well documented. Basically you need to use the OLEDB for ODBC driver.
When creating a new connection in Visual Studio in your SSAS model, instead of choosing the driver from the dropdown, just type in the following connection string:
Provider=MSDASQL;DSN=YourDsnNameHere
If you prefer inline connection strings that make deploying easier to do without ODBC DSNs then you can use this connection string:
Provider=MSDASQL;DRIVER={Microsoft DocumentDB ODBC Driver};Host="https://yourcosmosdbname.documents.azure.com:443/";AuthenticationKey="authKeyHere!";LocalSchemaFile="c:\folder\yourCosmosSchema.json";KeyEncrypted=true;NumberOfRetries=5;DSNType=0;Consistency=1
Regardless of which connection string you will probably have to write a query such as select * from CollectionName rather than picking from the table list.
If you are using 1400 compatibility level models (Analysis Services 2017 or Azure Analysis Services) then you should consider using the modern get data experience which has native Cosmos DB integration that's a lot more polished.

CyrstalReport connection to Oracle DB on ASP.NET site do not work

I setup a small asp.net site with CrytsalReportViewer web component (V13). The display of reports works well and now I would like to refresh the data in the report.
The report was created with Oracle ODBC connection and works on my PC. When I try to refresh data on the asp.net web site, which runs on WinXP (32Bit), CR shows me always a dialog to enter/verify db values like server name, user and password.
The DB values are correct and the Oracle ODBC Client (10.2.0.1) 32Bit is installed and configured. I can tnsping my database and the ODBC connections works well too. It looks like CrystalReports cannot find the ODBC which is specified in the report although the ODBC connection with this name exists.
Any idea what I can check to make it work?
Is there any logfile of CrystalReportViewer component to see why CR cannot connect?
Thanks in advance,
AlexS
I Got it. After installing another Oracle client (11g R2) it works perfectly. It seems that old Oracle client 10.2.0.1 is not full comapatible with the current CrystalReportViewer version.

How to connect to an Informix Database from an ASP.NET script?

I've never coded in ASP.NET, but I've been a web (PHP) developer for almost 3years now,
Problem is I've never coded in anything .NET after I completed my studies and I've never worked with IIS and MS Servers either.
I need to create a connection from an ASP.NET (VB) script to an Informix database.
google took me to this; IBM Informix connection example but I haven't a clue how to add these drivers to IIS, the IBM Informix Client SDK is installed on the server, but when I open the dialogs in IIS to add them as Handlers, I'm prompted for things I don't know the meaning of, I haven't found anything that says tutorial that is of any help and nor have I found anything on stack overflow.
I feel like an African stuck in China, what the hell do I do first and where do I go?
I have used ODBC in the past to connect to Informix, like this. If you have an Informix DBA, he will provide the values for host, server, and service. host is the name of the host machine where the database server resides. service is the service name in the services file but it actually maps to the port Informix listens. Server is the actual server.
string connectionString = "Driver={INFORMIX};host=myhost;server=myserver;service=23300;protocol=onsoctcp;database=dbase;uid=user;pwd=pass;client_locale=en_US.CP1252;db_locale=en_US.8859-1;"
OdbcConnection conn = new OdbcConnection(connectionString);
conn.Open();
For more connection string samples, see here.
To test, you can create an ODBC data source and test the connection without writing any code.
Okay, so as it turns out, I didn't find anything solid, so I went to find help in a clients office from an experienced .NET developer.
I was told to create a DSN on the server machine using ODBC, in the steps explained here
after that I referred to the DSN connection in the connection string, like this;
DSN=myDsn;Uid=myUsername;Pwd=p%W$d;
And I had to add impersonation to my asp.net scripts, as is done here using the same user I was logged in as when creating the DSN connections in ODBC
I had similar issues when trying to connect to an Informix DB from ASP.NET Console Application, but eventually found a way to connect! Here is the connection string i used that did the trick:
Database=db_cra;Host=192.168.160.207;Server=sipccx1_uccx;Service=1504;Protocol=onsoctcp;UID=MyUserId;Password=MyPassWord;DB_LOCALE=EN_US.UTF8;CLIENT_LOCALE=EN_US.UTF8;
Notes: The DB_LOCALE and CLIENT_LOCALE were the missing puzzle pieces for me. Also, "Service" means "Port" and "Server" is Informix instance name - defined in the database configuration (see: Finding Informix DB Server )
I downloaded and installed the Informix Client SDK provided by IBM and found that it comes with sample code (for both C# and VB). The path to the samples are C:\Program Files\IBM Informix Client SDK\demo\dotnetdemo\quickstart\cs
Add your connection string to the conninfo.xml file and run the file named helloworldconnect.cs as a console app to test connection. Your results will spit out into a file named "log.txt" (found in the bin/Debug folder).
BTW - I downloaded the 64 bit version of the "IBM Informix Client SDK". Trying to run it gave me "BadImageFormatException" so i had to switch my Platform Target to x64.
The SDK readme docs say it is IBM Informix .NET Provider Version 4.10.FC5 released on March 26, 2015. This link should give you a list of Windows 64 bit drivers (you will need to create an IBM account to download). On this page you can change the filter settings (top of page) to get other operating systems.
Whew.. now onto pulling data!
One more thing.. this book "IBM Informix Developer's Handbook" (https://play.google.com/books/reader?id=eprEAgAAQBAJ ) is a great resource and its free!

cant connect to database and choose a database

I installed adventure works, and I followed the instructions on this page:
How to: Create Connections to SQL Server Databases
basically nothing appears in the drop down, in step 2.
I cant even attach the database without getting an error, nor drag it to the web form.
It tells me that the database cant be attached cause it is version 705, and the server supports version 655..
Also what is teh difference between attaching the database and connecting to it?
I went to the installation center of 2008, and clicked on show installation info..I got this:
Microsoft SQL Server 2008 Setup Discovery Report
Product Instance Instance ID Feature Language Edition Version Clustered
Sql Server 2008 SQLEXPRESS MSSQL10.SQLEXPRESS Database Engine Services
1033 Express Edition 10.1.2531.0 No Sql Server
2008 SQLEXPRESS MSSQL10.SQLEXPRESS SQL Server Replication 1033 Express
Edition 10.1.2531.0 No
so I guess it is installed on my computer, but I cant access the application
You need the database to exist in an instance of SQL Server (or whatever RDBMS you so choose...but most likely, SQL Server). To do this you can do a few things: namely restore a *.bak database backup file of AdventureWorks, or you can attached the mdf and ldf files (database data and log files) to get your database online.
basically nothing appears in the drop down
Do you have an instance of SQL Server installed on your machine?
Also what is teh difference between attaching the database and connecting to it?
Attaching the database is using mdf and ldf files to get your database online ready for transactions. Connecting to the database is creating a connection between a client application and the aforementioned database. Two very different steps of the data access process.
Attaching to a database is necessary when the database file(s) are in a location other than the default location. You don't really "connect" to a specific database per se. You connect to a sql server instance which contains a list of databases on that instance (or referenced by the instance).

Coldfusion 9.0.1 Standard 64bit and Oracle 11g 64bit ODBC connection results in "architecture mismatch"

I have a freshly built 64-bit Windows Server 2008 R2 box that I have installed 64-bit Coldfusion 9 Standard on. I've upgraded and hotfixed it up to the most current version of CF. I also had 64-bit Oracle 11g (11.1.0.7.0) Client installed on the box. I've created a System DSN using the 64-bit ODBC Data Source Administrator in Windows and can successfully test the connection of the data source.
All of these installations went smoothly, however, when I went to add a datasource in the Coldfusion Administrator I receive the error:
Connection verification failed for data source: myDatabaseName
java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The specified DSN contains an architecture mismatch between the Driver and Application
The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The specified DSN contains an architecture mismatch between the Driver and Application
I am having a hard time understanding exactly where this architecture mismatch is coming from since the box is entirely 64-bit. I see while looking at all the processes that are running, some related CF processes are running in 32-bit (Verity related processes, SOLR and CFDotNetSVC). I am not sure if those could cause this issue but I am at a loss to explain were this mismatch would come from otherwise.
Anyone have any ideas?
Using Dan's advice I grabbed a JDBC Driver from Oracle here:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-111060-084321.html
I then moved the JAR (ojdbc6.jar in my case) and added it to my Coldfusion Class Path.
Determining the correct settings for using the datasource to Coldfusion was slightly harder but here are the settings I ended up going with:
JDBC URL: jdbc:oracle:thin:#//dbsrv.mydomain.com:1521/myDB.world
Driver Class: oracle.jdbc.driver.OracleDriver
Driver Name: Oracle Thin Driver
Then the username and password for the DB.
Sure enough it worked like a charm.
Dan, I want to give you a check mark because you definitely put me in the right direction, but I can only mark one correct.
I believe you need to either step down to the 32-bit drivers, or use native JDBC drivers to connect to Oracle successfully. My suggestion would be to go the JDBC route, and connect directly through a native Oracle JDBC driver by using the "other" selection on the Datasource screen. You'll get better performance that way, and have more control over your connection via ColdFusion.
Connecting to Oracle information in ColdFusion Livedocs.
i found an alternate way to do this
install the ODBC drivers for 64bit and 32bit (in that order) on your win2008 64bit OS
thereafter create the DSNs on both the System32 folder and SysWow64 folder by running the odbc32ad32.exe
ensure your tnsnames are setup fine in the respective network/admin folder (if you use tnsnames to maintain your sids)
now on the CF admin you creaet a new ODBC source with aODBC Socket and name. the next page should show you a drop down of all DSNs that exists in the 64bit DSN setup. When you go and test it in CF, it will strangely use the config of the 32bit DSN setup for validationb
voila....your connections should work. No worries of those architectural failures etc
We needed to setup 64 bit ODBC connections for a ColdFusion 11 server to query against 2012 SQL Server instance on Windows 2008 R2 Server. The ODBC connections would show up but would never work. We received so many various messages when verifying such as "needing SSL connections to work" and also timeout messages as it was having problems logging into SQL Server.
I stumbled across this post and we decided to follow setting up 64bit ODBC connections and then effectively overwriting them--preserving the name using the 32bit ODBC. Thank you again fellow developers, especially Souzam! My instructions are below:
For Windows 2008R2 Server you must disguise 64bit ODBC socket configurations for 32 bit in order for them to appear in CF Admin as datasources (obvious bug in CF 11):
Creating 64bit ODBC connections via 2008 R2 ODBC application, follow a naming convention that will allow you to recall in 32 bit configuration.
Configure ODBC 32bit connection in SYSWOW64 (C:\Windows\SysWOW64) using the odbcad32.exe using the previous 64bit names in Step #1.
Create data sources in CF Admin as these should appear in a dropdown when creating ODBC Socket Type connections.

Resources