Re: SQL Server 2005 Connection Only By ODBC
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Fri, 13 Nov 2009 22:30:20 +0000 (UTC)
Joe K. (JoeK@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
I have a SQL Server 2005 database server that has a SQL user account
that I would like to restrict it from connecting with SSMS only
connecting with ODBC.
Is there something I can do with the user account that allow it only to
connect by ODBC?
You could set up a logon trigger that checks
sys.dm_exec_sessions.client_interface_name and raise an error if the
value is not ODBC.
However, I'm not sure that I see the point in restricting a user to only
use a certain protocol. He will not be able to connect from SSMS which
uses ADO .Net, but he will be able to use OSQL-32 or the old Query
Analyzer, which both use ODBC.
Is there something within SQL Server 2005 (SSMS), that can tell me how the
user account was connection to SQL Server instance? (SSMS,ODBC,.etc)
Beside the column I mention above, there is also the system function
app_name(). However, this value is set in the connection string and
can be spoofed.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- SQL Server 2005 Connection Only By ODBC
- From: Joe K.
- SQL Server 2005 Connection Only By ODBC
- Prev by Date: SQL Server 2005 Connection Only By ODBC
- Next by Date: Re: Change table owner
- Previous by thread: SQL Server 2005 Connection Only By ODBC
- Index(es):
Relevant Pages
|