Reputation
76,755
Next tag badge:
104/100 score
18/20 answers
Badges
10 107 200
Newest
 Enlightened
Impact
~2.7m people reached

17h
comment Unable to install SQL named instance as it says RS feature exist, even after dropping it
You may need to do this the hard way.
17h
revised Unable to open SQL Server database file (.mdf)
added 210 characters in body
17h
revised Unable to open SQL Server database file (.mdf)
added 357 characters in body
17h
revised Unable to open SQL Server database file (.mdf)
deleted 231 characters in body
17h
reviewed Approve Unable to open SQL Server database file (.mdf)
17h
answered Unable to open SQL Server database file (.mdf)
18h
comment Cannot connect to database server 2008-r2
Can you please add some details, like the name of the instance, how exactly you tried to connect, what the exact error message is, whether you tried without a firewall enabled, what protocols are enabled in Configuration Manager, whether "allow remote connections" is enabled, and whether you searched this site or Stack Overflow for the most likely error message and tried any of those solutions?
19h
comment Should I use array in column or not?
Because this is a database, not OOP code. The database is not designed to iterate through an "array" and it will essentially be string parsing - not exactly a forte. Databases were designed to return skinny rows for targeted predicates - and with the right design, NO, the query will not "take more time."
21h
comment Concatenate one-to-many field in single result?
Note that if TagName includes unsafe XML characters (e.g. >, &) they will become entitized (> -> >, & -> &). To avoid this, change FOR XML PATH('') to FOR XML PATH, TYPE).value(N'.[1]',N'nvarchar(max)').
21h
comment Should I use array in column or not?
Uh... why not have a row for each year/month? You've chosen a relational database for a reason, right?
21h
comment How to backup full transaction logs for SQL Server 2008R2
My guess is the slowdown has nothing to do with logs or statistics, but rather the fact that (a) no plans exist for the new database and (b) none of the data is in buffer. There may be other complications too, like the fact that all plans must get recompiled and this could lead to less optimal plans.
22h
comment How to backup full transaction logs for SQL Server 2008R2
What does "when I checked" mean? Where are you checking exactly?
23h
comment Getting all databases which a sql logon can connect
In addition to EXECUTE AS, you should use sys.databases. sysdatabases is similarly deprecated and only exists for backward compatibility (SQL Server 2000).
1d
comment Create Nested XML in a Sql Server Indexed (Materialized) View
How often is the underlying data changing? You could consider manually materializing the data periodically (and for a possible technique to do this without disruption to users, search for "schema switch-a-roo"). An indexed view is not going to work by definition, but if the data is changing with any sort of frequency, materializing it using any method is going to work against you.
1d
comment Analyse and report disk usage growth historically
No, SQL Server does not keep history of information like this. The best you might be able to do is review file growth events from the default trace, but that is not the whole picture at all (and is only going to go back so far, depending on how busy the server is).
1d
answered Another Dynamically alias column question
1d
comment Repair SQl server 2000
Probably lost the CD.
1d
revised Half of a transaction completes, when the other half fails?
added 390 characters in body
1d
comment Half of a transaction completes, when the other half fails?
You can't say IF <something> ALTER PROCEDURE. The ALTER needs to be in its own batch. So you can use labels and GOTO like I suggested in my answer, or you can maintain the error status of each action in a #temp table, and just roll back the whole thing at the end (this is how Red Gate SQL Compare does it IIRC). Please read sommarskog.se/error-handling-I.html and sommarskog.se/error-handling-II.html and sommarskog.se/error_handling_2005.html
1d
revised Half of a transaction completes, when the other half fails?
added 175 characters in body