Re: Windows Services and SQL Server



"Diogo Alves" <DiogoAlves@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:DCD9B11E-BED4-4DD0-AB45-4EDE0E432F3C@xxxxxxxxxxxxxxxx
Greetings everyone,

I am trying to access my SQL Server 2005 database with a windows service,
the problem is that I can't access it!

It says ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login
failed for user 'ONEWORLD\N5DALVES$'.

Windows services that run in the "Local Service" or "Network Service" account, authenticate using the machine account with a $ appended on the network.

ONEWORLD is my domain, N5DALVES is my computer name.... the $ appears there
like magic...

in the SQL Server I don't have that user... I have ONEWORLD\DALVES...
that's my username in the intranet...

How can I avoid this? I tried to use this connection string:


1. By running your service in a domain account, or
2. When running in a W2K AD domain, you can grant the machine account
(domain\machinename) access rights to the SQL Server database.

DSN=MyDataSource;Uid=TimeFiveUser;Pwd=_TimeFiveUser_;

I'm using ODBC Drivers

Why using legacy ODBC drivers when there are managed stacks available for most DB's systems on the market?


Willy.

.



Relevant Pages

  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cluster will not fail over.
    ... > As far as the TCP/IP issue goes, you had to rebuild the cluster and were ... > able to restore the master database. ... > a cluster installation you'll have to revisit. ... >> This worked bringing up the sql server in minimal mode. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Word 2003/Access2000/SQLSVR
    ... SQL server being where the data is held and this is accessed through a MS ... entire database and that may be say a record for Berkshire. ... "Peter Jamieson" wrote: ... replaced with the first record on the table in use. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: MS Access DAO -> ADO.NET Migration
    ... full SQL Server and I see the logic you explained in a multi user ... allow two users to access the same database file Read/Write at any given ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS Access DAO -> ADO.NET Migration
    ... For that it is much harder to handle the incremental identifier, ... database but although they have the data, they are not connected at the same ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... SQL Server Management Studio is nowhere to be found on my ...
    (microsoft.public.dotnet.framework.adonet)