Error Login failed for user sa / SQL Server does not exist or access denied

The error occurs when Torgsoft cannot connect to the Microsoft SQL Server database using the system user sa.
In most cases, this is caused by the SQL service being stopped, database corruption, or incorrect connection settings.
This material is intended for users and system administrators who have basic skills with the operating system, Windows services, and Microsoft SQL Server. All actions described are performed at your own risk: incorrect changes to settings, services, or the database may result in data loss or the software becoming inoperable. Before making changes, it is recommended to create an up-to-date database backup, check free disk space, and make sure there are no active users in the system. If you are not confident in the correctness of the actions or do not understand the consequences — contact technical support.
When it occurs
-
After restarting the PC or a power outage
-
After moving the software or changing the computer name
-
After updating Windows, antivirus software, or SQL Server
-
When the disk is full or the SQL Express database size limit is reached
Symptoms
-
Message Login failed for user 'sa'
-
Message SQL Server does not exist or access denied
-
Torgsoft does not open; the error appears immediately on startup
-
The software works only on one PC; other computers cannot connect
Causes and solutions
A. SQL Server service stopped (most common)
Cause: the service did not start automatically after a reboot.
What to do:
-
Open services.msc or SQL Server Configuration Manager
-
Find the SQL Server service (instance name)
-
Start the service manually
How to verify: service status — Running
Sometimes the service does not start because the Windows user password under which it is configured has changed (if it is not a system account). Also check whether the TCP/IP protocol is disabled in SQL Server Network Configuration.
B. Database in Suspect or Recovery Pending state
Cause: an emergency shutdown of the PC while writing data.
What to do:
-
Connect via SQL Server Management Studio
-
Or run a database recovery procedure
-
Or restore the database from the latest backup archive
Important: if you do not have SQL experience — contact technical support.
C. Incorrect server name in configuration files
Cause: the PC name was changed or the software was moved to another computer.
What to do:
-
Open the files:
-
ADConnectionDefs.ini
-
AdminServer.ini
-
Specify the current PC name or 127.0.0.1 for local work
-
Save the files and restart the software
D. Incorrect password for the sa user
Cause: the password was changed or entered incorrectly.
What to do:
-
Check the keyboard layout
-
Copy the password from a text file
-
If the password is lost — reset it via SSMS under a Windows account
SQL Server has an account lockout mechanism. If there were many attempts with an incorrect password, the sa account may be temporarily locked (Account is locked out), even if the password is now entered correctly.
E. SQL port blocked by firewall or antivirus
Cause: a port (usually 1433) or the software executable files are blocked.
What to do:
-
Add port 1433
-
Add these files to exclusions:
-
torgsoft.exe
-
TorgsoftLicenseService.exe
Indicator: it works on the server PC, but not from other computers.
In addition to port 1433 (TCP), dynamic ports or named instances (Named Instances) often require port 1434 (UDP) for the SQL Server Browser service.
F. Disk full or SQL Express database limit reached
Cause: the 10 GB limit is reached or there is no free disk space.
What to do:
-
Free up space on drive C:
-
Delete old archives
-
Run Shrink on the log file and database
-
Clear user activity logs
G. Outdated SQL Server version
Cause: using SQL Server 2005 or other outdated versions.
Signs:
-
Errors like Incorrect syntax near 'VALUES'
-
New features cannot work (pRRO)
What to do:
Update SQL Server to version 2014 or later.
How to verify the result
-
The SQL Server service has status Running
-
The database in SSMS has no Suspect / Recovery Pending statuses
-
Torgsoft opens up to the accounting center selection without errors
Prevention
-
Use a UPS for the server PC
-
Enable daily backups (code 057)
-
Add the Torgsoft folder to antivirus exclusions
-
Regularly close periods and clear logs
If Torgsoft cannot connect to the database — first check the SQL service, then the database state, and only then the password and the network.
In 80% of cases, the issue is resolved without reinstallation.
-
16.03.2026
Duplicate barcodes and names: how to find, merge and fix them so as not to break the accounting
How to find, merge and fix duplicate products in Torgsoft to avoid errors in balances, reporting and inventory
-
27.02.2026
Directory errors: causes of failures and financial losses
Errors in Torgsoft directories: barcode in quantity, zero cost, duplicates, fiscal failures and database slowdowns
-
03.02.2026
Password recovery for "Owner" or sa user
Guide to restoring Torgsoft access (sa user). Reset password via SQL Management Studio, osql command line, or contact technical support for assistance.









Go back to the previous step