Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


SQL Server 2005 connection problems

Posted on 2010-08-24
Medium Priority
Last Modified: 2012-05-10

I am having problems connecting to SQL server time to time.
In event log I keep getting msg like this:
Login failed for user 'sa'. [CLIENT: 192.168.x.x]

The user name is different in other msgs.

When I check the settings all is ok...all ports are enabled, all agents started...
Sometimes the problem goes away in few seconds. Sometimes the only thing to make it work is to reboot the WIN server and then its ok again.

I also checked log file for SQL server and I see errors like:
[165] ODBC Error: 0, Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [SQLSTATE IM004]
[382] Logon to server 'SERVER' failed (SaveAllSchedules)

I am using Windows Small Business Server 2003 Premium Edition with SQL Server 2005 standard.

Thanks for suggestions!
Question by:celjan79
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 12

Expert Comment

ID: 33508978
It appears to be unauthorized access attempts to the SQL server. If this machine is externally accessible using public IP, consider using a firewall and blocking ports 1443, 1444 on that server from the external network.

Author Comment

ID: 33509044
I dont allow external access to SQL and I do block all this ports.
LVL 12

Expert Comment

ID: 33509117
Try running a SQL profiler trace to audit login events and try to see what applications/processes are trying to login to your server from those IPs.
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.


Author Comment

ID: 33509156
I know which apps are trying to login because thats why the problem was found. When you try to run app you get run time error and login failed to SQL. Sometimes I get error that maybe SQL server isnt avaliable.

But if I wish to check other logins - how is this SQL profiler trace setting done?
LVL 12

Expert Comment

ID: 33509295
More info about SQL Profiler here :

The events you should be capturing can be found under Security Audit. Audit login and Audit login failed.

Accepted Solution

celjan79 earned 0 total points
ID: 33797463
The problem was in one software which was running in background.

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The articles for turning off the Client firewall policy on the internet are for SBS 2008 and don't really help for SBS 2011. They actually moved the Client firewall policy. In 2011, the client firewall policy has moved to the SBS computers conta…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question