Quantcast
Channel: MySQL Forums - Microsoft SQL Server
Viewing all 686 articles
Browse latest View live

"Invalid date literal detected" when reading decimal (no replies)

$
0
0
Hi everyone, I'm attempting a migration from MSSQL to MySQL and keep coming across a "Invalid date literal detected" error when reading certain decimal columns. I'm running the following (all up-to-date as of posting):

Windows 7
MSSQL 2008 R2
MySQL 5.6.21 Community
Workbench 6.2.3

I've attempted to re-run the migration a number of times with the same rows/tables causing the same issues. For instance with the following 'Times' table:

INSERT INTO `GenshenHR2`.`Times` (`TimesID`, `TimesheetID`, `StaffID`, `StoreID`, `JobID`, `Hours`, `Holiday`, `Overtime`, `Unpaid`) VALUES (1,1,1,1,1,'97.0','.0','.0','.0'),(2,1,2,1,2,'152','.0','.0','.0'),(3,1,3,1,3,'152','.0','.0','.0'),(4,1,4,1,4,'152','.0','.0','.0'),(5,6,5,6,6,'.0','.0','.0','.0'),(6,6,8,6,9,'.0','.0','.0','.0'),(7,6,9,6,10,'80.0','8.0','8.0','.0'),(8,6,10,6,11,'.0','.0','.0','.0'),(9,6,11,6,12,'.0','.0','.0','.0'),(10,6,12,6,13,'.0','.0','.0','.0'),(11,6,13,6,14,'.0','.0','.0','.0'),(12,6,14,6,15,'.0','.0','.0','.0'),(13,6,15,6,16,'.0','.0','.0','.0'),(14,6,16,6,17,'.0','.0','.0','.0'),(15,6,17,6,18,'.0','.0','.0','.0'),(16,6,18,6,19,'.0','.0','.0','.0'),(17,6,19,6,20,'.0','.0','.0','.0'),(18,6,20,6,21,'.0','.0','.0','.0'),(19,6,21,6,22,'.0','.0','.0','.0'),(20,6,22,6,23,'.0','.0','.0','.0'),(21,6,23,6,24,'.0','.0','.0','.0'),(22,6,24,6,25,'.0','.0','.0','.0'),(23,6,25,6,26,'.0','.0','.0','.0'),(24,6,26,6,27,'.0','.0','.0','.0'),(25,6,27,6,28,'.0','.0','.0','.0'),(26,6,28,6,29,'.0','.0','.0','.0'),(27,6,29,6,30,'.0','.0','.0','.0'),(28,2,30,2,31,'177','8.0','.0','.0'),(29,2,31,2,32,'179','4.0','.0','.0'),(30,2,32,2,33,'179','8.0','.0','.0'),(31,2,33,2,34,'177','4.0','.0','.0'),(32,2,34,2,35,'177','.0','.0','.0'),(33,2,35,2,36,'24.0','.0','.0','.0'),(34,2,36,2,37,'177\0\0','.0','.0','.0'),(35,2,37,2,38,'64.5','.0','.0','.0'),(36,2,38,2,39,'114\0\0','.0','57.5','.0'),(37,4,39,4,40,'.0','.0','.0','.0'),(38,4,40,4,41,'.0','.0','.0','.0'),(39,4,41,4,42,'.0','.0','.0','.0'),(40,4,42,4,43,'.0','.0','.0','.0'),(41,4,43,4,44,'.0','.0','.0','.0'),(42,4,44,4,45,'.0','.0','.0','.0'),(43,4,45,4,46,'.0','.0','.0','.0'),(44,4,46,4,47,'.0','.0','.0','.0'),(45,4,47,4,48,'.0','.0','.0','.0'),(46,4,48,4,49,'.0','.0','.0','.0'),(47,4,49,4,50,'.0','.0','.0','.0'),(48,4,50,4,51,'.0','.0','.0','.0'),(49,4,51,4,52,'.0','.0','.0','.0'),(50,4,52,4,53,'.0','.0','.0','.0'),(51,4,53,4,54,'.0','.0','.0','.0'),(52,4,54,4,55,'.0','.0','.0','.0'),(53,4,55,4,56,'.0','.0','.0','.0'),(54,4,56,4,59,'.0','.0','.0','.0'),(55,4,57,4,60,'.0','.ERROR:`GenshenHR2`.`Times`:Inserting Data: Incorrect decimal value: '177' for column 'Hours' at row 34

For some reason it is interpreting the data in the 6th column 'Hours' with slashes (177\0\0) on rows 34 & 36 instead of the correct decimal format (177.5)

In MSSQL the column is: [Hours] NUMERIC(4,1) NULL DEFAULT 0
Its corresponding line in the Migration is: `Hours` DECIMAL(4,1) NULL DEFAULT 0

Ironically the following 3 columns (Holiday, Overtime & Unpaid) are all the same datatype, and looking at the log extract appear to insert without issue (see row 36 / 57.5).

Does anyone know why this might be happening?

Insert data in MSSQL from MySQL? (no replies)

$
0
0
So I'm currently inserting data into a MySQL table from a form on my Linux-based website. When a customer submits an inquiry through our web form, a new row is added to the specified table in MySQL. This works great.

On the other hand, our company has front-end MS Access application linked to data in our MSSQL database, and the hurdle I'm facing is getting the MySQL data (populated via the web form submissions) into the MSSQL database. We are not able to support the mssql or sqlsrv commands from web/PHP side of things due to a Linux-based web server. I've researched a lot and haven't found a way to connect the web server with the SQL Server.

I initially visualized a trigger since we want this action to take place on the MSSQL database as soon as a new row is inserted into the MySQL database, and only then. I was able to create a Linked Server in SQL Server Management Studio and query the MySQL data but I'm trying to issue an INSERT command from MySQL to MSSQL. I've seen documentation referencing the use of a trigger to perform the update but only from MSSQL to MySQL -- not the other way around.

Any thoughts on this? Thanks in advance!

connecting MSSQL database using MYSQL workbench (no replies)

$
0
0
Hi Experts,

I am using MYSQL Workbench.
MySQL Workbench Community (GPL) for Windows version 6.1.4 revision 11773 build 1454

One of my database is on MSSQL server 2005.

I want to connect to database on this server using MYSQL Workbench.
But while connecting I am getting below error
"Lost connection to MySQL server at 'waiting for initial communication packet', system error: 10060"

any suggestions, how I can achieve this.

Regards
rathore

Query Translator (2 replies)

$
0
0
Is there a software that will actively translate queries made by my software that is written for MSSQL to queries that MySQL would understand?

Migrazione dati (3 replies)

$
0
0
Buongiorno

Ho una domanda da sottoporre, attualmente al lavoro utilizziamo un gestionale basato su MS SQL Server 2008, (per motivi di gestionale e altri, attualmente non posso variare questo SQL).

Sempre attualmente abbiamo un sito internet con collegato un DB ACCESS ogni sera dal server vengono estrapolati in dati necessari tra cui prezzo e altro(l'intero DB sarebbero 6 giga), ed esportati su un file access, e sempre ogni sera questo file viene copiato online via fTP sul sito.

Qui viene il problema, vorrei cambiare il sito e spostarmi su uno basato su PHP con collegato un DB MySQL, però ho necessità che i dati vengano comunque aggiornati in automatico ogni sera. Di qui le tre domande:

Come faccio a estrapolare solo alcune informazioni dal DB Microsoft attraverso il Workbench (o altro)?
Posso fare in modo di programmarlo regolamente ad un orario?
E' possibile programmare anche l'upload sul sito, attraverso copia fisica dei file o un dump sul server remoto?

Premetto che non ho ancora acuistato le funzioni su Aruba perche prima di procedere all'acquisto volevo sincerarmi che fosse tutto possibile, altrimenti devo trovare altre strade.

Grazie in anticipo

mysql database administration basics (1 reply)

$
0
0
I am an experienced Microsoft SQL DBA, i am interested to learn about mysql. Is there any book or e-book which will go through basics of mysql database administration? I am coming from a windows background :).

data load (no replies)

$
0
0
Hi I am loading a text file from sql using the command below.

LOAD DATA INFILE '//server//folder//arch_order_header.txt'
INTO TABLE arch_order_header
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n' ;


As the import works through the data, it's quite large. I keep hitting this issue. When the field contains a \ somehow it see's it as delimitter and pushs the next columns along one

why?? how can I stop this I am already using replace to catch unwanted ,

thanks

upload client side data to the MySQL server (1 reply)

$
0
0
Can someone tell me how do i upload the data created in mysql command line client into the Mysql server,
I mean, i have created some tables using mysql command line client in my system, it is accessible only to me. how do i upload it into the mysql server so that i can access those table contents even from other systems.

Time estimate for a migration? (1 reply)

$
0
0
Hi,
I am new to MySQL. We have been developing a .NET application with SQL database. The costs for SQL are too high. Yes, we made a wrong decision there upfront.
The app is not live up to now. Database is empty with exception of samples.
How can I estimate the migration time needed to move from SQL to MySQL?
Any help is highly appreciated!
Thanks!

Auto increment (no replies)

$
0
0
I have a mysql table where in i have a field called patient_id which i do an auto increment and its the primary key !! since this number goes on patient card also simply 1,2 will not be good . Is there a way to prefix some text to it like patient1, patient2 something like that!!!

MS SQL & MySQL (no replies)

$
0
0
I am good at MS SQL and who can help me with a query or code that can connect data in MS SQL and data in MySQL. Thanks

Migrating SQL Server to MySQL problem (no replies)

$
0
0
I have developed a java application that is based on MS SQL Server 2005.
Now I am trying to migrate my database to MySQL 5.6 by using “Migration Wizard” tool of MySQL Workbench.
The problem is that I have a lot of triggers and procedures and no one is created to MySQL.
Some triggers have reference to the same tables that are attached.
Is it any way to create triggers and procedures automatically or I should create everything from the scratch?

MS Sql to MySQL migration - data transfer issue (5 replies)

$
0
0
Migration from MS sql 2008.
workbench 6.3.5

Migration is failing when I am using different characters like (ã). Manual insert in to the table is working. But workbench is not able to convert it properly.In the insert statement created by workbenck those characters are being replaced by question mark and the copy is failing with this error :

14:26:05 [INF][ copytable]: Statement execution failed: Incorrect string value: '\xE3h' for column 'Type':

INSERT INTO `TestDB`.`Person` (`Name`, `Age`, `Type`) VALUES '(Peter ',35,'The Peet\�h')

