Tag Archives: SQL_Server

Beware of End-User Permissions in Databases

Beware of giving end users direct access to your databases, e.g. by using SQL Server integrated security in single-layer or Client/Server architectures. If end users have permissions on database tables they may bypass your application logic and read or update … Continue reading

Posted in Computers and Internet | Tagged , , , , , | Leave a comment

Stored Procedures Pros & Cons

Using a stored procedures (SP) data access layer is a totally viable approach (see [1]). While I do not devalue SP’s as the “assembly language of databases”, I personally dislike the language break and generally use stored procedure in special … Continue reading

Posted in Computers and Internet | Tagged , , , , | 2 Comments

Use the .NET TransactionScope

The TransactionScope class provides an elegant way to enclose a set of operations against resource managers in a transaction. Resource managers are: Databases (SQL Server, Oracle, DB2, …) MSMQ Transactional NTFS file system TxF Transactional Registry Custom resource managers See … Continue reading

Posted in Computers and Internet | Tagged , , , , , , | 4 Comments

Avoid unwanted Escalation to Distributed Transactions

When working with the .NET TransactionScope we want to use simple, lightweight, (local) transactions and avoid  escalating to distributed transactions if possible. This is not a problem when using SQL Server 2008+ and not nesting connections but if you are … Continue reading

Posted in Computers and Internet | Tagged , , , , , , | 11 Comments

DB Concurrency Control with .NET – Overview

This (long) posting provides guidelines for using common patterns to control concurrency when using relational databases (RDBMS) via ADO.NET or the .NET Entity Framework (EF). MS SQL Server and Oracle are used as examples to sensitize you for the implications … Continue reading

Posted in Computers and Internet | Tagged , , , , , , , , , | 3 Comments