Replibyte icon indicating copy to clipboard operation
Replibyte copied to clipboard

Support for Microsoft SQL

Open gatkisson opened this issue 3 years ago • 5 comments

We'd love to use this with MSSQL databases as well - can you please add support?

gatkisson avatar May 14 '22 14:05 gatkisson

+1 would love to see support for this as well!

Go2Engle avatar May 14 '22 21:05 Go2Engle

If one of you has a valid MSSQL database dump, I can take a look at the amount of work requires to support MSSQL. I will need also to check the complete grammar.

evoxmusic avatar May 15 '22 09:05 evoxmusic

If one of you has a valid MSSQL database dump, I can take a look at the amount of work requires to support MSSQL. I will need also to check the complete grammar.

Do you want a live database?

You can download SQL server developer edition (free) from https://www.microsoft.com/en-gb/sql-server/sql-server-downloads - which you can install on Windows/Linux. Or there's also a Docker version which will work on Mac too.

Arguably the best database would be AdventureWorks which is Microsoft's huge sample database. You will most likely want to download the AdventureWorks2019.bak version.

This explains how to restore it onto your local server. Using the Management Studio option is probably the friendliest way.

If you want an SQL dump you can (in Management Studio) right click the database > tasks > generate scripts- image

When you get to the set scripting options section scroll down to types of data to script to specify if you only want to dump the schema, the data, or both.

image

(I'd love to see MSSQL support too 🙂)

akiller avatar May 16 '22 09:05 akiller

@evoxmusic I think mssql-scripter would be the perfect tool for creating and restoring dumps for mssql. Also, this page contains a lot of information about how to use the mentioned tool and some dump templates to get a sense of the grammar (from an initial look it seems very different from pg\mysql ☹️).

Thanks to @iliaFeldgun for helping with the research 🚀

benny-n avatar May 16 '22 21:05 benny-n

[...] (from an initial look it seems very different from pg\mysql ☹️).

Sounds like it's going to take some time to properly support MSSQL. Maybe we must consider writing a doc explaining how to add a connector and point toward a "how to write a SQL parser" documentation (nothing too complicated from my POV... but I am certainly biased).

evoxmusic avatar May 16 '22 21:05 evoxmusic