Fix Sage 300 “Cannot Access Database” Error?

Sage 300 Cannot Access Database

Share Now:

Are you getting an error message “Unable to connect to database error” in Sage 300? It can disrupt your workflow and block access to essential data. This error signals that your computer is unable to connect with the database server. This issue usually arises from incorrect database credentials, network connectivity issues, misconfigured ODBC settings, or the firewall blocking your SQL port. In this article, we’ll go through the troubleshooting steps to re-establish the connection and get your Sage 300 system back on track.

We will be focusing on resolving the following errors:

  • Cannot Access Database Error=49153” with a newly installed server.
  • Cannot Access Database (Error=49153)” during login to an existing system.
  • Invalid Database Specification” when logging in from one workstation.
  • Invalid Database Specification occurs when logging into Sage 300 ERP.
  • Invalid Database Specification” occurs when logging into a database.

Let’s understand what may be causing these errors and how to resolve them.

Possible Causes of these Errors

  1. Your computer is unable to connect to the database server.
  2. The name you’re using to access the server might be wrong.
  3. A firewall might close the SQL port.
  4. Your database could not be running at the moment.
  5. There might be a problem with the version of the database software you are using.
  6. Like an address book for IP addresses, the DNS server can’t update its records to the new address.
  7. The ODBC Data Source entry to connect to the database may be missing in the database setup, or the Microsoft SQL Native Client driver may be damaged.

Now, let’s proceed to explore the solutions.

Solutions to Resolve Error “Cannot Access Database” in Sage 300

Error 1: “Cannot access database Error=49153” with a newly installed server

Caution: Inadequate alterations to Windows security configurations can significantly affect system functionality. Please get in touch with us if you need help.

Solution:

On the SQL Database server, ensure the following:

  • Verify that the SQL Server Service is active and running.
  • Check that the TCP/IP static port is set to the default value of 1433 in the SQL Server Network Configuration under Protocols for TCP/IP properties, specifically in the IP Addresses tab, and ensure the TCP Dynamic Ports field is empty.
  • Confirm that the SQL Server instance is configured to use the designated port, such as 1433, for a static connection.
  • The firewall settings must permit incoming traffic on the specified TCP/IP port.
  • Verify that the security system, including group policies and routers, is not blocking the SQL Server service.

Please continue the client-side verification if these checks cannot fix the issue.

Error 2: “Cannot access database (error=49153)” during login to an existing system.”

Solution:

Note: These steps require knowledge of the database engines and DBs used by your Sage product, such as Microsoft SQL, Pervasive SQL, or MySQL. Always back up all system and application DBs before making changes. 

On the client system, perform the following steps:

  • Access Sage Database Setup and review the profiles for the company and system databases. Verify the data source or server name, login ID, and database fields are correct.
  • Run C:\Windows\SysWOW64\odbcad32.exe to launch the 32-bit ODBC Data Source Administrator on 64-bit computers, or select Control Panel > Administrative Tools > Data Sources (ODBC).
  • Check the SQL server name within the DSN entry by browsing the System DSNs tab, finding the Data Source or Server name (perhaps with a”32″ suffix), and confirming.
  • All other settings should remain as they are. Enter the user ID and password for SQL authentication.

Check the database connectivity via the DSN:

  1. To verify connectivity and address resolution, open a Windows command prompt (cmd.exe) and ping the server name.
  2. Open a Windows command prompt (cmd.exe) and ping the server name to check address resolution and connectivity.
  3. Test the IP address directly if pinging fails.
  4. Retest database connectivity if pinging the IP address succeeds. If so, enter the IP address in the DSN entry.
  5. If connectivity still fails with the IP address:
  • The user ID may not have permission to access the SQL server.
  • The SQL server may not be configured to accept the connection.

Error 3: “Invalid Database Specification” when logging in from one workstation

