Re: SQL open error

From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 10/24/04


Date: Sun, 24 Oct 2004 21:11:36 +0000 (UTC)

Parrot (Parrot@discussions.microsoft.com) writes:
> I reinstalled SQL 2000 server after reformatting my drive. Now I cannot
> open a database in my C## program as before. If I used
> "Provider=SQLOLEDB;
> Data Source=localhost; Initial Catalog=master;Integrated Security=SSPI"; I
> get an Invalid login error. If I use "Provider=SQLOLEDB; Data
> Source=localhost; Initial Catalog=master;User ID=Dave;Password=midn1te"; I
> get the following error, "User no associated with a trusted server." What
> did I do wrong on my installation? Anyone know what these errors mean? I
> sure can't find the answers in the Help.

Judging from the second error, SQL Server is configure to accept
Windows Authentication only. Use Enterprise Manager, if you think you
need SQL Authentication.

As for the first error, I would guess that you have not granted access
to the Windows user you are logged in as. However, I don't think the error
message in this case would not be "Invalid login". Then again, your
rendition of "not associated with a trusted connection" is also incorrect,
so you may not give the exact error message.

If you run SQL Server on your local box, and you run from an account
with admin priviledges, you don't have to grant access, as admins are
automatically mapped to BUILTIN\Administrators. But if you run Windows
from a plain vanilla account, you need to grant access to that user
with sp_grantlogin, and then access to the databases you need with
sp_grantdbaccess.

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp


Relevant Pages

  • RE: Backups have Shadow Copy Problems
    ... and restarted the server. ... suggested and changed the recovery model to simple on the one database called ... I understand the issue to be: the backup task failed ... You back up data from a volume that contains a Microsoft SQL Server ...
    (microsoft.public.windows.server.sbs)
  • Re: upsizing to sql 2005
    ... the word SERVER in it, ... You can access to the database by multiple means (Access, ... and how does it update the SQL database with the new records in Access? ... Query Name: Arcadia - ARC ...
    (microsoft.public.access.queries)
  • Re: Linked Tables in Access
    ... any use of SQL Passthru, Linked Tables or any other use of MDB / MDE ... server, or would I also need to convert *those* queries to passthrough ... I've been trying to understand why Access database files become corrupt. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Trouble Getting VS.Net 2003 WalkThroughs MSDE Connection
    ... Config Tool of SQL Server? ... > link to download the PUBs database. ... >>> Setup and they directed me to install MSDE and they attached a ...
    (microsoft.public.sqlserver.msde)
  • Re: Leveling by ID vs. "Standard"
    ... of this trade called Project Management. ... a database for the "Project Tables," ... to write reports on data from the server database. ... product supporting queries created with SQL. ...
    (microsoft.public.project)