Tuesday, January 27, 2009

DLL Memory Management

I have been a good Visual Basic Programmer during my early days in undergraduate course. VB6 is used extensively to develop desktop (windows) based applications. DLLs here mean Dynamic Link Libraries. DLLs generally store function definitions. So, when called by an application by passing input parameters, it executes function stored in.


So, what is the benefit of DLLS? A normal programmer would say that it helps in modularization (i.e. it helps to separate business logics). Yes, that is absolutely true. I also remember developing DLLs for printing, reporting and handling common functions. That is not enough. I have noticed that applications using DLLs are more efficient that those not using it. They consume less time and memory. May be windows itself helps in memory management of applications using DLLs.


One major benefit of DLL becomes that the running application (EXE) can be less in size. It is because most of its functionalities are stored in DLLs. And DLLs can be called upon requirement basis and similarly freed after use. Thus, it helps to reduce memory consumption by the Application EXE.


Wednesday, January 7, 2009

How to block built in windows administrators from using your SQL database?

The problem is terrible. You are not the windows administrator. But you have to create a database in the machine without allowing built in administrator of windows to access. Either you install the SQL Server in Mixed Mode or Windows Authentication mode, by default, built-in administrators becomes SQL Server Administrator. So, they will have access to each and every SQL database in that machine.

If you really want to block, then in my opinion, only two options are remained.

  1. To remove, built-in administrator login from SQL Server Administrator role. Yes, it woks fine. But, it will block the administrator from creating new databases as well and also from other rights. That may be problematic.
  2. By completing denying access to built-in administrator to SQL Server. This may also be problematic as the administrator will not even able to login to SQL.

 Both the things can be done from SQL Server Login Properties of SQL Server Enterprise Manager.