When using Tablediff I keep getting "Unable to access database"

John Hales (ROI Mailbox) 20 Reputation points
2023-06-05T23:07:04.31+00:00

I have SQL 2017 Standard running on Windows 2019 in a VM as a source VM. I also have a 2nd server running SQL 2019 Enterprise running on Windows 2019. I can connect to both and use both using SSMS, including querying any table. I'm using Windows authentication on the 1st server and SQL authentication on the 2nd server. When I use Tablediff utility, I have supplied the source and destination server, database, and table and I have also supplied the destination user and password. Every time I run the command I get "Unable to access database". I confirmed everything is spelled correctly. I have searched online and can't seem to find anything about why it can't connect. Also, I have installed the .NET Framework 3.5 required by Tablediff and can successfully query tables in both server's databases using sqlcmd.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,808 questions
{count} votes

Accepted answer
  1. Erland Sommarskog 101.8K Reputation points MVP
    2023-06-06T15:36:47.3966667+00:00

    Here is the exact command (logged in as a user to Windows that belongs to the sysadmin group):

    And you expect you get your sysadmin rights because you are logged into Windows as an administrator? In such case, you should open the command prompt with "Run as Administrator", so that Windows passes the admin token to SQL Server.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful