Re: Preventing windows users accessing a database



Steve
I think the following has been introduced in SP2 and I did not test on
Express Edition ,sorry


/*Create a very simple login trigger */
create trigger AuditLogin_Demo
/* server means instance level*/
on all server
with execute as self
/* We specify the logon event at this stage
? Issue a rollback*/
for logon
as begin

if exists (select * from sys.server_principals

where type_desc ='Windows_Login'

and name=original_login() )

begin

ROLLBACK;
end
end
go

For more details please


"Steve" <ga630sf@xxxxxxxxxxxxxxxxx> wrote in message
news:edw2AkkzHHA.4004@xxxxxxxxxxxxxxxxxxxxxxx
Hi All

I want to prevent windows users from accessing my database on SQL server
express 2005

I don't want users to be able to login with SSME on Windows
authentication, only by SQl Server Authentication and only on the sa and
another specific login with the password I have set

For the life of me I can't seem to find how to do this

Can anybody advise me


Regards
Steve



.



Relevant Pages

  • Re: SQL2005: Cannot connect error 11001
    ... The famous Windows Firewall (turned on my Server from which I'm trying to ... Exception Details: System.Data.SqlClient.SqlException: Login failed for user ... Try starting the SQL Server ... if you changed the port ...
    (microsoft.public.sqlserver.connect)
  • gdm hangs
    ... gdm will hang 9 of 10 times when logging out. ... with or without the client having been connected to the Server. ... # Timed login, useful for kiosks. ... Must output the chosen host on stdout, ...
    (Debian-User)
  • Re: error logging on SQL 2008
    ... I was, though, hoping for some more recognizable Reason for that error (state 11, " Token-based server access validation failed with an infrastructure error. ... Suggests that state 11 means "Valid login but server access failure", which doesn't really seem to rhyme with your description. ... How can you login to your SQL Server and use that tool if you can't log into your SQL Server? ... at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) ...
    (microsoft.public.sqlserver.server)
  • Re: Clearer version of my earlier question re sp_grantlogin and sp_grantdbaccess
    ... > file while you do changes, so the script file in the end contains the ... >> Server, doesn't have the right to grant DB access to Domain Groups. ... > Tibor Karaszi, SQL Server MVP ... >> site where they let me login as Domain Admin. ...
    (microsoft.public.sqlserver.msde)
  • Re: SQL 2005 Express setup
    ... Connect to your SQL Server Instance, ... Double click on the Login that you want to add to the "sysadmin" server role or right click on it and choose properties from the popup menu, ... Login is a member of the "sysadmin" fixed server role now. ...
    (microsoft.public.sqlserver.setup)