SQL Server
Nifty tricks and tidbits regarding SQL Server
A few weeks ago we started getting complaints about performance in an application that has performed very well for many years. The application is a n-tier application that uses ADODB with the SQLOLEDB provider to talk to a SQL Server database. Our object model is written in such a way that each public method validates security before performing requested actions, so there is a significant number of queries executed to get information about file cabinets, retrieve images, create workflows, etc. (PaperWise...
I worked on a project for PaperWise a few months ago where I needed to restrict the results of a SQL view based upon the user executing queries against that view. To do that, I needed some way to tie the query being executed on the view to the user executing it. The problem is that subsequent queries in PaperWise don’t necessarily identify the user executing them. PaperWise uses standard SQL Server authentication and not Windows NT authentication, which means that we have a Users table in our database...