Type should be 'The Peetãh'

I am using ODBC Data source(Free TDS) Connection method with Native 10.0 driver
Latin1 to UTF8.

Installing Adventureworks db on MySql 5.7 (1 reply)

$
0
0
Hi all -

Just finished a course on udemy and it was suggested that I continue to practice with the Adventureworks db. I am using Heidisql and have MySql 5.7. Can anyone tell me how to load adventureworks? Thanks.

Scheduling MSSQL Workbench to execute or export on a daily basis to MYSQL (3 replies)

$
0
0
Can we use MSSQL workbench schedule to migrate tables or update tables to MYSQL on a daily basis

Databse QA. (no replies)

$
0
0
How do I check mysql table which is integer type does not have any character value, and if it has then it should shows that value 'False'.

Sql2005 migration utf8mb4 problem (1 reply)

$
0
0
I really need help for Sql2005 migration problem.

MY GOAL:
To migrate many Sql2005 DataBases with data to a MySQL version 5.6 using Workbench.

Sql2005 DataBases COLLATE is Chinese_PRC_CI_AS.
MySQL Workbench Version 6.0.2 beta.


The Sql2005 DataBases contain some 4 bytes UTF-8.

When Mysql use utf8 collate, Get Error: during charset conversion of wstring: No error.

So i select mysql collate utf8mb4.

