3,689 reputation
21733
bio website
location Bern, Switzerland
age 49
visits member for 3 years, 6 months
seen 2 days 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.


Aug
15
comment Querying LDAP multi-value attributes using Openquery
If I remember correctly, as soon as an LDAP attribute is defined to be multi-valued (no matter whether it really contains multiple values or not), it cannot be read by the ADO.NET provider. This provider is deprecated anyway, so I wouldn't spend too much time on working with a "dead horse"....
Aug
11
comment How to access another Connect server table in my Local server in SQL Server 2008R2?
WHAT error are you getting? Please post the complete and accurate error message - we can neither see your screen, nor read your mind - you'll have to tell us!
Aug
3
comment Execution Plan in Microsoft SQL Server
@AaronBertrand: absolutely - one of the trickier aspects of plan caching ...
Aug
3
comment Cannot open database “user_auth.mdf” requested by the login. The login failed. Login failed for user 'web_user'
If you created the database using SSMS, you should use the logical database name and not the file with .mdf in your connection string! Use Server=XYZ;Database=user_auth;User ID=web_user;Password=web_user for your connection string and let SQL Server worry about the file-related details.
Aug
1
comment Good pattern to run SQL Server 2008 CDC changes
Side note: you should not use the sp_ prefix for your stored procedures. Microsoft has reserved that prefix for its own use (see Naming Stored Procedures), and you do run the risk of a name clash sometime in the future. It's also bad for your stored procedure performance. It's best to just simply avoid sp_ and use something else as a prefix - or no prefix at all!
Jul
31
comment How to change the instance name of SQL Server Express 2008?
@CraigEfrein: I don't think it was - at least I never read anything about this being possible in SQL Server 2014 now....
Jul
28
comment utf8mb4 in SQL Server Express
The nchar/nvarchar types are Unicode and thus capable of handling Chinese, Japanese, Cyrillic, Arabic, Hebrew etc. characters. char/varchar are not Unicode, and thus very limited in their support for non-Latin alphabets. If you need far eastern characters, use nvarchar for your strings. Drawback: nvarchar always uses 2 bytes per character for its encoding
Jun
20
comment Efficient query for an advanced EAV model
@AaronBertrand: thanks for your post - but I'm still not at all convinced... the messy (and often hopelessly ineffective) queries, the inability to store data in its native format / datatype (everything has to be "squeezed" into a string format) ...... too many drawbacks for my taste!
Jun
20
comment Identity column as clustured index bad idea?
Read Kimberly Tripp's blog posts on clustered index - she's the Queen of Indexing in the SQL Server world, and her basic recommendation is always to use INT IDENTITY as the primary (and clustered) key on almost any table. It's a well recommend best practice and usually works just fine. Cases where this is not a good idea are relatively rare in my opinion.
Jun
20
comment Problem creating database using default mdf and ldf path
Instead of SET @logpath = (select ..., I'd recommend to just use SELECT @logpath = ....
Jun
20
comment Efficient query for an advanced EAV model
See Five Simple Database Design Errors You Should Avoid (point #3) for a discussion of why EAV is really really bad, and see Bad CaRMa for a true horror story of an EAV system design that ruined a thriving company. In brief: don't use EAV - and don't expect a good solution for dealing with an EAV...
May
20
comment SQL SERVER 2008 Cursor Problem
the best way to tune a cursor is to get rid of it :-) That keeps coming back as a recurring insight over and over again! :-) Great to hear you got your performance to a useful level!
May
20
comment SQL SERVER 2008 Cursor Problem
WHY OH WHY a cursor for something as simple as this?? Use a CTE and a proper, set-based approach to AVOID cursors altogether!
May
9
comment Trigger to update a date field on one table when another table is updated
Please do not put code samples or sample data into comments - since you cannot format it, it's extremely hard to read it.... Instead: update your question by editing it to provide that additional information! Thank you.
May
6
comment Designing a database with Ints
YES! Physical database design does matter - even today in 2014!! Check out Kim Tripp's interview on .NET Rocks - and if you have a Pluralsight video subscription, check out her Pluralsight course on "Why physical database design matters" - you won't ever ask such a question again after that!!
Apr
21
comment Get into SQL Server 2008 with no management studio and no sqlcmd
@MikeFal: sqlcmd replaced osql in SQL Server 2005, actually ...
Apr
18
comment New SQL Server 2008 instance, load old instance DB's
MDB is MS Access - not SQL Server. SQL Server data files are .mdf (and .ndf), transaction log files are .ldf
Apr
7
comment How control 27 locations and 27 databases?
You might need a third-party tool like Spotlight on SQL Server to handle such a job
Apr
7
comment How control 27 locations and 27 databases?
There is no SQL Server 2012 R2 - there are versions 2008 R2, or then 2012, and now just recently 2014 was released ....
Apr
5
comment Which should I use on my DB? - Clustered Index or Non Clustered Index or Both
To be very clear: the primary key in SQL Server DOES NOT determine the physical ordering of the table! It's the clustering key which does that. By default, the primary key is also the clustering key - but it doesn't have to be. The primary key is "just" a logical construct to uniquely and reliably identify every single row in your table.