sql-dump does not work with Windows SQL Server, and sql-sync needs adjustment for all database types.

CommentFileSizeAuthor
#3 sql_server_dump_initial.patch1.16 KBwelinwelchev

Comments

greg.1.anderson’s picture

Issue tags: +Windows

Forgot 'windows' tag again.

greg.1.anderson’s picture

Title: Drush SQL enhancements on Windows » sql dump does not work with windows sql server
Priority: Normal » Major
welinwelchev’s picture

StatusFileSize
new1.16 KB

Hi,

Appologies if I am not putting the right status here. "needs review" seem the most appropriate.

I want to suggest a patch for this enabling basic dump ability for sql server. I have tested it locally and it works fine.

Sql server dumps are that they are binary files, and all our other dumps actually have .sql statement files generated.

In my research towards this issues I found this http://sqlserverdump.codeplex.com/ tool, which it is too new and still in Alpha but still it can be a tool to be packed by the installer and will provide sql statement dumps from sql server also.

greg.1.anderson’s picture

Status: Active » Needs work

Thanks for pushing this issue forward! You are correct, "needs review" was the right status for #3.

If there is nothing in $file, use drush_set_error instead of echo.

The other really important thing is that there needs to be a way to import the file again after you dump it. Currently, we have no sql-import command for Drush; we just tell folks to use `drush sql-connect` < $file. What is the best way to import a binary SQL Server dump file? Maybe we need sql-import to wrap this operation (maintaining database agnosticism for Drush clients)?

As for sqlserverdump, it certainly sounds promising. My instinct would be to use the native tool by default, but dumping to sql statements could be a good ad-on feature for the future, if it becomes stable enough to be packaged with the Drush installer.

moshe weitzman’s picture

archive-restore needs to be able to restore whatever was dumped so we do have a use for this in core. i guess this does argue for adding a sql-import command as a wrapper.

Still, sqlserv compatibility is a way lower priority (for me) than general Windows compatibility for drush.

greg.1.anderson’s picture

Assigned: greg.1.anderson » Unassigned

Don't have time for sqlserv compatibility right now.

moshe weitzman’s picture

Status: Needs work » Fixed

We actually added this during the code sprint this weekend. It uses sqlcmd

greg.1.anderson’s picture

Awesome.

Automatically closed -- issue fixed for 2 weeks with no activity.