Solution: 

  • Check User Account Control (UAC) settings and permissions. To launch Sage 300, right-click the shortcut icon and select “Run as Administrator.”
  • If Sage 300 is fully installed locally, apply the latest Product Update.
  • Verify that the maximum number of concurrent users has not changed.
  • Create a new ODBC DSN using the correct SQL driver and login credentials after deleting the existing one.
  • It is essential that there is no security software interfering with Sage 300 on the workstation.

Error 4: “Invalid Database Specification” occurs when logging into Sage 300 ERP

Solution:

  • To access the database’s tables, open SQL Server Management Studio.
  • Choose a database ID and click “Verify” to automatically create a server32 Data Source entry.
  • If necessary, install or repair the SQL Native Client 11 driver.

Error 5: “Invalid database specification” occurs when logging into a database

Solution: 

Install Sage 300 ERP by right-clicking the shortcut and selecting “Run as Administrator” or using the Windows Administrator account (this account is disabled by default in Windows 7).

After installing Sage 300 ERP, run the REGACC.EXE file in the Runtime folder (e.g., C:\Program Files\Sage\Sage ERP Accpac\Runtime or the corresponding folder based on your installation).

The following steps will enable the built-in Administrator account:

  1. Right-click the Command Prompt icon in the Start menu under Accessories and select “Run as administrator.”
  2. Enter the command: net user administrator /active: yes
  3. Click ENTER.
  4. Log out as soon as you receive a message confirming the command was successful. Admin accounts should now be available for login.

Note: The Administrator account does not have a password by default. It is recommended to set one if you keep this account enabled:

  1. Open a command prompt window.
  2. Enter: net user administrator (replace <password> with your desired password).
  3. Press ENTER.

To disable the built-in Administrator account:

  1. Log in with a standard user account.
  2. Under the Accessories menu in the Start menu, right-click on the Command Prompt icon and opt for Run as administrator.
  3. Enter: net user administrator /active:no
  4. You can now hit ENTER.

Now that the Administrator account has been disabled, it will not appear on the login screen.

Summary

Sage 300 cannot access database error can be resolved with a few steps once you know the particular issue causing this error. Ensure the database server runs, the network connection is stable, and permissions are correctly set. Regular updates to your Sage 300 software and database tools can help prevent this error. Contact our Sage specialist if you continue to experience problems at our toll-free number: +1-855-738-4496.

Frequently Asked Questions

What does Empty DB Error 49153 Mean?

This error occurs because the system cannot connect to the database and will display as “Cannot access database (error=49153)” when attempting to log in.

What is Sage 300 Error 40960?

Error 40960 appears whenever the Sage 300 program is unable to establish a connection with the database. This means that even though the Sage 300 program has started, it cannot connect to the database.

How can I fix Sage 300 error 49153, ‘Cannot Access Database’ on Windows?

1. Verify the database credentials in Sage 300.
2. Temporarily disable the firewall or antivirus software.
3. Confirm SQL services are running for the correct instance.
4. Configure the ODBC connection with the correct SQL credentials:

– Navigate to C:\Windows\SysWOW64\odbcad32.exe
– Click on the System DSN tab, then Add
– Ensure the driver is ‘SQL Server Native Client 11.0’. 
– If not, delete and recreate the ODBC with this driver.

What is the best way to Verify that the Database Server is Running?

Log in to the database server computer using an Administrator account. Open Microsoft SQL Server Management Studio. In the left pane, check if the SQL Server Agent is running. If it is not, right-click on SQL Server Agent and select Start.

What can I do to Prevent Sage 300 Error 49153 from Occurring again?

1. Regularly maintain the database server.
2. Update Sage 300 and SQL Server.
3. Check and update database credentials.
4. Ensure stable network connections.
5. Allow Sage 300 communication through firewall/antivirus.
6. Set SQL Server Agent to start automatically.
7. Update user access permissions.
8. Use the correct ODBC driver.
9. Implement a backup plan.
10. Maintain a regular audit of the configurations of the database and the system.