Re: How to connect as guest?

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 12:12:52 +0100

You need to look into what a login is and what a database user is. These are different concepts. A
login allow you to access SQL Server. Then you create a user in each database that the person need
to access for your login. Your connection string specifies the login. And sp_grantdbaccess creates a
guest *user*, but the person still need a login for the SQL Server.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tumurbaatar S." <nospam_tumur@magicnet.mn> wrote in message
news:eVlE5LG0EHA.1932@TK2MSFTNGP09.phx.gbl...
> I tried 2 variants of ADO connection string, but connection fails:
> 1. Provider=sqloledb; Network Library=DBMSSOCN; Initial Catalog=Services;
> User ID=guest; Data Source=127.0.0.1,1433;
> 2. Provider=sqloledb; Network Library=DBMSSOCN; Initial Catalog=Services;
> Data Source=127.0.0.1,1433;
>
> The Services db has guest account created as "EXEC sp_grantdbaccess guest",
> but the guest does not have any permissions.
>
> P.S. I use guest account only to access the db, but just after my
> app switches to application role.
>
>
>


Relevant Pages

  • Re: SQL Default Login?
    ... A user needs a valid account (SQL Server login, ... the user can access only those database they ... have been explicitly granted access to plus those with the guest user. ...
    (microsoft.public.sqlserver.security)
  • Re: Unexpected Login Screen When Accessing SQL Data Via .NET Intra
    ... >> data and the SQL Server is on the same server. ... >> My problem is that one user has started getting a login popup ... >> right in via Windows Authentication like everyone else and like they ...
    (microsoft.public.sqlserver.connect)
  • Re: cannot acees two databases as owner
    ... it does not matter you are a member of the ... the sysadmin fixed server role or if there is no any other Login which is ... group if it's a domain) and you can login to your SQL Server with, ...
    (microsoft.public.sqlserver.setup)
  • Re: Database security design with ASP.net and form-based authentication
    ... Since you already have forms-based security, why not use a single SQL login ... for all database access? ... data entry, guest/view only, admin, report viewer. ... so I'm using SQL Server authentication. ...
    (microsoft.public.sqlserver.security)
  • Re: Credentials not being passed with remote access
    ... allowed windows authentication to work, ... I had assumed johnx was a domain user rather than a local Windows account. ... johnx was set up as a local login on sql server. ...
    (microsoft.public.sqlserver.security)