0

I have an export file from an online database server that I need to use to generate the database locally on my system. I'm running MSSQL 2017 on Ubuntu 16.04.

The export file has Program(application/octet-stream) in file properties dialogue box.

I want to use this file with SQLCMD command-line tool. Is it possible? If yes, how to do it? Please inform me if there's anything else I can specify before closing this question, if it seems vague or anything.

  • What is the file extension of your export file? – dbdemon Apr 7 '18 at 9:41
  • @dbdemon It didn't have any extension. I added .bak myself. It's working fine on Windows now. On Ubuntu, it says can't access the directory. OS error. I believe I need to login SQL Server as my yser to be able to access the filesystem. Anyways, that's a separate issue. This one's solved I believe. Just need to find out how to login as user with FS access now. Thanks for the trying to help. :) – Deepak Maurya Apr 8 '18 at 9:14
1

The problem was that the export dump file didn't have any extension and the SQLCMD couldn't recognize the file and didn't accept it.

I added the a .bak extension to the file and the SQL Server Management Tool restored the database from this modified file. It's still doesn't work on Ubuntu but that's a permissions problem. I'll maybe ask a separate question or look for it if it's already asked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.