+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_general_ci |
| collation_database | utf8mb4_general_ci |
| collation_server | utf8mb4_general_ci |
+--------------------------+--------------------+

modify ther db_mssql_migration_grt.py

def migrateCharsetCollation(self, state, charset, collation, source_object, target_object):
if collation:
state.addMigrationLogEntry(0, source_object, target_object,
'Collation %s migrated to utf8_general_ci' % (collation))
return '', 'utf8_general_ci'

return charset, collation


as:

def migrateCharsetCollation(self, state, charset, collation, source_object, target_object):
if collation:
state.addMigrationLogEntry(0, source_object, target_object,
'Collation %s migrated to utf8mb4_general_ci' % (collation))
return '', 'utf8mb4_general_ci'

return charset, collation

When migrate also get Error: during charset conversion of wstring: No error.


How to migrate Sql2005 DataBases which have some 4 bytes UTF-8 to a MySQL?

Thanks and regards.

SQL Server Migration fails to get schema (1 reply)

$
0
0
Greetings,
I've followed instructions for SQL Server Migration using WorkBench.
When WorkBench tries to get the schema, it fails.
If I enter the database name for Source Database, the logs end up saying "could not find catalog (my database name)"
If I leave the database name blank for Source Database, I do not get an error, but also no schema are found. It does not ask me to specify a database at all in the process.

This is on Windows (Vista) that I am running WorkBench.

Notably, I downloaded the old tool "MySQL Migration Toolkit" and that worked.
However, I'm concerned that maybe WorkBench will do a better job and I should try to get it to work instead.

Any ideas why WorkBench can't get the schema from the source database for me? While following a similar approach in the old tool works?

I've tried WorkBench 5.x and 6.x.

Thanks,
Paul

Migrating from SQL Server 2008 R2 (no replies)

$
0
0
Hi,i'm trying to migrate from SQl Server 2008 R2 but i have this error in the reverse engineer selected schemata

File "C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.0.7\modules\db_mssql_grt.py", line 62, in execute_query

return get_connection(connection_object).cursor().execute(query, *args, **kwargs)

pyodbc.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]The data types nvarchar and text are incompatible in the equal to operator. (402) (SQLExecDirectW); [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (8180)')

and and i'm trying to edit the Data Type mapping but it don't save the modification

note:i'm very new in my sql

Cannot connect to MS SQL 2005 to begin migration process (1 reply)

$
0
0
Hello, I was hoping someone could help me. I'm attempting to migrate from MS SQL 2005 on a Windows Server 2003 machine to a new server with Centos 6.5 installed. I have MySQL installed, using MySQL Workbench 6.0 to begin the migration process.

On the Migration screen I've tried to use both FreeTDS and native drivers to begin the process of connecting to the source database, but I cannot get a connection when I go to test. I've tried following all the directions I could find online, set up a user DSN on the Windows machine ODBC, installed FreeTDS and unixODBC, attempted to install the Microsoft supported ODBC 1.0, and I just cannot get a connection to happen.

The error message that I cannot get past is:
Could not connect to Source DBMS.
[00000] [iODBC][Driver Manager]/usr/local/lib/libtdsodbc.so: cannot read file data: Is a directory (0) (SQLDriverConnect)

Any help would be appreciated, even if it is a quick "Look in this direction" message. Thanks!
Viewing all 686 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>