Oracle SQL Developer Error: vendor code 1317 - mysql

I am using Oracle SQL Developer to browse a MySQL database. When I browse table with Columns tab (shows table definitions), some of tables will display an Error Encountered dialog that says:
Vendor code 1317

Are you using the latest version of SQL Developer?
Might be worth asking this question on the SQL Developer Forum on OTN as it is well supported by the Oracle SQL Developer team.
I had a quick search and the only thread I could find was this one in which one of the responses reports the same problem as you but unfortunately there is not a direct response to it.

SQL Developer doesn't support 5.1.x series of jdbc mysql connector... you need to set up sql developer to use mysql-connector-java-5.0.4 in driver settings. You better use this one, because I was having the issue even with mysql-connector-java-5.0.8

To browse MYSQL DB with version Oracle SQL Developer (version 2.1.2.64) and avoid the above problem, you must use mysql/J connector: mysql-connector-java-5.0.4.
mysql-connector-java-5.0.8 or mysql-connector-java-5.1.* WILL NOT work.

1317 seems to be the mySQL code for ER_QUERY_INTERRUPTED.
Maybe some sort of timeout ?

Please check the following link for the answer
http://download.oracle.com/docs/cd/E15846_01/doc.21/e15222/intro.htm#CHDIEGDD
This is an excerpt from the above link:
Database: Third Party JDBC Drivers
The Third Party JDBC Drivers pane
specifies drivers to be used for
connections to third-party
(non-Oracle) databases, such as IBM
DB2, MySQL, Microsoft SQL Server, or
Sybase Adaptive Server. (You do not
need to add a driver for connections
to Microsoft Access databases.) To add
a driver, click Add Entry and select
the path for the driver:
For IBM DB2: the db2jcc.jar and
db2jcc_license_cu.jar files, which are
available from IBM
For MySQL: a file with a name similar
to mysql-connector-java-5.0.4-bin.jar,
in a directory under the one into
which you unzipped the download for
the MySQL driver
For Microsoft SQL Server or Sybase
Adaptive Server: jtds-1.2.jar, which
is included in the jtds-1.2-dist.zip
download
For Teradata: tdgssconfig.jar and
terajdbc4.jar, which are included
(along with a readme.txt file) in the
TeraJDBC__indep_indep.12.00.00.110.zip
or
TeraJDBC__indep_indep.12.00.00.110.tar
download
Alternative: As an alternative to
using this preference, you can click
Help, then Check for Updates to
install the JTDS JDBC Driver for
Microsoft SQL Server and the MySQL
JDBE Driver as extensions.
To find a specific third-party JDBC
driver, see the appropriate Web site.
For MySQL, use the MySQL 5.0 driver, not
5.1 or later, with SQL Developer release 1.5.
You must specify a third-party JDBC
driver or install a driver using the
Check for Updates feature before you
can create a database connection to a
third-party database of that
associated type. (See the tabs for
creating connections to third-party
databases in the Create/Edit/Select
Database Connection dialog box.)

Related

Create a Linked Server for a MySQL Database in SQL Server 2005

