DTS like process for MySQL - mysql

I have written a query I want to run against a MySQL db every hour and then email the results to a fixed email address. I know how to do this using DTS on SQL server but have no clue how to do it on MySQL. Does MySQL have an equivalent to DTS.

You could just write this using your favorite scripting language and then set it up as a cron job.

What I ended up doing is downloading the MySQL connector for SQL Server and then used CDO in VB Script to send the email.

Related

Importing .bak from MSSQL into MySQL database

My companies site uses a mysql database. One of our clients just trying to take advantage of our API is only able to give us the data in the form of a MSSQL .bak file
I have been trying to import the file using the migration tool built inot mysql workbench but have no luck.
On top of that I am trying to see if this can be done in powershell as I would like to automate this process in the future.
Any suggestions or help would be appreciated
You cannot. MS SQL Server backups are proprietary to MS SQL Server and cannot be used with any other RDBMS. You will need to restore this backup to SQL Server, then use an additional tool to transfer the data from SQL Server into MySQL.
Can you do that second portion through PowerShell? Probably. Though SSIS would probably be a better method.

SSIS linked to a mySQL server

in SQL server it's possible to link a mySQL server into msSQL and query it using SSMS for example. I want to try this and use SSIS to do some transformations and store all the data on this mySQL database.
\I read that there a several ways to link to mySQL into the msSQL server. OLE DB, mySQL ODBC etc etc.
2 questions:
Are there any limitations i might run into when i will use a combination of SSIS and mySQL instead of msSQL?
When i link a mySQL database into msSQL and i write a query in SSMS, do i write the queries in mySQL language or msSQL language. For example the difference in TOP and LIMIT
I have worked with a linked MySQL Server from SQL Server in the past and ran into some issues.
Querying MySQL from SSMS (SQL Server)
Once you have created a linked server you would imagine you should be able to use the four-part name and query the tables in MySQL but it doesnt allow you. for example you cannot do something like...
Select * from MySqlServer.DbName.Schema.TableName
For some reason it throws an error. So the question whether I can use T-SQL in SSMS to query a Linked MySQL Server? Nope, unfortunately not.
But alternatively Microsoft recommends using OPENQUERY to execute queries to a linked server.
When using OPENQUERY, SQL Server does not try to parse the query, it just sends it to the linked server as it is. which means you can/should be able to write MySQL in SSMS using OPENQUERY and it will work.
Using SSIS with MySQL
Even though SSIS is Microsoft's tool that comes with SQL Server but it is a proper ETL tool which can read data from multiple sources and send data to many types of destination.
Once you have used the appropriate driver to connect to MySQL and ported data in SSIS package , its really not relevant anymore, where the data came from? you would have access to all the SSIS tools and you should be able to use them as if the data was coming from a flat file, SQL Server or Excel sheet etc.
By using Linked Server in MSSQL you can also connect to mySql. for that you need to download ODBC drivers. and then you have to create new dsn and while creating dsn you have to insert mySql server's details. then you can further search regarding how to create Linked server on SQL SERVER. This option is very easy and Totally free. You can use OPEN QUERY FOR inserting, updating, deleting and also get the data out from mySQL.

Copy MSSQL data to MySQL DB every 5 mins?

I'm looking for some advice over the best way to transfer data from a local MSSQL DB to a remote MYSQL database every 5 mins?
At the moment I am using a tool called SQLYOG which allows me to create a connection to my local MSSQL database and to my remote MYSQL server and set up some queries and mapping.
It also allows me to create a windows scheduled task which runs every 5 minutes.
This solution has been working ok but is only about 95% reliable and seems to struggle sometimes.
This software runs in GUI mode and via cmd prompt so is reasonably light weight when running a scheduled task.
Does anyone know of any other light weight tools or methods I can use to get the same outcome?
You can use SymmetricDS. its a good & efficient open source tool for this purpose.
you can use SSIS packages to do that.
SQL Server Integration Services (SSIS) is a component of the Microsoft SQL Server database software that can be used to perform a broad range of data migration tasks.
Couple of options:
1. create linked server to mysql then copy rows via linked server in sp, set sql job to execute.
2. build ssis package and run it in sql job.
What I feel is the best soultion for this is to design an ETL job using either SSIS or Talen Open Studio.

Getting SQL agent in mysql

I am coming from a SQL server 2008 background. I have a mysql local server running, and I wanted to set up some scheduled jobs via the sql agent. I have found some sketchy third party sql agents for mysql but none built in. Is there a sql agent or a recommended one for mysql? Thank you.
Usual approach is to set up a cron job to run a script. I used to use Perl for the scripts, but bash etc will do it as well.

What steps are needed to use an Entity Framework model with a MySQL server?

I've added and designed an ADO.NET Entity Data Model (.edmx) and have generated the corresponding DDL Script (.edmx.sql). When I was using SQL Server 2008, all I had to do was connect to it via the Transact-SQL Editor toolbar and execute the SQL. When I try this method, however, it doesn't let me connect to the MySQL server, as it seems to be looking only for Microsoft SQL Servers. I have the latest version of Connector/Net, and can add the MySQL database as a Data Connection, but cannot execute the script I need. What steps are needed to use an Entity Framework model with my MySQL server?
I stumbled across this little property while editing my Data Model:
(This option was installed along side Connector/Net.)
After changing to SSDLToMySQL.tt, right-click and select Generate Database from Model... as you would normally. This will generate the .edmx.sql file, and should give you several errors (as .NET uses SQL Server to parse .sql files.) After generating the DDL script, I opened up MySQL Workbench and pasted the script in. You need to make sure that an appropriately-named schema already exists on the server, then run the script, and voila.