22,810 reputation
33979
bio website blogs.msdn.com/b/sql_pfe_blog
location In the Ocean somewhere...
age
visits member for 3 years, 1 month
seen 12 mins ago

SQL Server Premier Field Engineer at Microsoft.

Twitter: @SQLife
Blog: http://blogs.msdn.com/b/sql_pfe_blog/
Email: sqlsalt [at] outlook [dot] com

Disclaimer
The views expressed on my posts on this site are mine alone and do not reflect the views of my company. All posts of mine are provided "AS IS" with no warranties, and confers no rights.

The following disclaimer applies to all code, scripts and demos available on my posts:

This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Code.


Jun
26
revised What does role db_owner allow
added 9 characters in body
Jun
26
comment What does role db_owner allow
A member of the db_owner fixed database role will have SELECT, INSERT, UPDATE, and DELETE permissions on the database. Amongst many other permissions, but yes, that's correct.
Jun
26
revised What does role db_owner allow
edited tags
Jun
26
revised What does role db_owner allow
added 736 characters in body
Jun
26
answered What does role db_owner allow
Jun
26
revised Virtual Log Files (VLFs) Fragmentation
added 4 characters in body
Jun
26
revised Virtual Log Files (VLFs) Fragmentation
edited tags; edited title
Jun
25
comment Replicating a SQL Server database & Optimization
What exactly are your requirements? What do you have available to you? How much data loss can you sustain?
Jun
25
revised Replicating a SQL Server database & Optimization
added 8 characters in body
Jun
25
comment Print Order wise in c#
@AaronBertrand I'm completely missing the mark, then. The only sorting I see is T-SQL ORDER BY.
Jun
25
comment Print Order wise in c#
@AaronBertrand If order is required, you can either sort in the backend (T-SQL order by) or the front end (consuming code/application). I typically choose the former. The OP's outer ORDER BY is indeed effective. Looping through that result set with either a for or foreach loop will sequentially go through the data in the same order as retrieved.
Jun
25
revised Adding Data to Multiple Tables Using Single Query
added 508 characters in body
Jun
25
revised Adding Data to Multiple Tables Using Single Query
edited tags
Jun
25
answered Adding Data to Multiple Tables Using Single Query
Jun
25
comment Error while Installing SQL Server 2012
It seems as though setup simply can't retrieve the following file: 'D:\redist\VisualStudioShell\VS10sp1-KB983509-Pro.msp'. Are you sure that exists? Do this (PowerShell): Test-Path "D:\redist\VisualStudioShell\VS10sp1-KB983509-Pro.msp". What does that return? If True, then verify the security context that you're running setup.exe under has permissions to also access those files.
Jun
25
comment Print Order wise in c#
@AaronBertrand I see no problem with that. As long as the memory footprint of the desired data isn't large (and it's typically not, in my experience) I default to a DataAdapter as opposed to a DataReader. I prefer my connections to be short-lived. In my opinion, 1) Get data then 2) process data. Those shouldn't be mixed. Again, just my opinion. There are other times when a DataReader is best/required, though.
Jun
25
comment Print Order wise in c#
Can you show us what PersonalTrainerCheckboxData.ButID is? I'm guessing it is "Address", "Age", and "Name" for this data set output. In which case that is what you're sorting on, explaining why the rows are ordered like this.
Jun
24
revised Huge cross product view query speed
edited title
Jun
24
revised Migrate Management Data Warehouse to a New Instance
edited title
Jun
24
revised Map a Login to a User that was Created Without Mapping to a Login
edited tags; edited title