mssql-docker icon indicating copy to clipboard operation
mssql-docker copied to clipboard

sqlpackage macOS stability

Open jayoma opened this issue 8 years ago • 2 comments

Just curious how stable we should expect the macOS (preview 0.0.1, build 15.0.4057.1) version of sqlpackage to be? If this isn't the right place to ask this question, please point me in the right direction.

I'm using:

  • macOS High Sierra (10.13.5) with the mssql-docker container.
  • Parallels w/ Windows 10 + SQL Server 2014

I'm trying to get away from the need to run Parallels/Windows for local development. In my testing so far, I have sqlpackage installed on both Windows AND macOS, and have found the following to be true:

  • From Windows, I can use sqlpackage to [publish to/extract from] the SQL Server instance directly on my Windows box AND the containerized SQL Server instance within macOS.
  • From macOS, I cannot [publish to/extract from] either instance of SQL.

Here are some example errors I get with the macOS sqlpackage version:

  • When attempting to publish:

sqlpackage /Action:Publish /SourceFile:/path/to/dacpac/TestDb.dacpac /TargetConnectionString:"Data Source=localhost;Initial Catalog=TestDb;User Id=[sql user];Password=[password];" /p:CreateNewDatabase=true

Publishing to database 'TestDb' on server 'localhost'. Initializing deployment (Start) Initializing deployment (Failed) *** Could not deploy package. Unable to connect to master or target server 'TestDb'. You must have a user with the same password in master or target server 'TestDb'.

  • When attempting to extract:

sqlpackage /Action:Extract /OverwriteFiles:true /SourceConnectionString:"Data Source=localhost;Initial Catalog=TestDb;User Id=[sql user];Password=[password]" /TargetFile:"/path/to/place/dacpac/TestDb.dacpac"

Connecting to database 'TestDb' on server 'localhost'. Extracting schema Extracting schema from database *** Error extracting database:Could not connect to database server. Login failed for user 'TestDb'.

Yes, I'm 100% sure I'm supplying the correct user id/password within my connection strings. I've also tried including the port (i.e. "Data Source=localhost,4133;Initial Catalog=..."). Anyone have a similar experience? See anything obvious I'm overlooking above?

Given that I can interact with both SQL instances from Windows and neither from macOS, of course I'm blaming the macOS version of sqlpackage. So.. should this functionality be working with the current (preview) version?

jayoma avatar Jul 04 '18 04:07 jayoma

@pensivebrian - can you please take a look at this?

twright-msft avatar Jul 04 '18 14:07 twright-msft

Same here.

chocholous avatar Jan 29 '21 22:01 chocholous