62,845 reputation
785166
bio website
location Rhode Island
age 40
visits member for 3 years, 6 months
seen 26 secs ago

Senior Consultant at SQL Sentry, SQL Server MVP, @AaronBertrand on twitter, blogger at sqlperformance.com and sqlblog.com, Mac user, volleyball player, curler, hockey/football/tennis fan (Go Bruins!), proud father and Canadian, eh?


1h
answered How to set host_name() value in a Sql Server Stored Procedure?
1h
comment How to set host_name() value in a Sql Server Stored Procedure?
@Kenneth But that's done outside of the database - the OP is using PowerBuilder (not SSMS) and doesn't want to fudge this from the connection string (which is what SSMS is doing too). SSMS and PowerBuilder are both "the application layer" that I'm talking about. The OP seems to want to be able to SET @@HOSTNAME = foo in T-SQL.
2h
comment How to set host_name() value in a Sql Server Stored Procedure?
Hopefully you can't spoof the hostname inside of SQL Server - it's bad enough this is allowed from the application layer. Change your triggers.
3h
comment How To Log Select Statements from 1 User On 1 Table Into a Permanent Log Table
There's no such thing as a trigger on a select statement. Auditing is possible (depending on version/edition), but an easier way would be to restrict data access to these users via stored procedures - then you can do whatever logging you want.
3h
comment Should an INSERT cause an exclusive lock on a foreign key?
I can't predict exactly what will happen without the tedious task of trying to reconstruct your exact table structure, data, and the statements that led to the deadlock. Could you meet me halfway and try this more logical approach, and see if you still get deadlocks? Can it hurt to try it?
4h
comment Should an INSERT cause an exclusive lock on a foreign key?
@chrismay Did he actually test it, or is this Chicken Little?
6h
comment Specifying per-table recovery mode
@wBob you can switch to bulk-logged without disrupting the log chain. Since I don't know whether that's feasible for this OP, I provided a link instead of 99 disclaimers.
6h
comment Specifying per-table recovery mode
@Zev store the individual inserts in a staging table in another database, then have a background job that does insert real table select top (10000) from staging table.
16h
revised Unable to view SQL Server services
deleted 49 characters in body
16h
revised Unable to view SQL Server services
edited body; edited tags; edited title
17h
answered Unable to view SQL Server services
22h
comment SQL Server Error log - strange date
+1 wonder if this is to defeat a 180-day eval thing
22h
comment SQL Server Error log - strange date
Any chance your system (either the server or client) went through a clock change? I forget if the viewer converts the server time to client time (I know the SQL Server Agent log does something like this) but I suspect someone was fiddling with the clock.
22h
awarded  Explainer
23h
awarded  Refiner
23h
comment Can SQL Server 2014 Standard Edition Trial be upgraded to a full Core license?
Where did you get "Standard Trial"? Terminology is important.
23h
comment Will increased network latency cause table locks in MS SQL Server?
@Brandon Unless you specify a nolock hint, there will always be a lock. <-- this implies if you use nolock there might not be locks. I was merely clarifying.
1d
comment Will increased network latency cause table locks in MS SQL Server?
@Brandon that is right, no shared locks, which <> no locks.
1d
comment Will increased network latency cause table locks in MS SQL Server?
@Brandon NOLOCK does not mean what you think it means.
1d
comment SQL Server TempDB Growth issue
History of growth can be seen in the default trace (see this question for details) if it happened recently. You really shouldn't be using % for auto growth on any database. Tempdb with multiple files should have the same initial size, the same growth setting, and you should be using trace flags 1117 and 1118 to reduce contention and to ensure that all files grow at the same time.