I'm currently trying something I've never done before - I'm trying to access MySQL data in an SQL Server environment. Where I am, we have two servers (the MySQL and MSSQL servers), and each stores different types of data. Recently I've found a need to write queries that include data for both servers. One of the ways I read to do this is adding a "Linked Server" in SQL Server. But try as I might I cannot seem to get a Linked Server added.
I am working on a Windows 7 system, our SQL Server instance is 2005, and the MySQL version is 5.5.31.
What I've done so far is this:
Downloaded and installed the MySQL ODBC drivers
Created a System DSN using that driver for the MySQL database, called "Production". (I also tested the connection from the Data Sources application and it connects just fine).
Checked for the Provider in SQL Server (MSDASQL) to configure options such as "allow nested queries" and "allow 'LIKE' operator"
right click on Linked Servers in Server Objects in SQL Server > "New Linked Server"
From here, I fill out the linked server info like this:
Checked "Other data source" (not SQL Server)
Chose Provider "Microsoft OLE DB Provider for ODBC Drivers"
Product Name: "Production"
Data Source: (the name of the System DSN) Production
Then in the security tab, I chose the "Connections will be made using this security context" and provided my username and login for the MySQL server.
Then this is where I run into an error every time. I always get the following error message:
The linked server has been created but failed a connection test. Do you want to keep the linked server?
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "FLUX".
OLE DB provider "MSDASQL" for linked server "FLUX" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". (Microsoft SQL Server, Error: 7303)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.5000&EvtSrc=MSSQLServer&EvtID=7303&LinkId=20476
If you click that link for help, by the way, nothing shows up.
I saw other people suggested trying an older MySQL ODBC driver, adding a System Data Source for the 32bit driver as well as the 64bit driver, and restarting my machine (not the DB server) -- none of these fixed my error.
What I do not understand is why my System DSN seems to work and connect fine, but SQL Server cannot see the Data Source. Does anyone see what I'm missing, or what I might be configuring incorrectly?
EDIT
Clarified that I restarted my local machine, but not the DB server since trying to add the Linked Server.
From everything you've said, you probably have a mismatch between bitnesses of SQL Server 2005 components and the installed ODBC Driver for MySQL.
System DSNs are definitely the way to go.
You probably will need to install both the 32-bit and 64-bit ODBC driver, and configure an identical (same name and everything!) System DSN with each.
I would say you may also want/need to install this patch it was useful for getting XP and 2003 to work properly for ODBC type connections for me.
http://www.microsoft.com/downloads/details.aspx?FamilyID=000364db-5e8b-44a8-b9be-ca44d18b059b&displaylang=en
Is your Database server on the same machine on which you have Sql Server Management Studio Installed? If the SQL Server is on a remote machine then you need to install the ODBC driver on remote Machine and create the DSN there as per link
I was having the same issue but the above link solved my problem.

Enterprise Architect - Microsoft OLE DB Provider for ODBC Drivers -2147217900 / '80040E14'

I am setting up Sparx's Enterprise Architect to work in centralized mode using:
EA version 10.0.1007
Database: MySQL CE version 5.6.13.1
Connector: mysql-connector-odbc-5.3.2-win32.msi
I've successfully setup the database and connector in Data Sources. Test connection is working.
On the first project, EA requesting to import project, in which I imported EABase.eap from C:\Program Files (x86)\Sparx Systems\EA. This is success also.
I click the Add New Model from Pattern, choose the Name, and click OK, then I got the following error (shown three times):
If I close the EA and then reopen, the packages and diagrams are still there, meaning they are saved to MySQL database.
The error is also shown whenever I first clicked on the diagram.
How to solve this problem?
Did you use the correct ODBC driver?
32 vs 64 bit is relevant here.
You should use the 32bit driver even if you are on 64bit Windows.
If you are using a 64-bit operating system (see here):
• Enterprise Architect requires 32-bit ODBC drivers to connect to a repository through ODBC; to set up the ODBC configuration on 64-bit clients, run the 32-bit ODBC Data Source Administrator from C:\Windows\SysWOW64\odbcad32.exe
• You can quickly load the correct 32-bit ODBC Data Source Administrator by selecting Tools | ODBC Data Sources in the Enterprise Architect menu bar
Also: Did you check the two checkboxes as described in the installation of the driver? (Select the Return matched rows instead of affected rows and Allow big result sets checkboxes.) See here for a detailed description
I had the same error while I migrated some projects from eap files to a MySQL database.
The problem is caused by Cast(Partition as Signed);
The Enterprise Architect uses a column name "Partition" but it is a reserved key word since version 5.6.2 (see the manual) of the MySQL dbms.
Switch to the MySQL version 5.5.46 (x64) and the error will disappear.

Options for best MS Access ADO to SQL Server Connection Performance

