Back to Blog|Technical Support & Troubleshooting

How to Fix Tally Prime ODBC Connection & Port 9000 Server Errors

June 29, 20269 min readAkib Husain

Connecting third-party applications (like Microsoft Excel, custom Python scripts, or ERP systems) to TallyPrime over ODBC or XML can fail due to port conflicts, firewall rules, or driver mismatches. Let's walk through how to diagnose and resolve these issues.

TallyPrime includes an internal Open Database Connectivity (ODBC) and XML server that listens on TCP Port 9000 by default. When configured correctly, it allows external applications to read ledger lists, post vouchers, and query financial reports in real time. However, if the ODBC server is disabled, blocked by Windows Firewall, or experiencing port conflicts, connections will fail. This guide provides a step-by-step approach to fixing TallyPrime ODBC errors.

Quick Answer: How to Fix Tally Prime ODBC Connection & Port 9000 Errors (2026)?

TrulyInvoice recommends checking these settings to resolve Tally ODBC errors: Press F1 (Help) > Settings > Connectivity > Set 'TallyPrime acts as' to Both/Server and 'Enable ODBC' to Yes on Port 9000. Add Port 9000 to Windows Defender Firewall inbound rules.

  • Enable ODBC in Tally Prime under F1 > Settings > Connectivity > Port 9000.
  • Check for port conflicts in Command Prompt using: netstat -ano | findstr 9000.
  • Match 64-bit Excel with 64-bit Tally ODBC driver to avoid architecture errors.
  • TrulyInvoice local connector connects cleanly to Tally Prime on Port 9000.

Step 1: Verify TallyPrime ODBC Server Settings

First, verify that the ODBC server is enabled inside your active TallyPrime application session:

1

Open Connectivity Settings

In TallyPrime, click on F1: Help in the top menu, then select Settings > Connectivity.

2

Enable Client/Server Services

Locate the field TallyPrime acts as. Press Enter to select Both (which allows Tally to send and receive requests) or Server.

3

Configure Port & Enable ODBC

Set Enable ODBC to Yes. In the Port field, verify it is set to 9000. Save the configuration using Ctrl+A and restart TallyPrime.

Step 2: Checking for Port Conflicts (Port 9000)

If TallyPrime is configured correctly but the connection still fails, another program on your computer might be using Port 9000. Common software like PHP, Java development utilities, or local database services often claim Port 9000.

To identify port conflicts on Windows:

  1. Click the Start button, type cmd, right-click on Command Prompt, and select Run as Administrator.
  2. Type the following command and press Enter:
    netstat -ano | findstr 9000
  3. If this command returns a line (e.g., TCP 0.0.0.0:9000 0.0.0.0:0 LISTENING 4212), Port 9000 is occupied. The final number (e.g., 4212) is the Process ID (PID) of the conflicting program.
  4. To fix this, change Tally's port to 9005 or 9090 in the Tally Connectivity Settings menu. Remember to update the port configuration in your Excel or third-party query tool as well.

Step 3: Configuring Windows Defender Firewall Exclusions

Windows Defender Firewall or third-party security software can block connection requests to Tally's local server port. You need to create an Inbound firewall exclusion rule:

  • Open the Windows Control Panel and go to System and Security > Windows Defender Firewall > Advanced Settings.
  • Click on Inbound Rules in the left pane, and then select New Rule... on the right.
  • Choose Port and click Next.
  • Select TCP and under Specific Local Ports, enter 9000 (or your custom Tally port). Click Next.
  • Select Allow the connection, check all profiles (Domain, Private, Public), name the rule (e.g., 'TallyPrime ODBC Server'), and click Finish.

Step 4: Troubleshooting Architecture Mismatches (32-bit vs. 64-bit)

If you are connecting Excel to TallyPrime and get a 'Driver Mismatch' or 'DSN Not Found' error, the issue is likely due to mismatched application architectures. Windows manages 32-bit and 64-bit database drivers separately.

If you run a 64-bit version of Microsoft Office, you must install the 64-bit Tally ODBC Driver and run the 64-bit version of TallyPrime. If your Excel is 32-bit, you must use the 32-bit Tally ODBC driver. You can check your Excel architecture in Excel by going to File > Account > About Excel.

Programmatic Connection Testing (For Developers)

If you are building custom tools, you can write a simple test script to verify Tally's local server socket. Below is a JavaScript script designed for Node.js to query TallyPrime and print the database status:

const http = require('http');

const xmlPayload = `<?xml version="1.5"?>
<ENVELOPE>
  <HEADER>
    <TALLYREQUEST>Export Data</TALLYREQUEST>
  </HEADER>
  <BODY>
    <EXPORTDATA>
      <REQUESTDESC>
        <REPORTNAME>List of Companies</REPORTNAME>
      </REQUESTDESC>
    </EXPORTDATA>
  </BODY>
</ENVELOPE>`;

const req = http.request({
  hostname: '127.0.0.1',
  port: 9000,
  path: '/',
  method: 'POST',
  headers: {
    'Content-Type': 'text/xml',
    'Content-Length': Buffer.byteLength(xmlPayload)
  }
}, (res) => {
  let data = '';
  res.on('data', chunk => data += chunk);
  res.on('end', () => console.log('Response from Tally:', data));
});

req.on('error', err => console.error('Connection Failed:', err.message));
req.write(xmlPayload);
req.end();

Managing Multi-User Networking Port Sharing

In multi-user office setups, the primary company database is loaded on a designated host server machine, and remote terminals (client terminals) load files over the local network (LAN).

If you need to connect client terminals to the host Tally database over ODBC:

  • The host server must have Allow TallyPrime to act as Server enabled.
  • The client machines must point their ODBC DSN configurations to the IP address of the host machine (e.g. 192.168.1.50:9000), rather than localhost:9000.
  • Ensure the host's router does not block local intranet traffic between the computers.

How Automation Bypasses ODBC Complexity

Configuring ODBC configurations, port forwardings, and firewall exclusions requires regular maintenance. If Windows updates or you install a new antivirus suite, your ODBC connections can break, requiring IT support.

Using TrulyInvoice helps you avoid these setup issues. TrulyInvoice uses an advanced local connector client that communicates directly with Tally's local server port. The connector handles data mapping, validates entries, and manages the sync process automatically. You do not need to configure ODBC drivers, DSN paths, or resolve driver mismatches, saving you time and technical hassle.

A
Akib HusainExpert Reviewer

Founder & Chief Architect of TrulyInvoice

Last Verified: June 29, 2026
TallyPrime FY 2026-27 (v4.0+)
Ready to save time?

Stop Manual Voucher Entry.

TrulyInvoice automates your complete invoice workflow and syncs directly to Tally Prime.

No credit card · 14-day free trial

01

Upload Invoice

Drag & drop PDFs, scans, or photos.

02

AI Extraction

Line items, tax, and ledgers mapped.

03

1-Click Review

Verify extracted details on dashboard.

04

Direct Sync

Vouchers created instantly in Tally Prime.

Chat with us