Converting Data From MySQL To SQL Server 2005

Jun 28, 2007

Hello,

 Finally making the move to ASP.NET!  I've been advised that to begin with it is probably best to start using SQL Server 2005 with ASP.NET.  All my sites are currently using MySQL.  Can anyone advise a way for me to import all the data from a MySQL database to a SQL Server 2005 database.  Apologies if this isn't directly related to ASP.NET but any help would be greatly appreciated.

Thanks

 

View 2 Replies


ADVERTISEMENT

Converting From Mysql To SQL Server

Mar 29, 2004

hi.. currently i need to convert from mysql to sql
how am i to convert it ? below are my previous codes
thanks!

Imports System.Configuration.ConfigurationSettings
Imports System.Web.HttpContext
Imports System.Data.Odbc


Public Class DB
Dim myDB As New OdbcConnection
Dim myCMD As New OdbcCommand
Public Sub New()
Dim db_server = AppSettings("db_server")
Dim db = AppSettings("db")
Dim db_user = AppSettings("db_user")
Dim db_pwd = AppSettings("db_pwd")
Dim DBConnection As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=" & db_server & ";" & _
"DATABASE=" & db & ";" & _
"UID=" & db_user & ";" & _
"PASSWORD=" & db_pwd & ";" & _
"OPTION=3;"
myDB.ConnectionString = DBConnection
myCMD.Connection = myDB
End Sub

Public Function q(ByVal mySTR As String) As OdbcDataReader
myCMD.CommandText = mySTR
Try
myDB.Open()
q = myCMD.ExecuteReader(Data.CommandBehavior.CloseConn ection)
Catch ex As Exception
Err(ex.ToString)
End Try

End Function

Public Sub c(ByVal mySTR As String)
Try
myCMD.Connection.Open()
myCMD.CommandText = mySTR
myCMD.ExecuteNonQuery()
myCMD.Connection.Close()
Catch ex As Exception
Err(ex.ToString)
End Try

End Sub


Private Sub Err(ByVal strError As String)
Current.Response.Write("<h1>An error has occurred.</h1><br>" & vbCrLf)
Current.Response.Write("Please report to us the error message<br>" & vbCrLf)
Current.Response.Write(strError)
Current.Response.Flush()
Current.Response.End()
End Sub
End Class

View 1 Replies View Related

Tools For Converting MySQL To SQL Server

Apr 15, 2006

Hi,

I'm in
search of a nice tool to convert the database from MySQL to SQL Server
2005, where the schemas of both the DB are different. I just want to
move the data from one database to another with column mapping..

Can any pls suggest me a nice tool for this issue?

Early reply is appreciated...

thanking you
VarShant

View 1 Replies View Related

Moving Data From Mysql To Sql Server 2005. Does Not Work!!

Nov 9, 2006



Problem: Moving data from mysql to sql server 2005

I am trying to pull data over from mysql to sql server. First the import wizard greys out so I have to put in 1 query at a time which is pain. and second it does not even work! it takes me through the end of the wizard for me to click finish and then says oops it does not work. there was an error!



Anyway i tried going through the ssis route cuz its going to be a nightly job. i used the ado.net odbc connection. It worked but the performance is really not acceptable. it took 5 mins to import 24000 rows where as dts was taking 1 sec to do this. i wish i could use the native mysql odbc 3.51 connector and import. can some one give me step by step instructions on how to do that ?



I hear someone mentioned of using excute sql task which can use mysql odbc 3.51 driver. but since i am new how do i get it to work. say for example in the excute sql task i run a statement like select * from addr. then what?

cuz eventually i want the result to be saved in a sql server table called addr. How can i get the result from that excute sql task and put it inside of an addr table in sql server. should i save the result to a variable of type object. but then how do i get the data from object and tell sql server in the designer that the result contains these columns and it needs to map to these columns in the addr table of sql server.

Very confused. i wish the first option would have given me results which an enterprise ETL gives. but apparently it is too slow that it wont be acceptable in a production envrioment. when i will have millions of rows coming in .



Please anyone can help me in this.



Thanks for the help!

View 1 Replies View Related

Equivalent Of Load Data Infile Of MySQL In SQL Server 2005?

Aug 1, 2007

hey all,
i want to know Equivalent of Load Data Infile of MySQL in SQL Server 2005?
in mysql we can direclty load file with Load Data infile query.
my question is how to do this in sql server 2005?
 thanks.

