Hasan Shouman
Hasan Shouman

Reputation: 2372

Why I cannot connect to remote database when using tablediff.exe?

I am trying to sync to tables on differenet servers (Local one and remote one) using this code that I rum from the command prompt:

"C:\Program Files\Microsoft SQL Server\120\COM\tablediff.exe" -sourceserver localpc\SQL2014 -sourcedatabase localdb -sourceschema sche -sourcetable table1 -destinationserver remotepc\SQLEXPRESS -destinationdatabase remotedb -destinationschema sche -destinationtable table1 -et Difference -f d:\table1_differences.sql

but I recieve the error : unable to access database remotedb

The local db is SQL server 2014 express edition The remote db is SQL server 2014 express edition Firewall is turned off. I assigned the admin user as the logon account for the sql service on the remote server.

NOTE I can connect to the remote db normally from C# application or from my local SQL server . Thanks,

Upvotes: 1

Views: 723

Answers (1)

Hasan Shouman
Hasan Shouman

Reputation: 2372

Solved it by assigning the -destinationuser and -destinationpassword parameters

Upvotes: 1

Related Questions