Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to log perfmon log (Windows Server 2008) to SQL Server 2005 (Windows Server 2003) using dsn (SQL Server authentication).

On start perfmon counter i am getting error:

"Call to SQLAllocConnect failed with [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ''. The user is not associated with a trusted SQL Server connection.."

Please help.

share|improve this question

Make sure that Perfmon is attempting to connect via a domain account, and not a local account (unless the SQL Server is installed locally).

You can also try giving the computer's domain account rights within SQL Server. In the SQL Server add a new login for DOMAIN\ComputerName$. The $ is important, so don't leave that out.

share|improve this answer

This error message normally means that your SQL Server has been configured to operate in "Windows Authentication Mode (Windows Authentication)" and doesn't allow the use of SQL accounts.

I guess you'll have to change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)" to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

If you want to use a "native" SQL Server user you'll have to change the server to Mixed Authentication.


It appears that Perfmon is not running under the credentials you specified, but as Network Service instead.

To solve this the service must run as a Windows user that has SQL Server credentials associated.

You can find some further information in this thread on a Microsoft discussion board.

share|improve this answer
    
Thanks for reply. Sql server is configured as "Mixed mode" only. I am running perfmon in administrator account. – Kartik M Jan 27 '11 at 10:08

In my case the problem was the missing DSN in the remote machine targeted by PerfMon. You must first login and configure both the 'DSN' and 'Data Collector Set' in the machine to be monitored by PerfMon (the remote machine). Then you can open the Perfmon in your local machine and change the target to the remote machine and start monitoring.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.