View 6 Replies View Related

Pulling Data From MySQL DBMS In France To Sql Server 2005 Here In US

Jan 22, 2008



HI All,
I want to pull data from mysql dbms to sql servr 2005, i have wrote the following codes but it takes more than an hour and half which is not visible. Thus is there any consideration to consider and reduced time it takes. For your information i am going to use SSIS packags, there is no any tranformation, it is direct dump.
Here is the code i am using,


SELECT *
FROM
OPENQUERY (Server_1,'


SELECT
t3.Column11 as Column1,
Column12 as Column2,
Column13 as Column3,
Column14 as Column4,
Column15 as Column5,
Column16 as Column6,
Column17 as Column7,
Column18/1000 as Column8
FROM
table1 t1
INNER JOIN
table2 t2
ON t1.ColumnId = t2.columnID
INNER JOIN
Table3 t3
ON t2.columnId = t3.columnID
WHERE t1.Column4 > Sometime ')


View 11 Replies View Related

Problem When Creating SP To Import Big Data From Linked Server Mysql By Using Openquery() To Sql 2005

Oct 27, 2007

I'm trying to use linked server to import big amount of data(around 9 million rows) from mysql to a sql 2005 table.
I plan to create a stored procedure and use job agent to run it at off-peak time everyday. The SP is like:

.....
Truncate table sqltblA;

Insert Into sqltblA(col1, col2, col3)
Select col1, col2, col3
From OpenQuery('mysql', 'Select col1, col2, col3 From mytblB')
.....

But when I tried to CREATE the above SP from management studio, seems the sql server was trying to get all data from table mytblB and ended up with failure after several minutes hang. The error message is sth. like "running out memeory". BTW, during that several minutes hang, I can't query mytblB using mysql's tool as well. it seems to me that table got locked.

However if i try to change the returned result to 100,000 rows by changing script to

Insert Into sqltblA(col1, col2, col3)
Select col1, col2, col3
From OpenQuery('mysql', 'Select col1, col2, col3 From mytblB Limit 100000')
The SP could be created without any problem and running the SP could get the data in table sqltblA.
But that's not what I want, I need all rows instead of a certain amount of rows.


Does anyone know what's going on there when I try to CREATE that SP and any solution to it?

Plus I tried to use SSIS as well. When I'm configuring the DataReader source, which uses ADO.NET's ODBC option to connect to mysql, if its sqlcommand is "select * from mytblB" without the Limit key word, then the configuration page will hang there as well and table mytblB is not accessible by using mysql tool. I'm just sick of wasting time on that and that's why I chose to use SP istead of SSIS. But same result. :-(

View 1 Replies View Related

Converting SQL 2000 Data Into A SQL 2005 Server

May 4, 2006

I have a large (huge) database that I want to copy onto my new slq 2005 test server. I'm leaning toward detaching the data on my 2000 box, duplicating it, copying it to my new 2005 machine, and attaching it. Is it possible that it could be that simple? If not, how is it done? Thanks a bunch for any help or pointers to the articles I was totally unable to find on the subject.

View 3 Replies View Related

Converting DB2 Timestamp Data To SQL Server 2005 - Problems With Unique Index

May 24, 2007

I am attempting to move a timestamp data column from DB2 to SQL Server 2005. Normally not a big deal but the column is part of unique index.



The DB2 timestamp has seconds of ss.ssssss but SQL Server only has ss.sss.



Most all the times entered into this column are a from an automated process so they are really close together timewise.



Here is what I have come up with so far:

1. Fast Load OLEDB with a batch of 10,000 records at a time

2. On the fail of the batch redirect rows to a regular table load OLEDB insert task

3. On the fail of the single insert redirect rows to script that ups the seconds one tick.

4. Attempt one last insert of the modified rows

5. If fail, then store the record off to a delimited text file



I am hoping to get the number of records that wind up in the delimited text file to be a very small number and not in the 1,000+.



Any help would be appreciated.

View 5 Replies View Related

Converting From MySQL To SQL

Mar 26, 2004

hi..
may i know how to convert from mysql to microsoft sql server ??
is it very troublesome ??
coz its quite a big project..
i need to convert frm mysql to sql..
is there any example or reference?
thanks

View 7 Replies View Related

Get Data Using Openquery() From Mysql To Sql 2005

Oct 27, 2007

I'm trying to use linked server to import big amount of data(around 9 million rows) from mysql to a sql 2005 table.

I plan to create a stored procedure and use job agent to run it at off-peak time everyday. The SP is like:

.....

Truncate table sqltblA;

Insert Into sqltblA(col1, col2, col3)
Select col1, col2, col3
From OpenQuery('mysql', 'Select col1, col2, col3 From mytblB')

.....

But when I tried to CREATE the above SP from management studio, seems the sql server was trying to get all data from table mytblB and ended up with failure after several minutes hang. The error message is sth. like "running out memeory". BTW, during that several minutes hang, I can't query mytblB using mysql's tool as well. it seems to me that table got locked.



However if i try to change the returned result to 100,000 rows by changing script to

Insert Into sqltblA(col1, col2, col3)
Select col1, col2, col3
From OpenQuery('mysql', 'Select col1, col2, col3
From mytblB Limit 100000')

The SP could be created without any problem and running the SP could get the data in table sqltblA.

But that's not what I want, I need all rows instead of a certain amount of rows.

Does anyone know what's going on there when I try to CREATE that SP and any solution to it?


Plus I tried to use SSIS as well. When I'm configuring the DataReader source, which uses ADO.NET's ODBC option to connect to mysql, if its sqlcommand is "select * from mytblB" without the Limit key word, then the configuration page will hang there as well and table mytblB is not accessible by using mysql tool. I'm just sick of wasting time on that and that's why I chose to use SP istead of SSIS. But same result. :-(

View 11 Replies View Related

Importing Data From MySql To MS SQL 2005

Feb 13, 2008



Please help - I am dealing with data transfer from multiple tables to multiple tables - what is the best practice to get this done? So far I have my connection to MySql figured out and I am using a DataReader source to get the data. What is the approriate Data Flow Transformation to pump data into three different tables in MS Sql 2005 database from three different tables in MySlq database? So far I was able to figure out how to do this for one table only...

Thanks,

Galina

View 12 Replies View Related

Help Converting From From MySql To MSSql

Jun 7, 2007

Hello,
I'm trying to use sql to create a db, but the file the guy gave me is MySql. I tried a few things, and then I asked him to try to migrate it to MSSql for me, but it's still giving me this error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'meteor'.

Here's the code i'm using in Studio Express:

CREATE DATABASE 'meteor';
USE 'meteor';
CREATE TABLE 'address' (
'address_id' int(11) NOT NULL auto_increment,
'address_1' varchar(255) default NULL,
'address_2' varchar(255) default NULL,
'city' varchar(255) default NULL,
'state' varchar(255) default NULL,
'zip_code' varchar(10) default NULL,
'country' varchar(255) default NULL,
'phone_1' varchar(255) default NULL,
'phone_2' varchar(255) default NULL,
'fax' varchar(255) default NULL,
'site' varchar(255) default NULL,
PRIMARY KEY ('address_id')
);




Thanks for any assistance with this!

View 5 Replies View Related

Converting Mysql 2 Sql 2000

Feb 19, 2004

how do i go about converting the Mysql Script below to Sql Server Script ????

CREATE TABLE cat (
id int NOT NULL auto_increment,
name char(20) NOT NULL default '',
PRIMARY KEY (id)
);

INSERT INTO cat VALUES (1,'Not Categorised');

ALTER TABLE cat AUTO_INCREMENT = 5;

i want a script that:
creates the table
inserts a row of data and then
sets the increment field to start at 5

i tried using identity(1,1) and
SET IDENTITY_INSERT cat ON;
INSERT INTO cat VALUES (1,'Not Categorised');

but when i enter the data in i get the error below

An explicit value for the identity column in table 'cat' can only be specified when a column list is used and IDENTITY_INSERT is ON.

please can anyone help or advice

thanks

View 4 Replies View Related

Converting Access Db To Mysql

Jul 20, 2005

Hey people,I have to convert MS Access 2000 database into mysql database, the wholething being part of this project I'm doing for one of my facultyclasses. My professor somehow presumed I knew db's and gave me long listof things to do with that particular database, first thing being thatparticular conversion. Truth is that I don't know a first thing aboutdb's, let alone using mysql... I downloaded mysql form www.mysql.com andstill searching for MS Access 2000 (it doesn't work with 2003 I have,or I don't know how to make it work).Any kind of help will be welcomed and highly appreciated!!!Thanks,Mario

View 17 Replies View Related

Param For MySQL Data Source In SSIS 2005

Apr 18, 2007

Hi experts,


I 'm trying to get countNumber from a select statement in MySQL source. Something likes this:

select @countNumber = count(*) from tableName where condition_1 = xxx

I use ExecuteSQLTask to get the result set with result name @countNumber along with ADO.NET connection type.
I 've installed mysql-connector-net-5.0.5 cause the source is MySQL 5x.

And I got a task failed error which is described below:

[Execute SQL Task] Error: An error occurred while assigning a value to variable "new_process": "Result binding by name "@new_process" is not supported for this connection type. ".


Please help me to fix this error, thanks alot

Best reguards,

View 8 Replies View Related

Creating SSIS Package To Extract Data From MySQL And Append To SQL 2005

Apr 26, 2007

Hi guys,

I'm a newbie DBA and i'm trying to create a package that would extract data from MySQL and inserts them to a SQL 2005 Server. I'm quite new to this SSIS and would like to ask help from you to help me go through with this.

I hope you guys can help me with this.

Hoping to hear from you soon.

Thank you so much.

Kind regards,
Neil

View 7 Replies View Related

MySQL To SQL Server 2005

Apr 26, 2007

I've been asked to migrate a db in MySQL to SQL Server 2005. Since I'm only familiar with sql server 2000 and before, I dont' know where to begin looking for the information I need.
Can someone point me to what I would search for in SQL Server 05 for this (is there any new features here I should be aware of that might make this easier?)
If anyone has done this, what are the gotcha's or things I should be aware of.
Thanks for any input

View 1 Replies View Related

Migrate From Mysql To Ms Server 2005

Jan 19, 2007

Hello. I have the following problem. I have a database in mysql and i want to migrate in ms sql server 2005. How can i do that? I have downloaded and installed MySQL Connector/ODBC .

View 8 Replies View Related

SQL Server 2005 Express VS MySQL

Feb 20, 2007

Hi guys,

im trying to develop a web application that uses a backend database, however im not quite sure what db backend to use. What are the diffrence between sql server express and mysql.. which is better to use in terms of small enterprises.? what are their limits..?

thanks you very much

View 4 Replies View Related

Connect To MySQL In SQL Server 2005

Aug 29, 2007

I am having trouble connecting to a MySQL database in SQL Server 2005. How can this be done in the easiest fashion?

View 7 Replies View Related

Convert MySQL To MS SQL Server 2005

Jul 27, 2007

Can anyone recommend me how I can convert MySQL database to MS SQL server 2005 database? I am new to the SQL server 2005. Is there any ODBC I can use? Thanks in advance

View 3 Replies View Related

Linked Server To MYSQL Using OLEDB Provider For MYSQL Cherry

Feb 12, 2007

Good Morning

Has anyone successfully used cherry's oledb provider for MYSQL to create a linked server from MS SQLserver 2005 to a Linux red hat platform running MYSQL.

I can not get it to work.

I've created a UDL which tests fine. it looks like this

[oledb]

; Everything after this line is an OLE DB initstring

Provider=OleMySql.MySqlSource.1;Persist Security Info=False;User ID=testuser;

Data Source=databridge;Location="";Mode=Read;Trace="""""""""""""""""""""""""""""";

Initial Catalog=riverford_rhdx_20060822

Can any on help me convert this to corrrect syntax for sql stored procedure

sp_addlinkedserver



I've tried this below but it does not work I just get an error saying it can not create an instance of OleMySql.MySqlSource.

I used SQL server management studio to create the linked server then just scripted this out below.

I seem to be missing the user ID, but don't know where to put it in.

EXEC master.dbo.sp_addlinkedserver @server = N'DATABRIDGE_OLEDB', @srvproduct=N'mysql', @provider=N'OleMySql.MySqlSource', @datasrc=N'databridge', @catalog=N'riverford_rhdx_20060822'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'collation compatible', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'data access', @optvalue=N'true'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'dist', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'pub', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'rpc', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'rpc out', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'sub', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'connect timeout', @optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'collation name', @optvalue=null

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'lazy schema validation', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'query timeout', @optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'use remote collation', @optvalue=N'false'



Many Thanks



David Hills



View 7 Replies View Related

Possible Use Or Import A MySQL Database In SQL Server 2005?

Apr 5, 2007

Hi all,I am developing a web application and the back end is MySQL database.
Now I want to shift all the data to SQL Server 2005.
Is there any method to do it?
Thanks
Tomy

View 1 Replies View Related

Equivalent Of LIMIT Of MySQL In SQL Server 2005?

Aug 1, 2007

hey all,
i want to know Equivalent of "LIMIT" of MySQL in SQL Server 2005?
in mysql we can direclty get data using LIMIT clause.
my question is how to do this in sql server 2005?
 thanks.

View 6 Replies View Related

MySQL To SQL Server 2005 Conversion Table

Mar 20, 2007

Does anyone know of a reference site where I can find a reference table to get a better idea of data type conversions that I should be using?

I have a MySQL 5.0 database which had a lot of tables (mostly empty) that I already have gotten transferred to SQL Server 2005. However, I am suspicious of some of the data type conversions that SQL Server did.

I would really like a good web site to bookmark to help me with this if there is such a reference. Can anyone help?

If not, the most specific example I have right now is a MySQL column that is expecting to accept currency and the MySQL data type is "Double". SQL Server 2005 translated this as a "float" data type. I normally use a "decimal" data type.

- - - -
- Will -
- - - -
http://www.strohlsitedesign.com
http://www.servicerank.com/

View 2 Replies View Related

Convert MySQL To SQL Server 2005 Express

Oct 3, 2007

I have a database that is in MySQL and would like to import it into SQL Server 2005 Express.

Can this be done? Any tutorials anywhere?

Thanks.

View 7 Replies View Related

How To Migrate Data Over From MySql Into SQL Server

Sep 4, 2007

Hi All,
We will replace our website which currently build in php and mysql into .net and sql server 2005. What is the best way to migrate all the user account from current database in mysql into sql server, also considering that there is different database table and fields?
Thanks in advance.

View 2 Replies View Related

I'm Looking To Import Data From SQL Server Into MySQL ...

Mar 28, 2008

problem is I don't have unfettered access to the MS SQL Server(7), so I need to send instructions on how to do it to a client.

After reading up a little, I figured "select view into ##tmp_table", and then dump the table, which, if I'm right, means I'll have an SQL dump that I can quite easily import into MySQL.

Problem,: What's the syntax to dump that temp table, or is there a better way to import the data into MySQL

TIA

View 5 Replies View Related

Import Data From MySQL To SQL Server

Sep 18, 2006

Hi All

I'm trying to import data from mySQL database to SQL server 2005. I installed mySQL odbc driver (3.51) and configured system DSN. However when I start SQL server import/export wizard mysql is not an option in data source dropdown.
What do I miss?

Thanks,
Vlad.

View 2 Replies View Related

How Do I Replicate Data From MySQL Into SQL-Server

Jul 23, 2005

Hello group,i am relatively new to SQL-Server database, but i have lots ofexperience with DB2 and Oracle Database. One of my tasks is setting upa replication between a Mysql-Database running on Linux and one of ourSQL-Servers.How do i achieve this ?If i understand the documentation correctly you have to program thereplication mechanism for yourself or you have to use some third partytool.Could anyone please outline, how to set up the replication mechanism(pointing me to some web-site should be enough) and also tell me ifthere is any third party tool.Thanks in advance and greetings from ViennaUli

View 1 Replies View Related

Getting Data Out Of Mysql Using Linked Server

Feb 27, 2007

Good Morning

the available oledb providers for mysql don't seem to work with sqlserver 2005.

So whats the best way these days of exposing data from within sql server from a mysql data base.

What I wanted to do was create a linked server connection to the mysql server using either oledb or odbc, but neither seem to work.

There is a .net provider for mysql, but that won't work to create a linked server connection.

any ideas appreciated.

What I want to do is write some scheduled proceedual sql from within sql server to query some tables in mysql and update some sqlserver tables.

thanks



David Hills









View 5 Replies View Related

How Do I Get A Database From Mysql Server 2005 To Plesk Hosting?

Aug 20, 2007

i've got a database stored on my computer using mysql server 2005, and I've just registered for hosting which uses the Plesk control panel.
In plesk I've setup a database and relevant user. What the easiest way of exporting the whole database on my computer and getting it onto my hosting account?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved