Migration from legacy version to newer version or MySQL - odbc

I recently dug up a very old SQL Anywhere database. I have it installed and it kind of works, its only the distributed side of the data, so everything's running via dbeng50 and ODBC.
I would like to migrate this data to MySQL. Is there a way to do this? I attempted to view the data using an ODBC tool but I kept getting error messages saying the ODBC driver doesn't support the version of ODBC behavior.
I guess the database is too old (it's from 1997) - that put's at it SQL Anywhere version 5.
Its also difficult to find the old SQL tools that would help me access these.
Is it possible to use the .db file with a newer version?
Any help or guidance at all would be appreciated.

Related

SAP HANA ODBC driver is broken

I have recently installed a SAP HANA virtual machine on one of my Windows PCs and can connect to it using my PHP application and the Eclipse plugin. I have created several databases and can read from and write to them from my application, but I have hit two problems:
It does not handle UTF8 characters correctly.
It randomly shifts some text strings to uppercase.
My PHP version is 7.4.14 and the HDBODBC driver version is 2.06.64.28100.
When I examine the data using Eclipse it is exactly as it should be, but when I retrieve it through PHP it exhibits the above problems. I have also used another 3rd party ODBC Query Tool which uses the same HDBODBC driver and it suffers from the same problems, so I know that it's not a PHP problem.
Does anyone have any ideas?

Error connecting to mongoDB using Mongolite

I'm having issues connecting to my MongoDB via Mongolite, and I'm not sure if it is an issue on my side, or if I need to use a different package to connect to the database. Please keep in mind that I cannot change the software being run by the MongoDB server, and I am a novice when it comes to all of this, so it could just be a silly error on my part.
I've run the following code:
m <- mongo(collection = "test", url="mongodb://22.92.59.149:27017")
As far as I can tell from the Mongolite tutorial (https://jeroen.github.io/mongolite/), this is the correct syntax to connect to the database, but I'm not 100% sure. Regardless, I get the following error:
Error: Server at 22.92.59.149:27017 reports wire version 2,
but this version of libmongoc requires at least 3 (MongoDB 3.0)
From what I can tell, this means that mongolite won't work with my database. If that is the case, what other package should I try to use to connect, or if it is not the issue what am I doing wrong?
Thanks in advance!
As the message says, there is a mismatch between versions of the client and the server.
More precisely, mongolite relies on a more general driver written in C, libmongoc, and it seems the version automatically installed by the install.packages("mongolite") statement is too recent towards the server's version.
If you can't change anything server-side, maybe you could try to manually install an older version of libmongoc before installing mongolite, but I'm not confident about the compatibility with that R package afterwards.
Maybe you can use RMongo, an older and archived package to interact with Mongo in R, but I'm afraid what you're going to develop won't be stable in further R versions.
I'd rather recommend you to look at the problem server side.

How to get the driver version using ODBC API without connecting to the database?

We have code to connect to various databases and we get the driver version after connecting using the SQLGetInfo() call with the parameter SQL_DRIVER_VER.
However, we want the driver version in other cases too, e.g., before connecting, and in case of an error on trying to connect. The only way to get the driver version in these cases at least on Windows seems to be via the file metadata information of the driver DLL. The drivers on other platforms do not even have this file metadata.
So, is there a way to get the driver version using ODBC when we are not connected?
Thanks,
Ed
The ODBC API doesn't support this interrogation until the connection is live.
There are tricks you can bring to bear, such as those used by the iODBC Administrator.app on OS X. You might look into that source code.

Adaptive server anywhere ASA SqlAnywhere 8.0 ODBC driver

Well, I've searched the interwebs like crazy and I am unable to find this driver.
I am trying to convert data from a client's database that was built using the ASA 8.0 engine. ASA 8 has been out of support since 2008. The software company that created this no longer supports it, so can't provide me with the drivers. I've scoured the web and can't find anything.
I managed to get the installation files for this old software called BailCredit built by a company called SentryLink. I found what I presume to be the ODBC driver in the installation files (dbodbc8.dll) and I've tried manually registering that (Windows Server 2008 R2) but didn't get anywhere. When I try to create a new datasource, the ODBC Data Source Administrator gives me an error.
My company has done hundreds of data migrations and this is the first time I've had to resort to this.
I'd post a link to the database file, but simply can't because of privacy.
Please help if you can! Thanks in Advance.
Matt
For 64 Bit operating system you need to copy the dll's to %windir%\syswow64\ so you need to change install.cmd to the following code. The rest is the same.
COPY %~dp0dbcon8.dll %windir%\syswow64\dbcon8.dll
COPY %~dp0dblgen8.dll %windir%\syswow64\dblgen8.dll
COPY %~dp0dbodbc8.dll %windir%\syswow64\dbodbc8.dll
regedit %~dp0SAS8.REG
pause
It take's me a few hours to figure it out i hope it help someone else.
This is how I finally solved it.
OPTION 1:
Get a copy of the following files from a computer with a working setup of the SQL Anywhere ODBC driver:
dbodbc8.dll
dbcon8.dll
dblgen8.dll
Create an install.cmd file with this:
COPY %~dp0dbcon8.dll %SystemRoot%\system32\dbcon8.dll
COPY %~dp0dblgen8.dll %SystemRoot%\system32\dblgen8.dll
COPY %~dp0dbodbc8.dll %SystemRoot%\system32\dbodbc8.dll
regedit %~dp0SAS8.REG
pause
Create an SAS8.REG file with this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Adaptive Server Anywhere 8.0]
"Driver"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,5c,00,73,00,79,\
00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,62,00,6f,00,64,00,62,00,\
63,00,38,00,2e,00,64,00,6c,00,6c,00,00,00
"Setup"=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,5c,00,73,00,79,\
00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,62,00,6f,00,64,00,62,00,\
63,00,38,00,2e,00,64,00,6c,00,6c,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
"Adaptive Server Anywhere 8.0"="Installed"
Run install.cmd
This will work when Windows is installed in C:\WINDOWS, otherwise edit the registry entries.
OPTION 2:
If someone left a copy of the Powerbuilder CD in the client's computer, look for the folder asa801runtime and install that to get the ODBC driver working
EDIT:
Example connection string with default username/password:
Driver={Adaptive Server Anywhere 8.0};UID=dba;PWD=sql;DatabaseName=base;EngineName=gestion;CommLinks=TCPIP(HOST=GRA06:2638)
Answering my own question:
I wasn't able to find this commercially available anywhere. I happened to be able to get my hands on the installation for the software package that was using SQLAnywhere 8. By installing this, it installed the necessary drivers (but only worked on 32-bit OS).

Can not tnsping but can sqlplus connect

I have a question hopefully someone could explain it to me. I have an Oracle 11g installed properly on the server. From a workstation, I have installed the oracle client which tnsname.ora pointed to the Oracle database. I can ping to the server where oracle db was installed. I can sqlplus connect to the database and I can even connect to the database programmatically using C#. However, I can not tnsping to it. I got error Message 3511 not found when trying to do so. So my question is: in what scenario tnsping is used and how do I make tnsping works? In other word, if my tnsping does not work but I still can connect to the database programmatically using C#, what are the concerns that I should be worrying about? I am new to Oracle.. Thanks!
I have tried to do the following actions without success although they are the most popular answers to similar scenario similar to mine.
1) Set Oracle_Sid to my oracle sid
2) Set Oracle_Home to my oracle home directory
What I did to solve the issue:
1) Uninstall oracle client
2) Reinstall the oracle client with the newest version 11.2.xx.
I believe, re-installing the oracle client of earlier version would just work as well.
However, since I have to re-install the client, I might want to get the newest version.
The cause is probably improper installation at the first time as we have an disk image of pre-installed application to automatically prep a new computer.
Not able tnsping does not seem to impede with other Oracle operations (at least not that I know of).
If someone knows what is the limitation of not able to tnsping but can sqlplus connect, ping... , I would appreciate if you could share.
Either your $Oracle_Home value is not set or your default sid is not set in $ORACLE_SID
Try this :
set ORACLE_SID=mysid
export ORACLE_SID
tnsping mysid
and see what it comes back with.

Resources