Sets the secure connection flag in a LOGINREC structure.
RETCODE DBSETLSECURE ( PLOGINREC ploginrec );
SUCCEED or FAIL.
By setting the secure connection flag in a LOGINREC structure with DBSETLSECURE, the application requests a secure, or trusted, connection to Microsoft® SQL Server™. This means that SQL Server will use Windows NT Authentication security to establish connections made (using dbopen) with this LOGINREC, regardless of the current login security mode at the server. Any login ID or password supplied by DBSETLUSER or DBSETLPWD is ignored.
To use DBSETLSECURE and trusted connections, you must first use xp_grantlogin to grant SQL Server system administrator or user privilege to the appropriate Microsoft Windows NT®-based groups or users. Use xp_revokelogin to revoke SQL Server permissions and stop a user or group from using a trusted connection.
Note that DBSETLSECURE enables trusted connections even when the server is in Mixed Mode.
dblogin | dbsetlhost |
dbopen | dbsetluser |
dbsetlapp | Authentication |