Reputation
Next tag badge:
526/400 score
62/80 answers
Badges
9 85 156
Newest
 Good Answer
Impact
~476k people reached

1d
comment Stored procedure using cursors
Homework questions are not automatically off-topic on this site. A good enough question is a good enough question regardless.
Jun
21
comment How to read detached or offline sql server transaction log?
@plywoods All things are possible in principle. You could, in principle, write your own tool to read and process the binary content of the offline log files, but it would require techniques and internal details that Microsoft do not document or support. Your question isn't 100% clear on what you are trying to achieve or why; I gave the best answer I could.
Jun
16
comment The use of NOT logic in relation to indexes
@ypercube Yes..
Jun
12
comment SQL Server varbinary column modifying inserted data
Your binary representation has an odd number of digits. It takes two hex digits to specify a single byte, hence the padding. Are you really trying to store half a byte? That would seem to be an odd (ha!) thing to do. e.g. DECLARE @v varbinary(max) = 0x123; SELECT @v;
Jun
6
comment Postgresql CRUD operation on Single json data row
Please merge your accounts
Jun
5
comment Merge row size overflow in SQL Server
The first comment on that Connect item is mine. There is no repro, just a script. Running the script does not reproduce the problem because there is no sample data. Again: you are unlikely to get an answer here until you provide the details asked for.
Jun
5
comment INSERT INTO with TABLOCK taking longer than without TABLOCK
Is the destination table definitely a heap? Any nonclustered indexes? Are the logical reads repeatable, even when a backup is not concurrently running? Do the log records show bulk operations or per-row inserts (LOP_INSERT_ROWS - LCX_HEAP)?
Jun
4
comment Using different aggregate functions in a pivot
Might there be other years? Or just 2015? Could the tabulation be performed in the client rather than on the server?
Jun
4
comment Deny database access to all users but sa/admin
This question needs to be more specific: are you looking to restrict access to a single database, or the whole SQL Server instance? Specifically just to the 'sa' login, or anyone with admin (CONTROL SERVER) or database owner permissions? A screenshot of what you're doing in SSMS might help clarify your question too.
May
26
comment How to select the first row of each group?
That's only true if the optimizer takes the written query literally. More advanced optimizers can see the intent (row per group) and produce a plan with a single table access.
May
25
comment Merge row size overflow in SQL Server
This question is unanswerable without a complete repro. The storage engine doesn't make mistakes around row size, so the error has a precise cause. We can't tell you exactly what the reasons are in detail without a repro.
May
9
comment Is it possible to change the default style used by CAST/CONVERT when converting DATETIME?
Suggestion: maybe use SQL_VARIANT_PROPERTY(<column>, 'BaseType') instead of ISDATE(CONVERT?
May
7
comment how to join one select statement to another pivot select statement
Yeah the code formatter struggles sometimes with long lines of text.
May
6
comment how to join one select statement to another pivot select statement
Original formatting didn't render properly. Did my best to fix it up. Feel free to rollback or amend as necessary.
May
2
comment Is there an advantage to not partition aligning an index?
Yes. Choosing a non-aligned index would have to be a very informed choice. I have done it myself (rarely) in the past, but in very specific circumstances where the benefits outweighed the costs.
May
1
comment Can a critical section cause deadlock in SQL Server?
Sequence objects may be an option, but they are not suitable for all cases and have had concurrency problems (bugs) of their own 1 2
May
1
comment Can a critical section cause deadlock in SQL Server?
Just out of curiosity, what do you mean by "critical section" here? I understand the term generally, but wonder how you implemented that in T-SQL.
May
1
comment How to generate documentation from stored procedures?
In response to your opening question, it is possible to read the original question as looking for an external tool recommendation.
Apr
30
comment how to extract an integer from a column having an xml of clob data type?
Your comment on the question says it is SQL Server. Your comment on Spörri's answer says it is Oracle. Please clarify by editing the question and its tags. Also, it is better to edit your question than add new snippets of information in different places.
Apr
29
comment Fastest way to disable indices and drop constraints and rebuild SQL Server table
It might be worth making it clear that ALTER INDEX ALL ... DISABLE will also disable the clustered index.