8,072 reputation
1531
bio website
location
age
visits member for 3 years, 7 months
seen 7 hours ago

10h
revised Index seek much slower with OR condition compared with separate SELECTs
deleted 2 characters in body
12h
answered Index seek much slower with OR condition compared with separate SELECTs
14h
answered Performing deltas / diffs over VPN from Oracle to MS SQL database
2d
revised How to join the latest previous record with SQL
edited body
2d
comment Whether Logfile Shrinking is good or bad one for Performance in SQL?
If your logs keep growing to that size, then don't shrink them as they'll only grow back (in fact, allocate that size as their minimum). If the logs seem to be growing infinitely then you most likely have an issue with your recovery model and backup plan settings - see the linked question (dba.stackexchange.com/questions/29829) for more detail there.
2d
answered How to join the latest previous record with SQL
Jul
25
answered Whether Logfile Shrinking is good or bad one for Performance in SQL?
Jul
24
revised How do I place leading zeros for numbers less than 10 without affecting those 10+?
Removed comment as about covert, which may not be correct.
Jul
24
answered How do I place leading zeros for numbers less than 10 without affecting those 10+?
Jul
16
awarded  Guru
Jul
15
answered Getting number of errors in stored procedure
Jul
14
answered Optimize select on subquery with COALESCE(…)
Jul
11
comment SQL Server 2008R2 Migration to new Platform - What Steps Required?
Not really an answer in any detail, hence using a comment, but if your backups and disaster recovery plan are well designed then you should just be able to use that. Stop access to the apps, run a final refresh of your backups, restore to the new hardware as per the DR plan, test, then reactivate the services once all seems well. You presumably don't have this setup already, so I recommend using this migration as a good time to get that arranged and tested. Your users/clients will be glad you made such preparations if a disaster does strike at a later date.
Jul
9
answered Should I opt for a new database or adding more tables?
Jul
3
comment SQL Server 2012 Express SP1 install still not 11.1
Do you have more than one instance (run sqlcmd -l at a command prompt, for instance one of dev/test machines shows as ABT, ABT\EXPR and ABT\S2008R2 in that list as it has three instances) and if so how are you connecting? You might have upgraded the default instance only and be connecting to another one (or vice versa).
Jul
1
comment Is it always faster to create indexes after loading data?
In my experience, if you are doing the bulk insert in more or less the order of the clustered index as a bulk operation (i.e. not many smaller inserts) then creating the clusters index first can be more efficient. Though generally the above is good advice, especially the beer step if you have good stuff handy as for large tables you could be waiting a while whatever order your perform the work in.
Jun
26
comment Avoid using SOQL/DML query statements in trigger
Never just write "an error" in a problem report - that leaves us guessing which error message from a potentially practically infinite selection you are receiving. It is very helpful to include the text of the error message(s) in your question. Also, if you are using SOQL then you would be better off asking on the more specific sf.se.com instead of dba.se.com as that is an application specific DSL that just happens to be similar to SQL - you are more likely to find people over there that can help you.
Jun
26
comment When is it OK to shrink a Database?
Either SSIS or base TSQL would work just as well (the SSIS option might be less efficient, but potentially easier to maintain later). If you create the FK relationships at the end along with the indexes you can do a simple "for each table, copy" in either case. Of course for a one-off as described above a shrink+reorganise is probably fine too but I just like to scare people into never considering regular shrinks! (I've known people schedule them daily)
Jun
25
revised Adding Data to Multiple Tables Using Single Query
added 1510 characters in body
Jun
25
answered Adding Data to Multiple Tables Using Single Query