Call now: (800) 766-1884  



 Home


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA



 Articles
 Services
 SQL Server Scripts
 Scripts Menu



 

 

 

   
  SQL Server Tips by Gama and Naughter

Security / Connection Management

srv_getbindtoken

This function obtains a bind token so that an XP can share the same transaction lock space as the client that called the XP. This is useful where your XP will be manipulating some data that is also being operated on by the client while avoiding the locks, which would otherwise occur. For a concrete example of using this function, please refer to the XP_ODBC example provided by MS or the equivalent implementation called XP_ODBC++ provided with the code samples accompanying this book.

srv_impersonate_client

This function allows you to impersonate or take on the security credentials of the client session that called the XP. This is used to avoid security issues, which could occur due to execution of XP code with elevated security privileges. Its operation is similar to the other Windows impersonation API’s such as ImpersonateLoggedOnUser, ImpersonatedNamedPipeClient, RpcImpersonateClient etc. Again this function is not officially documented as part of the ODS API. For an example of its usage please refer to the XP_ODBC example.

srv_revert_to_self

This is the corollary function to “srv_impersonate_client”. For every call to srv_impersonate_client, you should have a matching call to this function. Again this function is not officially documented as part of the ODS API. For an example of its usage please refer to the XP_ODBC example.


The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter

 http://www.rampant-books.com/book_2005_2_sql_server_external_procedures.htm  

 

Burleson Consulting Remote DB Administration


 

 


 

 

 

 

 
Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.
 


Burleson Consulting
SQL Server database support

 

Copyright © 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter