sql-server-cesql-server-ce-4sql-server-ce-toolbox

SqlCeToolbox: A network-related or instance-specific error occurred while establishing a connection to SQL Server


I am using SQLCEToolbox's Export2SQLCE CLI and I am trying to follow this guide from the official documentation. I used this command from the guide:

exportsqlce "Data Source=C:\so_sample\sample_v4.sdf;" sample_v4.sql

But I am getting this error:

Message: a network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Source : .Net SqlClient Data Provider
Number : -1

It's odd since the documentation hasn't mentioned anything about SQL Server credentials/instances and my .sdf file doesn't have credentials in the first place. I am using this build of Export2SQLCE; the one on the export2sqlce.zip

You can find the .sdf file I'm targeting it with here. My file is currently on SQL Server CE v4.

What seems to be wrong to the command? Thanks!


Solution

  • You use the wrong tool - it is exportsqlce you want to use.

    https://github.com/ErikEJ/SqlCeToolbox/wiki/Command-line-tools