I'm trying to export my database to a .bacpac file. I get the following error:
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
The command I'm using is:
/opt/mssql/bin/sqlpackage /action:Export /SourceServerName:localhost /SourceDatabaseName:MyDB /targetfile:'/media/jake/1F171B4C75D06418/MyDB.bacpac'
The database I'm trying to back up is on a different ssd than my mssql installation. I don't know if that makes a difference.
I've been googling around for how to fix this and most people using windows had their similar problem solved by making sure that various windows services were running and starting them if they weren't. But I'm not sure how to check for the same thing in linux, but I think all the services I need are currently running because I can connect to the database via
sqlcmd
as well as through JetBrains' DataGrip application. So I know that a connection is possible. I just don't know why sqlpackage
is having trouble connecting...
I've also tried variations of this command on the SourceServerName
parameter:
/opt/mssql/bin/sqlpackage /action:Export /SourceServerName:tcp:localhost,1433 /SourceDatabaseName:MyDB /targetfile:'/media/jake/1F171B4C75D06418/MyDB.bacpac'
And the error is slightly different:
(provider: TCP Provider, error: 0 - No such host is known.)
Asked by Jake Smith
(141 rep)
Jul 1, 2017, 07:42 PM
Last activity: Jul 12, 2020, 05:06 PM
Last activity: Jul 12, 2020, 05:06 PM