3,854 reputation
21736
bio website
location Bern, Switzerland
age 49
visits member for 3 years, 10 months
seen 2 hours ago

Note to all SO beginner:

Please read (and embrace!) Jon Skeet's helpful hints on how to write a good question (or at least his short version here ) - one that has a chance that someone can answer it.


A Pascal/Delphi programmer and database freak at heart, I work as a C# developer on line-of-business applications (mostly ASP.NET).

I'm interested mostly in distributed systems (WCF), database (design and SQL), and Active Directory.


I'm an MCPD .NET 4 Web Developer, MCPD .NET 4 Windows Developer, MCPD Enterprise Application Developer (.NET 3.5), and MCTS for WCF, ADO.NET, Winforms and ASP.NET.


2h
comment How to identify unused databases on my sql server
If in doubt, just take the database offline, and if no one complains about it for a week - nobody is using it ....
1d
comment Microsoft recommends using Rowversion over timestamp , but i can not find “rowversion” data type inside my sql server 2008 R2
You should AVOID using reserved keywords (like TIMESTAMP) as column names - use something more meaningful! Then it'll work.
Dec
2
comment Why could a SQL Server table grow far quicker than the data to it?
Since it appears to be mainly LOB_DATA - could it be that the newly added rows have significantly larger entries into the AuditData column? Since it's a nvarchar(max), it could theoretically hold up to 2 GB for each row.
Nov
29
comment Column name or number of supplied values does not match table definition error
@codeOholic: no - you just need to insert valid values for those two foreign keys....
Nov
29
comment If a database is in memory does it still need indexing?
OF COURSE! even if it's in memory, if you have to scan tens of thousands of pages for a full table scan, that's vastly less efficient than being able to walk through an index tree on a handful of pages..... also: it's much more likely that the tens of index pages are kept in memory, rather than ALL of thousands or tens of thousands of actual data pages
Nov
28
comment SSRS using select from (Select)
I would recommend to be consistent with the spelling of your SQL keywords - either spell them all in lower case (select, from, where), or all of them in upper case (SELECT, FROM, WHERE, AS, ON), or even all in mixed case - but try to use one style only - right now, your spelling is a mess - all different variations exist....
Nov
25
comment how to define trigger scope variable
Your trigger has MAJOR flaw in that you seem to assume it'll be called once per row - that is not the case. The trigger will fire once per statement, so if your UPDATE statements affects 25 rows, you'll get the trigger fired once, but then Inserted and Deleted will each contain 25 rows. WHich of those 25 rows will your code select here?? SELECT DiscountPercent FROM Inserted - it's non-deterministic. You need to rewrite your trigger to take this into account!
Nov
25
comment Performance issue when we directly insert into #temp table
"If you have two horses and you want to know which of the two is the faster then race your horses." ericlippert.com/2012/12/17/performance-rant
Nov
25
comment SQL Server Management Studio: how to parse stored procedure code and check if table columns exist?
That is defined behavior, and it's by design. The "Parse" only check for syntactical errors. It does NOT check for object existence, and I'm not aware of any way or option to turn this on.
Nov
21
comment Where's my missing Sql Server Express 2005 Database space? Size and space available dont add up to SQL express size 4G?
Upgrade to SQL Server 2008 R2 Express (or even newer) - the limit has been upped to 10 GB
Nov
18
comment SQL Server is very slow
You have to provide a lot more information so anyone can help you! What does the database look like - tables and their columns, what queries do you run against those tables, how many rows are in those tables, what indexes are in place, what are the hardware parameters of the physical server box, what other activity is on that server? .....
Nov
18
comment Protect SQL Server Express data file
No, this is not dbase or Access - you cannot protect a SQL Server data file by a password or anything. If it's out there in the open, and someone with admin permissions on a SQL Server decides to attach it and peek inside it - there's no way to stop him from doing that.
Nov
17
comment Upgrading SQL Server 2008 R2 Standard edition to SQL Server 2008 R2 Enterprise edition what is the process and the impact?
There's absolutely no impact at all. The only thing that changes is that some additional features in SQL Server become available, so your performance might get better in certain areas, or you have more options to performance tune your queries.
Nov
17
comment SQL Performance: COUNT or extra attribute?
That highly depends on what concrete database you're talking about, and on what the table structure and available indexes look like....
Nov
9
comment SQL Server 2008 user and group permissions behavior weirdness
You need to take care: a login is on the server-level - a SQL Server instance has logins. Each database then has users that are linked to those logins. You cannot have a database has a login..... the server has a login, and the database has a user connected to that login.....
Nov
1
comment SQL Server clustered index, index balancing and insert performance using NewID
Sorry, you're right - I must have misread that.....
Nov
1
comment SQL Server 2008 R2 – Track Database Growth (Production Database)
There's also the built-in Performance Data Collector in SQL Server 2008 R2 which allows you to collect certain key indicators (including size) of databases and your servers into a performance management database
Oct
21
comment Best way to profile SQL Server
Really not a programming question --> should be moved to dba.stackexchagne.com
Oct
17
comment What can cause mongodb used memory to increase?
It's memory (not memery)
Oct
7
comment Unable to copy a DB from SQL Server 2000 to SQL Server 2012 using copy wizard
You cannot upgrade directly from SQL Server 2000 to 2012 - you'll have to go from 2000 to 2008 R2 and then from there on to 2012. That happens when you stick to dead-old versions for too long .....