Re: SQL open error
From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 10/24/04
- Next message: Erland Sommarskog: "Re: OLEDB Session Error"
- Previous message: Parrot: "SQL open error"
- In reply to: Parrot: "SQL open error"
- Next in thread: Parrot: "Re: SQL open error"
- Reply: Parrot: "Re: SQL open error"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Erland Sommarskog: "Re: OLEDB Session Error"
- Previous message: Parrot: "SQL open error"
- In reply to: Parrot: "SQL open error"
- Next in thread: Parrot: "Re: SQL open error"
- Reply: Parrot: "Re: SQL open error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|