Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Sql Server Login Problem

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-08-14 : 08:05:52
Batur KILIÇ writes "Hi This is Batur Kýlýç From Turkey.
Thank you for your Forum Site and other information.
I have a question about 'Login to SQL Server'.
I want a login remote sql server while remote computers guest account and my account (on remote computer) disabled. SQL security mode does not matter.

Thank Your Answer."

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-14 : 11:44:17
From SQL Server Books Online:

sp_denylogin
Prevents a Microsoft® Windows NT® user or group from connecting to Microsoft SQL Server™.

Syntax
sp_denylogin [ @loginame = ] 'login'

Arguments
[@loginame =] 'login'

Is the name of the Windows NT user or group. login is sysname, with no default. If the Windows NT user or group does not exist in SQL Server, it is automatically added.

Return Code Values
0 (success) or 1 (failure)

Remarks
sp_denylogin can be used only with Windows NT accounts in the form Domain\User, for example London\Joeb. sp_denylogin cannot be used with SQL Server logins added with sp_addlogin.

Use sp_grantlogin to reverse the effects of sp_denylogin and allow the user to connect.

sp_denylogin cannot be executed within a user-defined transaction.

Permissions
Only members of the securityadmin or sysadmin fixed server roles can execute sp_denylogin.

Examples
This example prevents user Corporate\GeorgeW from logging in to SQL Server.

EXEC sp_denylogin 'Corporate\GeorgeW'

Or

EXEC sp_denylogin [Corporate\GeorgeW]



Tara
Go to Top of Page
   

- Advertisement -