Database Administrators Weekly Newsletter
Database Administrators Weekly Newsletter

Top new questions this week:

SQL Server recreating plans each day

We have this problem in our production environment. Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) - Enterprise Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1). SQL Server ...

sql-server sql sql-server-2008  
asked by peter.petrov 10 votes

Why 0 is equal to empty string?

I need some help in finding why the following T-SQL statement returns 1 (true): SELECT IIF( 0 = '', 1, 0) I guess someone has change an ANSI option like SET ANSI_NULLS or something else that is ...

sql-server sql sql-server-2012 t-sql  
asked by gotqn 7 votes
answered by Tom V 13 votes

Sudden poor SELECT performance on a large table with existing indexes

My company uses a software suite in which the only thing I can truly modify is the database. We've always had performance issues (mostly hardware problems that we hope to resolve soon), but lately ...

sql-server sql-server-2008-r2 performance index-tuning  
asked by jreed121 5 votes
answered by Rob Farley 5 votes

Moving TDE database to a new database but having problems with the cert

This is my first time working with TDE so hopefully I haven't done anything horribly wrong. I'm trying to move my TDE database from one server to another. I have created a master key on the master ...

sql-server-2008-r2 tde  
asked by Kenneth Fisher 5 votes
answered by Spörri 4 votes

Shared connection pool in SQL Server and prevention of cross-database queries

Microsoft recommends that a shared connection pool should be used when running e.g. a SaaS software with one database per customer but with a shared codebase to prevent pool fragmentation: ...

sql-server connection-pooling  
asked by brunnsbe 4 votes
answered by srutzky 1 vote

Trace Flag 4199 - Enable globally?

This may fall under the category of opinion, but I'm curious if people are using trace flag 4199 as a startup parameter for SQL Server. For those that have used it, under what circumstances did you ...

sql-server query-optimization query-plan  
asked by Skagalak 4 votes
answered by spaghettidba 7 votes

Why is vertical scaling expensive?

As you can find here Best Practices For Horizontal Application Scaling, vertical scaling is much more expensive than horizontal scaling: vertical scaling cost increase exponentially whereas with ...

database-design scalability scaling  
asked by user1170330 3 votes
answered by datagod 2 votes

Greatest hits from previous weeks:

ODBC Data Source SQL Server Connection - Login Failed For User

I have moved my database from an SQL 2005 to a server with SQL 2008. I am now trying to create an ODBC Data Source. I am using "With SQL Server authentication using a login ID and password ...

sql-server-2008 sql-server-2005 odbc logins  
asked by jpsnow72 8 votes
answered by jpsnow72 4 votes

Force drop db while others may be connected

I need to remove a database from a PostgreSQL DB cluster. How can I do it even if there are active connections? I need sort of a -force flag, that will drop all connections and then the DB. How can I ...

postgresql database-maintenance  
asked by Alex 20 votes
answered by filiprem 35 votes

Can you answer these?

How to find the number of transactions per day or per hour in a SQL 2000 database

I am trying to find a query that I can run in order to find the number of transactions per day or per hour in a SQL 2000 database. The purpose is to get the number of hits on the database. I have ...

transaction sql-server-2000  
asked by Loic 1 vote

Code required to make column not nullable

I have a table where I mistakenly allowed NULL values in a column: CREATE TABLE EXAMPLE ( EXAMPLE_ID INT IDENTITY(1, 1) NOT NULL, FOO_ID INT, CREATED_ON DATETIME DEFAULT ...

sql-server sql-server-2008 t-sql ssms  
asked by Álvaro G. Vicario 2 votes

Trigger failing when called using sp_executesql

We have a recursive trigger on a table that executes AFTER INSERT. There is a check to ensure the trigger does not recurse more than 32 levels deep: IF(SELECT TRIGGER_NESTLEVEL()) >= 31 ...

sql-server trigger spexecutesql  
asked by Boris 1 vote
Subscribe to more Stack Exchange newsletters

Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3