What provider and driver offer the best performance when connection to SQL Server using ADO?
I'm connecting MS Access 2007 to SQL Server 2008.
Provider Options:
OLE DB provider for ODBC (MSDASQL.1) (default provider)
OLE DB provider for SQL Server (SQLOLEDB)
There may be other options that I'm not aware of
Driver Options:
SQL Server (version 2000.85.1132.00 - SQLSRV32.DLL 4/14/2008)
SQL Server Native Client 10.0 (version 2007.100.2531.00 SQLNCLI10.DLL 3/30/2009)
There may be other options that I'm not aware of.
You should test it in your specific environment to be sure. Whatever the performance differences are, they should be negligible.
Microsoft's Official Statement is here:
http://msdn.microsoft.com/de-de/library/ms130978.aspx
In short: For an ADO-Connection, use SQLOLEDB.
MSDASQL is deprecated for a long, long time and does not do well with varchar(max) fields, for example.
When using the Native Client, you will have to specify DataTypeCompatibility=80, which removes many of the new features anyway, so you will gain little. Also, the Native Client will probably not be on your client computers by default, so you will need to install it.

Migrate Data and Schema from MySQL to SQL Server

Are there any free solutions for automatically migrating a database from MySQL to SQL Server Server that "just works"?
I've been attempting this simple (at least I thought so) task all day now. I've tried:
SQL Server Management Studio's Import Data feature
Create an empty database
Tasks -> Import Data...
.NET Framework Data Provider for Odbc
Valid DSN (verified it connects)
Copy data from one or more tables or views
Check 1 VERY simple table
Click Preview
Get Error:
The preview data could not be
retrieved. ADDITIONAL INFORMATION:
ERROR [42000] [MySQL][ODBC 5.1
Driver][mysqld-5.1.45-community]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
'"table_name"' at line 1 (myodbc5.dll)
A similar error occurs if I go through the rest of the wizard and perform the operation. The failed step is "Setting Source Connection" the error refers to retrieving column information and then lists the above error. It can retrieve column information just fine when I modify column mappings so I really don't know what the issue is.
I've also tried getting various MySql tools to output ddl statements that SQL Server understand but haven't succeeded.
I've tried with MySQL v5.1.11 to SQL Server 2005 and with MySQL v5.1.45 to SQL Server 2008 (with ODBC drivers 3.51.27.00 and 5.01.06.00 respectively)
There are two free toolkits provided by Microsoft.
Microsoft SQL Server Migration Assistant for MySQL v1.0
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14280
Microsoft SQL Server Migration Assistant for MySQL v5.1
http://www.microsoft.com/download/en/details.aspx?id=26712
I have used only the second one and it worked for me without any glitch.
It required registration with Microsoft for downloading a license file.
But it is free to use for everyone.
This is really old now, but if you use MySQL Connector NET and set SQL Server Mode = true in the connection string, this will resolve your error.
Recently, I have successfully migrated the MySQL database to MSSQL database. Below are detailed steps:
Operating System: AWS Microsoft Windows Server 2012 R2 with SQL Server Standard
Tools Used:
SQL Server 2014 Management Studio SQL Developer,
Microsoft SQL Server Migration Assistant v6.0.1 for MySQL,
Remote Desktop Client, and
Third Party MySql ODBC Driver 5.1.13
1. Setup AWS Windows Server
2. From the AWS console ec2 instance list, right click on the windows server and select connect. You would see the similar screen below.
3. Click on the Get Password button which will be required for Remote Desktop connection[#4] and follow the instructions.
4. Connect to that EC2[#1] instance with the Remote Desktop Client by default available in your Ubuntu local machine. Use the credentials from #2.
5. Once you get connected using the remote client, you should be able to access the remote MSSQL server. Install the following tools.
Install Chrome : Since internet explorer has some security, install chrome.
Install Microsoft SQL Server Migration Assistant v6.0.1 for MySQL
https://www.microsoft.com/en-us/download/details.aspx?id=51218
Install Third Party MySql ODBC Driver 5.1.13
https://dev.mysql.com/downloads/connector/odbc/5.1.html
6. Configure ODBC Data Sources(64-bit) :
Open Administrative tools → click on ODBC Data Sources(64-bit) and
follow the steps to connect to MySQL database.
7. Open SQL Server 2014 Management Studio SQL Developer and connect using windows authentication.
Create destination MSSql database for MySql migration.
8. Open Microsoft SQL Server Migration Assistant : For detail visit this link: https://blogs.msdn.microsoft.com/ssma/2011/02/07/mysql-to-sql-server-migration-how-to-use-ssma/
Create new project
Connect to MySql
Connect to MSSql
Convert Schema
Migrate Data
8. You might have some problem listed here. Please read in detail where I have written the detail resolution.
MySql 5.6 to MSSql server 2014 migration : ExecuteReader requires an open and available Connection
I am afraid there is no simple solution. SQL used in MySQL and T-SQL used in SQL Server 200X are different dialects of SQL. It is not only simple changing say "auto_increment" to "identity", but reserved words that creates a problem.
For example
CREATE TABLE test (
user varchar(50)
)
will work in MySQL and fail in SQL Server 2008.
To cut long story short - unfortunately, you will need to do it by hand.
Export the file from MySQL to a CSV file.
Export the create statements for the tables from MySQL
Cry.
3a. Disable foreign key checks in SQL server
Tune the create statements in SQLserver until they work.
Import the CSV files in to MySQL.
5a. Enable foreign key checks in SQL server.
Also see these answers:
migrate-from-mysql-to-sql-server-2008
Had similiar issue about this error 42000, and for me I figured out that setting the MySQL global mode to ansi_quotes would solve it:
set global sql_mode=ansi_quotes;
There are commercial solutions, but not free solutions. Depending on complexity of your database, rewriting SQL for target dialect can be trivial task - or a very hard one.
Rewriting CREATE TABLE statements is never hard, it can be done by hand with no surprises. Procedures, functions and triggers are problematic.

Migrating from MS SQL to MySQL: SQLOLEDB? Migration kit login error?

I've been put in charge of migrating a customer's website of MS SQL/ASP to PHP/MYSQL. I have zero experience with MS SQL.
I'm trying to figure out the best way to get the current data migrated to MySQL so I can begin PHP development.
Some details:
I downloaded SQL Server Mangement Studio Express. I found the following string in a connection file:
MM_connCompanyName_STRING = "provider=SQLOLEDB;data source=IP_ADDRESS;database=DATABASENAME;uid=USERNAMEpwd=PASSWORD;"
Using the IP, username, and password from this string, I could successfully connect using Studio Express.
I downloaded the MySQL Migration Toolkit and entered the same info, but get the following error:
Connecting to source database and retrieve schemata names.
Initializing JDBC driver ...
Driver class MS SQL JDBC Driver
Opening connection ...
Connection jdbc:jtds:sqlserver://IP_ADDRESS:1433/DATABASENAME;user=USERNAME;password=PASSWORD;";charset=utf-8;domain=
The list of schema names could not be retrieved (error: 0).
ReverseEngineeringMssql.getSchemata :Login failed for user 'USERNAME'.
I don't have admin or physical access to the current SQL server. I've tried to run some exports through Studio Express, but it saves them to the file system, which I don't have access to.
I can reach the current/old webmaster, but because he no longer works for the company, his responses are slow and usually un-helpful. So no help there...
The former admin sent me an MDF file ... no idea what to do with that.
I found this note above the connection info on the current server (if it means anything):
'this connection is being used because
ODBC was causing weird errors,
switching to OLEDB fixed them
My questions:
Any idea why this would be failing with the same login credentials that works with Studio Express? I'm assuming it has something to do with the driver, but I don't know what next steps to take.
Is there a better/easier/more effective way to migrate this data? (I'm hoping I don't find myself running "SELECT *" statements in Studio Express and copy/pasting data into Excel...please god, no)
Thanks in advance for your help.
Eww, this is going to be scary (connection string indicates it was tool generated from Dreamweaver, never a good sign).
Any idea which version of SQL Server? You should be able to SELECT ##VERSION. 10.x is 2008, 9.x is 2005 and 8.x is 2000. If it is 7.x run.
The MDF file is the actual database. If I were you, I would buy a developer edition of SQL 2005 (or 8 if it is 2008 which is unlikely), it will be worth the $99 or so it costs.
This will give you the ability to locally install the DB by ATTACHing the MDF file. Once you have a locally running copy, you can use the SQL Server ETL tools with the MySql ODBC drivers to push the data to MySql in a repeatable manner.
I believe you can export data from MSSQL choosing different SQL dialects; I believe there's one that's reasonably MySQL compatible. It doesn't solve all your problems, of course, because while you may get the structure properly, stored procedures and triggers and the like will take a bit more work. But that should get you started.